public static void SortingPropertyFields (SerializedSortingProperties prop, bool applyModifiedProperties) { if (applyModifiedProperties) { EditorGUI.BeginChangeCheck(); SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); if(EditorGUI.EndChangeCheck()) { prop.ApplyModifiedProperties(); EditorUtility.SetDirty(prop.renderer.targetObject); } } else { SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); } }
public static void SortingPropertyFields(SerializedSortingProperties prop, bool applyModifiedProperties) { if (applyModifiedProperties) { EditorGUI.BeginChangeCheck(); SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); if (EditorGUI.EndChangeCheck()) { prop.ApplyModifiedProperties(); } } else { SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); } }
public static void SortingPropertyFields(SerializedSortingProperties prop, bool applyModifiedProperties) { if (applyModifiedProperties) { EditorGUI.BeginChangeCheck(); SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); if (EditorGUI.EndChangeCheck()) { prop.ApplyModifiedProperties(); EditorUtility.SetDirty(prop.renderer.targetObject); } } else { SortingPropertyFields(prop.sortingLayerID, prop.sortingOrder); } }
public static void SortingPropertyFields(SerializedSortingProperties prop, bool applyModifiedProperties) { if (applyModifiedProperties) { EditorGUI.BeginChangeCheck(); } if (SpineInspectorUtility.SortingLayerFieldMethod != null && prop.sortingLayerID != null) { SpineInspectorUtility.SortingLayerFieldMethod.Invoke(null, new object[] { SortingLayerLabel, prop.sortingLayerID, EditorStyles.popup }); } else { EditorGUILayout.PropertyField(prop.sortingLayerID); } EditorGUILayout.PropertyField(prop.sortingOrder, OrderInLayerLabel); if (applyModifiedProperties && EditorGUI.EndChangeCheck()) { prop.ApplyModifiedProperties(); } }
public static void SortingPropertyFields (SerializedSortingProperties prop, bool applyModifiedProperties) { if (applyModifiedProperties) EditorGUI.BeginChangeCheck(); if (SpineInspectorUtility.SortingLayerFieldMethod != null && prop.sortingLayerID != null) SpineInspectorUtility.SortingLayerFieldMethod.Invoke(null, new object[] { SortingLayerLabel, prop.sortingLayerID, EditorStyles.popup } ); else EditorGUILayout.PropertyField(prop.sortingLayerID); EditorGUILayout.PropertyField(prop.sortingOrder, OrderInLayerLabel); if (applyModifiedProperties && EditorGUI.EndChangeCheck()) prop.ApplyModifiedProperties(); }