Created
January 11, 2017 11:54
-
-
Save Sacristan/a00e55aa194800604ef8ce4d52f8380c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is roughly what DrawDefaultInspector() does: | |
override def OnInspectorGUI(): | |
serializedObject.Update() | |
EditorGUIUtility.LookLikeInspector() | |
myIterator = serializedObject.FindProperty("myArrayField") | |
while true: | |
myRect = GUILayoutUtility.GetRect(0f, 16f); | |
showChildren = EditorGUI.PropertyField(myRect, myIterator) | |
break unless myIterator.NextVisible(showChildren) | |
serializedObject.ApplyModifiedProperties() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment