mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +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");
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ public class SkeletonRendererInspector : Editor {
|
||||
if(renderer != null) {
|
||||
EditorGUI.BeginChangeCheck();
|
||||
|
||||
if(sortingLayerIDProperty != null) {
|
||||
if(EditorGUILayoutSortingLayerField != null && sortingLayerIDProperty != null) {
|
||||
EditorGUILayoutSortingLayerField.Invoke(null, new object[] { new GUIContent("Sorting Layer"), sortingLayerIDProperty, EditorStyles.popup } );
|
||||
} else {
|
||||
renderer.sortingLayerID = EditorGUILayout.IntField("Sorting Layer ID", renderer.sortingLayerID);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user