public override void DrawAsInspector()
        {
            base.DrawAsInspector();

            CGME.ActionConditionComparable act = (action as CGME.ActionConditionComparable);

            EditorGUILayout.BeginHorizontal();
            {
                act.Objects[0] = (CGME.SelectionSource)Display.EnumPopup(this, "Object 1", act.Objects[0]);
                if (act.Objects[0] == CGME.SelectionSource.Type)
                {
                    act.ObjectStrings[0] = Display.TextField(this, "Parent Type", act.ObjectStrings[0]);
                }
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                act.Objects[1] = (CGME.SelectionSource)Display.EnumPopup(this, "Object 2", act.Objects[1]);
                if (act.Objects[1] == CGME.SelectionSource.Type)
                {
                    act.ObjectStrings[1] = Display.TextField(this, "Parent Type", act.ObjectStrings[1]);
                }
            }
            EditorGUILayout.EndHorizontal();
        }
예제 #2
0
        // COMPARABLE -------------------------------------------

        void DisplayBody(CGME.ActionConditionComparable action)
        {
            EditorGUILayout.BeginHorizontal();
            {
                action.Objects[0] = (CGME.SelectionSource)Display.EnumPopup(Target, "Object 1", action.Objects[0]);
                if (action.Objects[0] == CGME.SelectionSource.Type)
                {
                    action.ObjectStrings[0] = Display.TextField(Target, "Parent Type", action.ObjectStrings[0]);
                }
            }
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.BeginHorizontal();
            {
                action.Objects[1] = (CGME.SelectionSource)Display.EnumPopup(Target, "Object 2", action.Objects[1]);
                if (action.Objects[1] == CGME.SelectionSource.Type)
                {
                    action.ObjectStrings[1] = Display.TextField(Target, "Parent Type", action.ObjectStrings[1]);
                }
            }
            EditorGUILayout.EndHorizontal();
        }