mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 10:16:01 +08:00
[unity] Extra SkeletonDataAssetInspector info.
This commit is contained in:
parent
164678163d
commit
a0cf9badb9
@ -387,6 +387,9 @@ namespace Spine.Unity.Editor {
|
||||
}
|
||||
|
||||
EditorGUILayout.LabelField("Name", " Duration");
|
||||
bool nonessential = m_skeletonData.ImagesPath != null;
|
||||
float fps = m_skeletonData.Fps;
|
||||
if (nonessential && fps == 0) fps = 30;
|
||||
foreach (Spine.Animation animation in m_skeletonData.Animations) {
|
||||
using (new GUILayout.HorizontalScope()) {
|
||||
if (m_skeletonAnimation != null && m_skeletonAnimation.state != null) {
|
||||
@ -403,7 +406,8 @@ namespace Spine.Unity.Editor {
|
||||
} else {
|
||||
GUILayout.Label("-", GUILayout.Width(24));
|
||||
}
|
||||
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + ("(" + (Mathf.RoundToInt(animation.Duration * 30)) + ")").PadLeft(12, ' ')));
|
||||
string frameCountString = (fps > 0) ? ("(" + (Mathf.RoundToInt(animation.Duration * fps)) + ")").PadLeft(12, ' ') : string.Empty;
|
||||
EditorGUILayout.LabelField(new GUIContent(animation.Name, Icons.animation), SpineInspectorUtility.TempContent(animation.Duration.ToString("f3") + "s" + frameCountString));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user