Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

How to use UGUI in UIWidget #446

Open
alittlecup opened this issue Dec 14, 2020 · 1 comment
Open

How to use UGUI in UIWidget #446

alittlecup opened this issue Dec 14, 2020 · 1 comment

Comments

@alittlecup
Copy link

我需要在项目中使用 Spine 动画,如何能够将 Spine UI 插入到 UiWidget 中?或者是如何将普通的 UGUI 在 UiWidget 中使用?

@HiWenHao
Copy link

我这边也是UGUI和UIWidgets混用,我目前有两个办法,不知道能否帮到你;
1、创建一个UGUI的Canvas,将你的Spine放在UGUI的Canvas上播放,在播放时它有MainTexture可以拿到。然后你就可以把拿到的texture实时显示到UIWidgets的图片组件上边。 ★★★★推荐度

2、实时计算你需要把Spine展示到UIWidgets的什么地方,接着在UIWidgets的Canvas的下方再创建一个UGUI的Canvas,然后实时把Spine移动位置。但这个要计算,要涉及到DPI、像素比例、点击操作等等。 ★★推荐度

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants