SkeletonDataAsset
和 SkeletonData 保存由 Spine 编辑器保存的共享动画数据,而不是您的实例数据。 您需要改为访问“骨架”数据。 请参阅此处有关此共享数据与实例分离的文档:
SkeletonData
Skeleton
请始终先查看 spin-unity 文档页面,其中涵盖了许多常见用例,例如获取骨骼位置:
spine-unity 运行时文档: 手动获取和设置骨骼Transforms
一般来说(如果可能的话)你可以简单地使用 BoneFollowerGraphic
组件来让 Transform 跟随骨骼。
SkeletonDataAsset
and SkeletonData hold shared animation data as saved by the Spine Editor, not your instance data. You need to access the Skeleton data instead. See documentation here regarding this shared-data vs. instance separation:
SkeletonData
Skeleton
Please always have a look at the spine-unity documentation page first, which covers many common use cases such as getting a bone position:
spine-unity 运行时文档: 手动获取和设置骨骼Transforms
In general (if possible) you could simply use a BoneFollowerGraphic
component to let a Transform follow a bone.