/**
         * <summary>Creates a new instance of the 'Object: Check visibility' Action</summary>
         * <param name = "objectToAffect">The object to check</param>
         * <param name = "visibilityCheck">The visibility state to query</param>
         * <returns>The generated Action</returns>
         */
        public static ActionVisibleCheck CreateNew(GameObject objectToCheck, CheckVisState visibilityToCheck)
        {
            ActionVisibleCheck newAction = (ActionVisibleCheck)CreateInstance <ActionVisibleCheck>();

            newAction.obToAffect    = objectToCheck;
            newAction.checkVisState = visibilityToCheck;
            return(newAction);
        }
        public override void ShowGUI(List <ActionParameter> parameters)
        {
            parameterID = Action.ChooseParameterGUI("Object to check:", parameters, parameterID, ParameterType.GameObject);
            if (parameterID >= 0)
            {
                constantID = 0;
                obToAffect = null;
            }
            else
            {
                obToAffect = (GameObject)EditorGUILayout.ObjectField("Object to check:", obToAffect, typeof(GameObject), true);

                constantID = FieldToID(obToAffect, constantID);
                obToAffect = IDToField(obToAffect, constantID, false);
            }

            checkVisState = (CheckVisState)EditorGUILayout.EnumPopup("Visibility to check:", checkVisState);
        }
        public override void ShowGUI(List<ActionParameter> parameters)
        {
            parameterID = Action.ChooseParameterGUI ("Object to check:", parameters, parameterID, ParameterType.GameObject);
            if (parameterID >= 0)
            {
                constantID = 0;
                obToAffect = null;
            }
            else
            {
                obToAffect = (GameObject) EditorGUILayout.ObjectField ("Object to check:", obToAffect, typeof (GameObject), true);

                constantID = FieldToID (obToAffect, constantID);
                obToAffect = IDToField (obToAffect, constantID, false);
            }

            checkVisState = (CheckVisState) EditorGUILayout.EnumPopup ("Visibility to check:", checkVisState);

            AfterRunningOption ();
        }