|
|
|
@ -154,6 +154,7 @@ namespace Fungus
|
|
|
|
|
serializedObject.ApplyModifiedProperties(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static public void ObjectField<T>(SerializedProperty property, GUIContent label, GUIContent nullLabel, List<T> objectList) where T : Object |
|
|
|
|
{ |
|
|
|
|
if (property == null) |
|
|
|
@ -172,10 +173,12 @@ namespace Fungus
|
|
|
|
|
if (objectList[i] == null) continue; |
|
|
|
|
objectNames.Add(new GUIContent(objectList[i].name)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (selectedObject == objectList[i]) |
|
|
|
|
{ |
|
|
|
|
selectedIndex = i + 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
T result; |
|
|
|
@ -193,6 +196,7 @@ namespace Fungus
|
|
|
|
|
property.objectReferenceValue = result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* When modifying custom editor code you can occasionally end up with orphaned editor instances. |
|
|
|
|
* When this happens, you'll get a null exception error every time the scene serializes / deserialized. |
|
|
|
|