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

How to use UGUI in UIWidget #446

Description

@alittlecup

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

Activity

  1. HiWenHao commented on Apr 23, 2021

    @HiWenHao

    我这边也是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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions