/// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.PhysicsMaterial2D physicsMaterial2D = (UnityEngine.PhysicsMaterial2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "bounciness":
                    physicsMaterial2D.bounciness = reader.ReadProperty <System.Single> ();
                    break;

                case "friction":
                    physicsMaterial2D.friction = reader.ReadProperty <System.Single> ();
                    break;

                case "name":
                    physicsMaterial2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    physicsMaterial2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.RaycastHit2D raycastHit2D = new UnityEngine.RaycastHit2D();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "centroid":
                    raycastHit2D.centroid = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "point":
                    raycastHit2D.point = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "normal":
                    raycastHit2D.normal = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "distance":
                    raycastHit2D.distance = reader.ReadProperty <System.Single> ();
                    break;

                case "fraction":
                    raycastHit2D.fraction = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(raycastHit2D);
        }
Пример #3
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.AnimatorOverrideController animatorOverrideController = (UnityEngine.AnimatorOverrideController)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "runtimeAnimatorController":
                    if (animatorOverrideController.runtimeAnimatorController == null)
                    {
                        animatorOverrideController.runtimeAnimatorController = reader.ReadProperty <UnityEngine.RuntimeAnimatorController> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.RuntimeAnimatorController> (animatorOverrideController.runtimeAnimatorController);
                    }
                    break;

                case "name":
                    animatorOverrideController.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    animatorOverrideController.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #4
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.Font font = (UnityEngine.Font)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "fontNames":
                    font.fontNames = reader.ReadProperty <System.String[]>();
                    break;

                case "characterInfo":
                    font.characterInfo = reader.ReadProperty <UnityEngine.CharacterInfo[]>();
                    break;

                case "name":
                    font.name = reader.ReadProperty <System.String>();
                    break;

                case "hideFlags":
                    font.hideFlags = reader.ReadProperty <UnityEngine.HideFlags>();
                    break;
                }
            }
        }
Пример #5
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.AnchoredJoint2D anchoredJoint2D = (UnityEngine.AnchoredJoint2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "anchor":
                    anchoredJoint2D.anchor = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "connectedAnchor":
                    anchoredJoint2D.connectedAnchor = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "autoConfigureConnectedAnchor":
                    anchoredJoint2D.autoConfigureConnectedAnchor = reader.ReadProperty <System.Boolean> ();
                    break;

                case "connectedBody":
                    if (anchoredJoint2D.connectedBody == null)
                    {
                        anchoredJoint2D.connectedBody = reader.ReadProperty <UnityEngine.Rigidbody2D> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.Rigidbody2D> (anchoredJoint2D.connectedBody);
                    }
                    break;

                case "enableCollision":
                    anchoredJoint2D.enableCollision = reader.ReadProperty <System.Boolean> ();
                    break;

                case "breakForce":
                    anchoredJoint2D.breakForce = reader.ReadProperty <System.Single> ();
                    break;

                case "breakTorque":
                    anchoredJoint2D.breakTorque = reader.ReadProperty <System.Single> ();
                    break;

                case "enabled":
                    anchoredJoint2D.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    anchoredJoint2D.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    anchoredJoint2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    anchoredJoint2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #6
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.Color32 color32 = new UnityEngine.Color32();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "r":
                    color32.r = reader.ReadProperty <System.Byte> ();
                    break;

                case "g":
                    color32.g = reader.ReadProperty <System.Byte> ();
                    break;

                case "b":
                    color32.b = reader.ReadProperty <System.Byte> ();
                    break;

                case "a":
                    color32.a = reader.ReadProperty <System.Byte> ();
                    break;
                }
            }
            return(color32);
        }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.Tree tree = (UnityEngine.Tree)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "data":
                    Type dataType = Type.GetType(reader.ReadProperty <System.String> ());
                    if (tree.data == null)
                    {
                        tree.data = (UnityEngine.ScriptableObject)reader.ReadProperty(dataType);
                    }
                    else
                    {
                        reader.ReadIntoProperty(tree.data);
                    }
                    break;

                case "tag":
                    tree.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    tree.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    tree.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.Vector4 vector4 = new UnityEngine.Vector4();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "x":
                    vector4.x = reader.ReadProperty <System.Single> ();
                    break;

                case "y":
                    vector4.y = reader.ReadProperty <System.Single> ();
                    break;

                case "z":
                    vector4.z = reader.ReadProperty <System.Single> ();
                    break;

                case "w":
                    vector4.w = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(vector4);
        }
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.UI.ColorBlock colorBlock = new UnityEngine.UI.ColorBlock();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "normalColor":
                    colorBlock.normalColor = reader.ReadProperty <UnityEngine.Color> ();
                    break;

                case "highlightedColor":
                    colorBlock.highlightedColor = reader.ReadProperty <UnityEngine.Color> ();
                    break;

                case "pressedColor":
                    colorBlock.pressedColor = reader.ReadProperty <UnityEngine.Color> ();
                    break;

                case "disabledColor":
                    colorBlock.disabledColor = reader.ReadProperty <UnityEngine.Color> ();
                    break;

                case "colorMultiplier":
                    colorBlock.colorMultiplier = reader.ReadProperty <System.Single> ();
                    break;

                case "fadeDuration":
                    colorBlock.fadeDuration = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(colorBlock);
        }
Пример #10
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.Effector2D effector2D = (UnityEngine.Effector2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "useColliderMask":
                    effector2D.useColliderMask = reader.ReadProperty <System.Boolean> ();
                    break;

                case "colliderMask":
                    effector2D.colliderMask = reader.ReadProperty <System.Int32> ();
                    break;

                case "enabled":
                    effector2D.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    effector2D.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    effector2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    effector2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.Audio.AudioMixer audioMixer = (UnityEngine.Audio.AudioMixer)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "outputAudioMixerGroup":
                    if (audioMixer.outputAudioMixerGroup == null)
                    {
                        audioMixer.outputAudioMixerGroup = reader.ReadProperty <UnityEngine.Audio.AudioMixerGroup> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.Audio.AudioMixerGroup> (audioMixer.outputAudioMixerGroup);
                    }
                    break;

                case "updateMode":
                    audioMixer.updateMode = reader.ReadProperty <UnityEngine.Audio.AudioMixerUpdateMode> ();
                    break;

                case "name":
                    audioMixer.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    audioMixer.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #12
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.OcclusionPortal occlusionPortal = (UnityEngine.OcclusionPortal)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "open":
                    occlusionPortal.open = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    occlusionPortal.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    occlusionPortal.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    occlusionPortal.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #13
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.ParticleSystem.EmissionModule emissionModule = new UnityEngine.ParticleSystem.EmissionModule();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "enabled":
                    emissionModule.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "rateOverTime":
                    emissionModule.rateOverTime = reader.ReadProperty <UnityEngine.ParticleSystem.MinMaxCurve> ();
                    break;

                case "rateOverTimeMultiplier":
                    emissionModule.rateOverTimeMultiplier = reader.ReadProperty <System.Single> ();
                    break;

                case "rateOverDistance":
                    emissionModule.rateOverDistance = reader.ReadProperty <UnityEngine.ParticleSystem.MinMaxCurve> ();
                    break;

                case "rateOverDistanceMultiplier":
                    emissionModule.rateOverDistanceMultiplier = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(emissionModule);
        }
Пример #14
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.AudioConfiguration audioConfiguration = new UnityEngine.AudioConfiguration();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "speakerMode":
                    audioConfiguration.speakerMode = reader.ReadProperty <UnityEngine.AudioSpeakerMode> ();
                    break;

                case "dspBufferSize":
                    audioConfiguration.dspBufferSize = reader.ReadProperty <System.Int32> ();
                    break;

                case "sampleRate":
                    audioConfiguration.sampleRate = reader.ReadProperty <System.Int32> ();
                    break;

                case "numRealVoices":
                    audioConfiguration.numRealVoices = reader.ReadProperty <System.Int32> ();
                    break;

                case "numVirtualVoices":
                    audioConfiguration.numVirtualVoices = reader.ReadProperty <System.Int32> ();
                    break;
                }
            }
            return(audioConfiguration);
        }
Пример #15
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.UI.ToggleGroup toggleGroup = (UnityEngine.UI.ToggleGroup)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "allowSwitchOff":
                    toggleGroup.allowSwitchOff = reader.ReadProperty <System.Boolean> ();
                    break;

                case "useGUILayout":
                    toggleGroup.useGUILayout = reader.ReadProperty <System.Boolean> ();
                    break;

                case "enabled":
                    toggleGroup.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    toggleGroup.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    toggleGroup.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    toggleGroup.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.RaycastHit raycastHit = new UnityEngine.RaycastHit();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "point":
                    raycastHit.point = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "normal":
                    raycastHit.normal = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "barycentricCoordinate":
                    raycastHit.barycentricCoordinate = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "distance":
                    raycastHit.distance = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(raycastHit);
        }
Пример #17
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.LightProbeGroup lightProbeGroup = (UnityEngine.LightProbeGroup)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "probePositions":
                    lightProbeGroup.probePositions = reader.ReadProperty <UnityEngine.Vector3[]> ();
                    break;

                case "enabled":
                    lightProbeGroup.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    lightProbeGroup.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    lightProbeGroup.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    lightProbeGroup.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #18
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.Keyframe keyframe = new UnityEngine.Keyframe();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "time":
                    keyframe.time = reader.ReadProperty <System.Single>();
                    break;

                case "value":
                    keyframe.value = reader.ReadProperty <System.Single>();
                    break;

                case "inTangent":
                    keyframe.inTangent = reader.ReadProperty <System.Single>();
                    break;

                case "outTangent":
                    keyframe.outTangent = reader.ReadProperty <System.Single>();
                    break;

                case "tangentMode":     // Obsolote
                    reader.ReadProperty <System.Int32>();
                    break;
                }
            }
            return(keyframe);
        }
Пример #19
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.CircleCollider2D circleCollider2D = (UnityEngine.CircleCollider2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "radius":
                    circleCollider2D.radius = reader.ReadProperty <System.Single> ();
                    break;

                case "density":
                    circleCollider2D.density = reader.ReadProperty <System.Single> ();
                    break;

                case "isTrigger":
                    circleCollider2D.isTrigger = reader.ReadProperty <System.Boolean> ();
                    break;

                case "usedByEffector":
                    circleCollider2D.usedByEffector = reader.ReadProperty <System.Boolean> ();
                    break;

                case "usedByComposite":
                    circleCollider2D.usedByComposite = reader.ReadProperty <System.Boolean> ();
                    break;

                case "offset":
                    circleCollider2D.offset = reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "sharedMaterial":
                    if (circleCollider2D.sharedMaterial == null)
                    {
                        circleCollider2D.sharedMaterial = reader.ReadProperty <UnityEngine.PhysicsMaterial2D> ();
                    }
                    else
                    {
                        reader.ReadIntoProperty <UnityEngine.PhysicsMaterial2D> (circleCollider2D.sharedMaterial);
                    }
                    break;

                case "enabled":
                    circleCollider2D.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    circleCollider2D.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    circleCollider2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    circleCollider2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #20
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.AudioClip audioClip = (UnityEngine.AudioClip)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "data":
                    audioClip.SetData(reader.ReadProperty <float[]>(), 0);
                    break;

                case "channels":
                    reader.ReadProperty <System.Int32>();
                    break;

                case "frequency":
                    reader.ReadProperty <System.Int32>();
                    break;

                case "name":
                    audioClip.name = reader.ReadProperty <System.String>();
                    break;

                case "hideFlags":
                    audioClip.hideFlags = reader.ReadProperty <UnityEngine.HideFlags>();
                    break;
                }
            }
        }
Пример #21
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.AudioListener audioListener = (UnityEngine.AudioListener)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "velocityUpdateMode":
                    audioListener.velocityUpdateMode = reader.ReadProperty <UnityEngine.AudioVelocityUpdateMode> ();
                    break;

                case "enabled":
                    audioListener.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    audioListener.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    audioListener.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    audioListener.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.EventSystems.EventTrigger eventTrigger = (UnityEngine.EventSystems.EventTrigger)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "triggers":
                    eventTrigger.triggers = reader.ReadProperty <System.Collections.Generic.List <UnityEngine.EventSystems.EventTrigger.Entry> > ();
                    break;

                case "useGUILayout":
                    eventTrigger.useGUILayout = reader.ReadProperty <System.Boolean> ();
                    break;

                case "enabled":
                    eventTrigger.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    eventTrigger.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    eventTrigger.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    eventTrigger.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #23
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.FlareLayer flareLayer = (UnityEngine.FlareLayer)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "enabled":
                    flareLayer.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    flareLayer.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    flareLayer.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    flareLayer.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.EventSystems.PhysicsRaycaster physicsRaycaster = (UnityEngine.EventSystems.PhysicsRaycaster)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "eventMask":
                    physicsRaycaster.eventMask = reader.ReadProperty <UnityEngine.LayerMask> ();
                    break;

                case "useGUILayout":
                    physicsRaycaster.useGUILayout = reader.ReadProperty <System.Boolean> ();
                    break;

                case "enabled":
                    physicsRaycaster.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    physicsRaycaster.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    physicsRaycaster.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    physicsRaycaster.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.UI.AnimationTriggers animationTriggers = (UnityEngine.UI.AnimationTriggers)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "normalTrigger":
                    animationTriggers.normalTrigger = reader.ReadProperty <System.String> ();
                    break;

                case "highlightedTrigger":
                    animationTriggers.highlightedTrigger = reader.ReadProperty <System.String> ();
                    break;

                case "pressedTrigger":
                    animationTriggers.pressedTrigger = reader.ReadProperty <System.String> ();
                    break;

                case "disabledTrigger":
                    animationTriggers.disabledTrigger = reader.ReadProperty <System.String> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.Bounds bounds = new UnityEngine.Bounds();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "center":
                    bounds.center = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "size":
                    bounds.size = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "extents":
                    bounds.extents = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "min":
                    bounds.min = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;

                case "max":
                    bounds.max = reader.ReadProperty <UnityEngine.Vector3> ();
                    break;
                }
            }
            return(bounds);
        }
Пример #27
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.UI.RectMask2D rectMask2D = (UnityEngine.UI.RectMask2D)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "useGUILayout":
                    rectMask2D.useGUILayout = reader.ReadProperty <System.Boolean> ();
                    break;

                case "enabled":
                    rectMask2D.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    rectMask2D.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    rectMask2D.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    rectMask2D.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
Пример #28
0
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.ParticleSystem.TriggerModule triggerModule = new UnityEngine.ParticleSystem.TriggerModule();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "enabled":
                    triggerModule.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "inside":
                    triggerModule.inside = reader.ReadProperty <UnityEngine.ParticleSystemOverlapAction> ();
                    break;

                case "outside":
                    triggerModule.outside = reader.ReadProperty <UnityEngine.ParticleSystemOverlapAction> ();
                    break;

                case "enter":
                    triggerModule.enter = reader.ReadProperty <UnityEngine.ParticleSystemOverlapAction> ();
                    break;

                case "exit":
                    triggerModule.exit = reader.ReadProperty <UnityEngine.ParticleSystemOverlapAction> ();
                    break;

                case "radiusScale":
                    triggerModule.radiusScale = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(triggerModule);
        }
Пример #29
0
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.Sprite sprite = (UnityEngine.Sprite)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "texture":
                    Texture2D texture = reader.ReadProperty <UnityEngine.Texture2D> ();
                    sprite.texture.LoadRawTextureData(texture.GetRawTextureData());
                    break;

                case "rect":
                    reader.ReadProperty <UnityEngine.Rect> ();
                    break;

                case "pivot":
                    reader.ReadProperty <UnityEngine.Vector2> ();
                    break;

                case "pixelsPerUnit":
                    reader.ReadProperty <float> ();
                    break;

                case "name":
                    sprite.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    sprite.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
        /// <summary>
        /// Read the data using the reader.
        /// </summary>
        /// <param name="reader">Reader.</param>
        public override object Read(ISaveGameReader reader)
        {
            UnityEngine.JointLimits jointLimits = new UnityEngine.JointLimits();
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "min":
                    jointLimits.min = reader.ReadProperty <System.Single> ();
                    break;

                case "max":
                    jointLimits.max = reader.ReadProperty <System.Single> ();
                    break;

                case "bounciness":
                    jointLimits.bounciness = reader.ReadProperty <System.Single> ();
                    break;

                case "bounceMinVelocity":
                    jointLimits.bounceMinVelocity = reader.ReadProperty <System.Single> ();
                    break;

                case "contactDistance":
                    jointLimits.contactDistance = reader.ReadProperty <System.Single> ();
                    break;
                }
            }
            return(jointLimits);
        }