mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[unity] Fix SkeletonDataAssetInspector GUILayout
This commit is contained in:
parent
c8b72e382f
commit
edc8f6e908
@ -132,7 +132,10 @@ namespace Spine.Unity.Editor {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Some code depends on the existence of m_skeletonAnimation instance.
|
||||
// If m_skeletonAnimation is lazy-instantiated elsewhere, this can cause contents to change between Layout and Repaint events, causing GUILayout control count errors.
|
||||
InitPreview();
|
||||
if (m_skeletonData != null) {
|
||||
DrawAnimationStateInfo();
|
||||
DrawAnimationList();
|
||||
@ -229,10 +232,6 @@ namespace Spine.Unity.Editor {
|
||||
using (new GUILayout.HorizontalScope()) {
|
||||
if (GUILayout.Button(new GUIContent("Bake All Skins", SpineEditorUtilities.Icons.unityIcon), GUILayout.Height(32), GUILayout.Width(150)))
|
||||
SkeletonBaker.BakeToPrefab(m_skeletonDataAsset, m_skeletonData.Skins, "", bakeAnimations, bakeIK, bakeEventOptions);
|
||||
|
||||
// If m_skeletonAnimation is lazy-instantiated elsewhere, this can cause contents to change between Layout and Repaint events, causing scope errors.
|
||||
if (m_skeletonData != null && m_skeletonAnimation == null)
|
||||
InitPreview();
|
||||
|
||||
if (m_skeletonAnimation != null && m_skeletonAnimation.skeleton != null) {
|
||||
Skin bakeSkin = m_skeletonAnimation.skeleton.Skin;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user