Exemplo n.º 1
0
        public override void DrawInspectorGrabInfo()
        {
#if UNITY_EDITOR
            throwConfirm = (AttackDefinition)EditorGUILayout.ObjectField("Throw Confirm Attack",
                                                                         throwConfirm,
                                                                         typeof(AttackDefinition), false);
#endif
        }
        public static void Init(AttackDefinition attack)
        {
            AttackDefinitionEditorWindow window =
                ScriptableObject.CreateInstance <AttackDefinitionEditorWindow>();

            window.attack = attack;
            window.Show();
        }
        public static void Init(AttackDefinition attack)
        {
            AttackDefinitionEditorWindow window =
                (AttackDefinitionEditorWindow)EditorWindow.GetWindow(typeof(AttackDefinitionEditorWindow));

            window.attack = attack;
            window.Show();
        }
        protected virtual void OnGUI()
        {
            attack = (AttackDefinition)EditorGUILayout.ObjectField("Attack", attack, typeof(AttackDefinition), false);

            EditorGUILayout.BeginHorizontal();
            DrawMenuBar();
            EditorGUILayout.EndHorizontal();
            DrawMenu();

            if (GUI.changed)
            {
                EditorUtility.SetDirty(attack);
            }
        }