protected override void DrawInspectorGUI()
    {
        base.DrawInspectorGUI();

        EditorGUILayout.PropertyField(layerMixModes, true);

        SkeletonAnimator component = (SkeletonAnimator)target;

        if (!component.valid)
        {
            return;
        }

        EditorGUILayout.Space();

        if (!isPrefab)
        {
            if (component.GetComponent <SkeletonUtility>() == null)
            {
                if (GUILayout.Button(new GUIContent("Add Skeleton Utility", SpineEditorUtilities.Icons.skeletonUtility), GUILayout.Height(30)))
                {
                    component.gameObject.AddComponent <SkeletonUtility>();
                }
            }
        }
    }
예제 #2
0
    protected override void gui()
    {
        base.gui();
        EditorGUILayout.PropertyField(layerMixModes, true);

        SkeletonAnimator component = (SkeletonAnimator)target;
        int CurrentSkipRate        = EditorGUILayout.IntField("CurrentSkipRate", component.CurrentSkipRate);

        if (CurrentSkipRate != component.CurrentSkipRate)
        {
            component.CurrentSkipRate = CurrentSkipRate;
        }

        if (!component.valid)
        {
            return;
        }

        EditorGUILayout.Space();

        if (!isPrefab)
        {
            if (component.GetComponent <SkeletonUtility>() == null)
            {
                if (GUILayout.Button(new GUIContent("Add Skeleton Utility", SpineEditorUtilities.Icons.skeletonUtility), GUILayout.Height(30)))
                {
                    component.gameObject.AddComponent <SkeletonUtility>();
                }
            }
        }
    }
예제 #3
0
 public void IncrementLayer()
 {
     //TODO: increment layer based on spine
     fish.GetComponent <MeshRenderer> ().sortingOrder += 1;
 }