答案 0 :(得分:0)
好的,我找到了一个解决方案,这就是你遇到同样问题的答案。
if( Selection.activeGameObject )
{
SkeletonAnimator spineScript = Selection.activeGameObject.GetComponent<SkeletonAnimator>();
if (spineScript == null)
return;
SkeletonDataAsset m_skeletonDataAssets = spineScript.SkeletonDataAsset;
if (m_skeletonDataAssets == null)
return;
SkeletonData m_skeletonData = m_skeletonDataAssets.GetSkeletonData(false);
GUILayout.Label("Animation List");
foreach (Spine.Animation animation in m_skeletonData.Animations) {
using (new GUILayout.HorizontalScope()) {
GUILayout.Label(animation.name);
}
}
}