internal void ImportLegacy(List <ParameterConditionLegacy> legacyList)
        {
            for (int i = 0; i < legacyList.Count; i++)
            {
                ParameterConditionLegacy legacy = legacyList[i];

                ParameterReference parameterReference = legacy._Reference;
                if (parameterReference.type == ParameterReferenceType.Constant)
                {
                    ParameterContainerBase containerBase = parameterReference.container;
                    if (containerBase != null)
                    {
                        ParameterContainerInternal parameterContainer = containerBase.container;

                        if (parameterContainer != null)
                        {
                            if (!parameterContainer.isDeserialized)
                            {
                                // ParameterContainer has not been deserialized yet
                                parameterContainer.onAfterDeserialize += () =>
                                {
                                    ImportLegacy(legacy);
                                };
                                continue;
                            }
                        }
                    }
                }

                ImportLegacy(legacy);
            }
        }
        public void UpdateOutput(NodeGraph nodeGraph)
        {
            ParameterContainerInternal parameterContainer = nodeGraph.parameterContainer;

            if (parameterContainer == null)
            {
                return;
            }

            for (int i = 0, count = _Arguments.Count; i < count; ++i)
            {
                GraphArgument argument = _Arguments[i];

                if (!argument.isPublicGet)
                {
                    continue;
                }

                Parameter parameter = argument.parameterID != 0? parameterContainer.GetParam(argument.parameterID) : parameterContainer.GetParam(argument.parameterName);

                string invalidText = GetInvalidText(argument, parameter);
                if (!string.IsNullOrEmpty(invalidText))
                {
                    Debug.LogWarning(invalidText, nodeGraph);
                    continue;
                }

                if (!parameter.isPublicGet)
                {
                    Debug.LogWarning("Get of parameter is not public. : \"" + parameter.name + "\"", nodeGraph);
                    continue;
                }

                OutputSlotTypable outputSlot = _OutputSlots[argument.outputSlotIndex];

                if (outputSlot.dataType != parameter.valueType)
                {
                    Debug.LogWarning("The type of the parameter has been changed : \"" + argument.parameterName + "\"");
                    continue;
                }

                outputSlot.SetValue(parameter.value);
            }
        }
        public void UpdateInput(NodeGraph nodeGraph, GraphArgumentUpdateTiming updateTiming)
        {
            ParameterContainerInternal parameterContainer = nodeGraph.parameterContainer;

            if (parameterContainer == null)
            {
                return;
            }

            for (int i = 0, count = _Arguments.Count; i < count; ++i)
            {
                GraphArgument argument = _Arguments[i];

                if ((argument.updateTiming & updateTiming) == 0 ||
                    !argument.isPublicSet)
                {
                    continue;
                }

                Parameter parameter = argument.parameterID != 0? parameterContainer.GetParam(argument.parameterID) : parameterContainer.GetParam(argument.parameterName);

                string invalidText = GetInvalidText(argument, parameter);
                if (!string.IsNullOrEmpty(invalidText))
                {
                    Debug.LogWarning(invalidText, nodeGraph);
                    continue;
                }

                if (!parameter.isPublicSet)
                {
                    Debug.LogWarning("Set of parameter is not public. : \"" + parameter.name + "\"", nodeGraph);
                    continue;
                }

                switch (parameter.type)
                {
                case Parameter.Type.Int:
                {
                    FlexibleInt intParameter = _IntParameters[argument.parameterIndex];
                    parameter.intValue = intParameter.value;
                }
                break;

                case Parameter.Type.Long:
                {
                    FlexibleLong longParameter = _LongParameters[argument.parameterIndex];
                    parameter.longValue = longParameter.value;
                }
                break;

                case Parameter.Type.Float:
                {
                    FlexibleFloat floatParameter = _FloatParameters[argument.parameterIndex];
                    parameter.floatValue = floatParameter.value;
                }
                break;

                case Parameter.Type.Bool:
                {
                    FlexibleBool boolParameter = _BoolParameters[argument.parameterIndex];
                    parameter.boolValue = boolParameter.value;
                }
                break;

                case Parameter.Type.String:
                {
                    FlexibleString stringParameter = _StringParameters[argument.parameterIndex];
                    parameter.stringValue = stringParameter.value;
                }
                break;

                case Parameter.Type.Enum:
                {
                    FlexibleEnumAny enumParameter = _EnumParameters[argument.parameterIndex];
                    parameter.intValue = enumParameter.value;
                }
                break;

                case Parameter.Type.GameObject:
                {
                    FlexibleGameObject gameObjectParameter = _GameObjectParameters[argument.parameterIndex];
                    parameter.gameObjectValue = gameObjectParameter.value;
                }
                break;

                case Parameter.Type.Vector2:
                {
                    FlexibleVector2 vector2Parameter = _Vector2Parameters[argument.parameterIndex];
                    parameter.vector2Value = vector2Parameter.value;
                }
                break;

                case Parameter.Type.Vector3:
                {
                    FlexibleVector3 vector3Parameter = _Vector3Parameters[argument.parameterIndex];
                    parameter.vector3Value = vector3Parameter.value;
                }
                break;

                case Parameter.Type.Quaternion:
                {
                    FlexibleQuaternion quaternionParameter = _QuaternionParameters[argument.parameterIndex];
                    parameter.quaternionValue = quaternionParameter.value;
                }
                break;

                case Parameter.Type.Rect:
                {
                    FlexibleRect rectParameter = _RectParameters[argument.parameterIndex];
                    parameter.rectValue = rectParameter.value;
                }
                break;

                case Parameter.Type.Bounds:
                {
                    FlexibleBounds boundsParameter = _BoundsParameters[argument.parameterIndex];
                    parameter.boundsValue = boundsParameter.value;
                }
                break;

                case Parameter.Type.Color:
                {
                    FlexibleColor colorParameter = _ColorParameters[argument.parameterIndex];
                    parameter.colorValue = colorParameter.value;
                }
                break;

                case Parameter.Type.Transform:
                case Parameter.Type.RectTransform:
                case Parameter.Type.Rigidbody:
                case Parameter.Type.Rigidbody2D:
                case Parameter.Type.Component:
                {
                    FlexibleComponent componentParameter = _ComponentParameters[argument.parameterIndex];
                    parameter.objectReferenceValue = componentParameter.value;
                }
                break;

                case Parameter.Type.Variable:
                {
                    InputSlotTypable inputSlot = _InputSlots[argument.parameterIndex];
                    object           value     = null;
                    if (inputSlot.GetValue(ref value))
                    {
                        parameter.variableValue = value;
                    }
                }
                break;
                }
            }
        }