Ejemplo n.º 1
0
        //popup gui, TODO: add code to separate behaviour into categories, probably use Attributes
        public override void OnGUI(Rect rect)
        {
            behaviour = types[EditorGUILayout.Popup("New Child Type:", types.IndexOf(behaviour), types.Select(x => x.Name).ToArray())]; //list all types and select one

            if (GUILayout.Button("Add Behaviour"))
            {
                s.AddBehaviour(behaviour);
                editorWindow.Close();
            }
        }