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>(); } } } }
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>(); } } } }
public void IncrementLayer() { //TODO: increment layer based on spine fish.GetComponent <MeshRenderer> ().sortingOrder += 1; }