Editor.DrawDefaultInspectorfunction DrawDefaultInspector () : booleanDescriptionDraw the built-in inspector. Call this function from inside OnInspectorGUI method to draw the automatic inspector. It is useful you don't want to redo the entire inspector, but you want to add a few buttons to it. See Also: OnInspectorGUI // This example shows a custom inspector for an
// object "MyPlayerEditor", which has two variables, vel (velocity) and ammo. @CustomEditor(MyPlayerEditor) class MyPlayerEditor extends Editor { function OnInspectorGUI() { EditorGUILayout.LabelField ("Some help", "Some other text"); EditorGUILayout.BeginHorizontal (); EditorGUILayout.PrefixLabel ("Speed"); target.vel = EditorGUILayout.Slider (target.vel, 0, 100); EditorGUILayout.EndHorizontal (); // Show default inspector property editor DrawDefaultInspector (); } } |
