Ejemplo n.º 1
0
		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);
			}
		}
Ejemplo n.º 2
0
 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);
     }
 }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
        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();
		}