Example #1
0
        /// <summary>
        /// Called by the replay system when the variable should be deserialized.
        /// </summary>
        /// <param name="state">The <see cref="ReplayState"/> to deserialize the data from</param>
        public void OnReplayDeserialize(ReplayState state)
        {
            try
            {
                // Update interpolation
                object last = Value;

                // Read the current field value
                object next = state.TryReadObject();

                // Make sure we read a valid value
                if (next != null)
                {
                    // Assign the actual value
                    Value = next;

                    // Prepare interpolation values
                    UpdateValueRange(last, next);
                }
            }
            catch { }
        }