Hello everyone!
I am using Cocos Creator version 3.8.6.
If I drag the Spine skeleton json file onto the scene, an object with the following components will be automatically created on the scene:
- Node
- cc.UITransform
- sp.Skeleton
I would like to draw attention to the fact that the cc.UITransform component will have the Context Size and Anchor Point fields filled in.
What if I need to assign a Spine skeleton during the game?
I noticed that assigning sp.SkeletonData to the sp.Skeleton object via the skeletonData property does not change the value of the cc.UITransform component (at least at the time of assignment, it may change on the next frame, but I am not satisfied with this behavior).
I found how to get the size. sp.SkeletonData → getRuntimeData() → width/height.
But how can I get Anchor Point?