public StateInfo(object stateId, ScriptableState stateObject)
        {
            _serializedStateId = GenericTypeSerializer.Serialize(stateId);

            _stateIdTypeFullName = stateId.GetType().FullName;

            _stateObject = stateObject;
        }
        internal void AddState(object stateId, ScriptableState stateObject)
        {
            if (stateId == null)
            {
                return;
            }

            if (StateIdType != stateId.GetType())
            {
                return;
            }

            if (ContainsState(stateId))
            {
                return;
            }

            _states.Add(new StateInfo(stateId, stateObject));

            if (_states.Count == 1)
            {
                SetInitialState(stateId);
            }
        }