mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed ambiguous method return in Unity 5 release.
This commit is contained in:
parent
2de88fc6aa
commit
b28b7674d8
@ -53,9 +53,9 @@ public class SkeletonRendererInspector : Editor {
|
|||||||
front = serializedObject.FindProperty("frontFacing");
|
front = serializedObject.FindProperty("frontFacing");
|
||||||
|
|
||||||
if(EditorGUILayoutSortingLayerField == null)
|
if(EditorGUILayoutSortingLayerField == null)
|
||||||
EditorGUILayoutSortingLayerField = typeof(EditorGUILayout).GetMethod("SortingLayerField", BindingFlags.Static | BindingFlags.NonPublic);
|
EditorGUILayoutSortingLayerField = typeof(EditorGUILayout).GetMethod("SortingLayerField", BindingFlags.Static | BindingFlags.NonPublic, null, new Type[] { typeof(GUIContent), typeof(SerializedProperty), typeof(GUIStyle) }, null);
|
||||||
|
|
||||||
rendererSerializedObject = new SerializedObject(((SkeletonRenderer)target).renderer);
|
rendererSerializedObject = new SerializedObject(((SkeletonRenderer)target).GetComponent<Renderer>());
|
||||||
sortingLayerIDProperty = rendererSerializedObject.FindProperty("m_SortingLayerID");
|
sortingLayerIDProperty = rendererSerializedObject.FindProperty("m_SortingLayerID");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ public class SkeletonRendererInspector : Editor {
|
|||||||
if(renderer != null) {
|
if(renderer != null) {
|
||||||
EditorGUI.BeginChangeCheck();
|
EditorGUI.BeginChangeCheck();
|
||||||
|
|
||||||
if(sortingLayerIDProperty != null) {
|
if(EditorGUILayoutSortingLayerField != null && sortingLayerIDProperty != null) {
|
||||||
EditorGUILayoutSortingLayerField.Invoke(null, new object[] { new GUIContent("Sorting Layer"), sortingLayerIDProperty, EditorStyles.popup } );
|
EditorGUILayoutSortingLayerField.Invoke(null, new object[] { new GUIContent("Sorting Layer"), sortingLayerIDProperty, EditorStyles.popup } );
|
||||||
} else {
|
} else {
|
||||||
renderer.sortingLayerID = EditorGUILayout.IntField("Sorting Layer ID", renderer.sortingLayerID);
|
renderer.sortingLayerID = EditorGUILayout.IntField("Sorting Layer ID", renderer.sortingLayerID);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user