- Home /
Question by
Cheetoturkey · May 27, 2014 at 12:28 AM ·
editorclassescustomeditor
How to make classes show in a custom editor?
Hello How would i acces a class in a custom editor? for example if have this in one script
[System.Serializable]
public class Booleans
{
public bool Wanders;
public bool UsesWaypoints;
public bool Friendly;
public bool Shoots;
}
then in the editor script how would i make that show up? in a normal script it would be
public Booleans Statements;
Comment
Answer by MikeNewall · May 27, 2014 at 12:40 AM
Call DrawDefaultInspector() inside of OnInspectorGUI when you override it.
http://docs.unity3d.com/Documentation/ScriptReference/Editor.DrawDefaultInspector.html
http://docs.unity3d.com/Documentation/ScriptReference/Editor.OnInspectorGUI.html
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Too many bugs 0 Answers
Class inheriting Runtime Classes 1 Answer
DrawDefaultInspector crash 1 Answer
Access serialized field in custom editor 2 Answers