- Modifié
Skeleton Graphic UI - Not Working
- Modifié
How come my Skeleton Graphic UI disappears as soon as the gizmo moves off screen? :wounded: :wounded: :wounded:
I'm exporting the windmill example file
Nice catch.
This is because you are using a RectMask2D and have setup the RectTransform bounds of the skeleton incorrectly, i.e. too small. If you switch from the Move Tool to the Rect Tool you can see your skeleton's rect bounds that are used for culling.
You just have to hit the Match RectTransform with Mesh button in the SkeletonGraphic Inspector once to automatically setup the bounds. This happens automatically when you drag-and-drop instantiate the SkeletonGraphic GameObject into the Hierarchy somewhere below a Canvas (i.e. as a child of Canvas). Then it automatically matches the bounds to the mesh. If you instantiate it outside a Canvas and re-parent it to be a child of the Canvas later, there is unfortunately nothing we can do about it. Then you have to click the Match button once after re-parenting.
foriero a écritNice catch.
No bug this time
8).
Harald a écritThis is because you are using a
RectMask2Dand have setup theRectTransformbounds of the skeleton incorrectly, i.e. too small. If you switch from theMove Toolto theRect Toolyou can see your skeleton's rect bounds that are used for culling.You just have to hit the
Match RectTransform with Meshbutton in theSkeletonGraphicInspector once to automatically setup the bounds. This happens automatically when you drag-and-drop instantiate theSkeletonGraphicGameObject into the Hierarchy somewhere below aCanvas(i.e. as a child ofCanvas). Then it automatically matches the bounds to the mesh. If you instantiate it outside aCanvasand re-parent it to be a child of theCanvaslater, there is unfortunately nothing we can do about it. Then you have to click theMatchbutton once after re-parenting.foriero a écritNice catch.
No bug this time
8).
Ah ok, yes increasing the width\height helped. Thanks Harald!

Harald a écrit
Match RectTransform with Meshbutton
Yeah I pressed that button too, but didn't know what it did. :rolleyes:
I wonder if your information above, about the Rect Transform Bounds would be helpful to add into the example file itself?
I'm sure lots of others have run into this, but just gave up and didn't go to the trouble of reporting it. It's a bit of a challenge to explain in and of itself.
I know in the past I just gave up and used a spine mecanim in the UI canvas(without a mask)... and now can't hide the "canvas" of the mesh. :bigeye: :grinteeth:
Harald a écritNo bug this time
8).
foriero a écritNice catch.

IndieDoroid a écritI wonder if your information above, about the Rect Transform Bounds would be helpful to add into the example file itself?
This is a valid point, thanks for the hint. I have add some text to the example scene, it will be published with the next unitypackage.
Additionally, I have added a section to the spine-unity documentation page here:
spine-unity Runtime Documentation: Match RectTransform bounds for correct visibility