예제 #1
0
        public bool CheckForSerialization(bool force, BehaviorSource behaviorSource = null)
        {
            bool flag = (behaviorSource == null) ? this.m_HasSerialized : behaviorSource.m_HasSerialized;

            if (!flag || force)
            {
                if (behaviorSource != null)
                {
                    behaviorSource.m_HasSerialized = true;
                }
                else
                {
                    this.m_HasSerialized = true;
                }
                if (this.m_TaskData != null && !string.IsNullOrEmpty(this.m_TaskData.JSONSerialization))
                {
                    JSONDeserialization.Load(this.m_TaskData, (behaviorSource != null) ? behaviorSource : this);
                }
                else
                {
                    BinaryDeserialization.Load(this.m_TaskData, (behaviorSource != null) ? behaviorSource : this);
                }
                return(true);
            }
            return(false);
        }
예제 #2
0
 public void CheckForSerialization(bool force)
 {
     if (force || this.m_Variables == null || (this.m_Variables.Count > 0 && this.m_Variables[0] == null))
     {
         if (this.VariableData != null && !string.IsNullOrEmpty(this.VariableData.JSONSerialization))
         {
             JSONDeserialization.Load(this.VariableData.JSONSerialization, this, this.m_Version);
         }
         else
         {
             BinaryDeserialization.Load(this, this.m_Version);
         }
     }
 }