Ejemplo n.º 1
0
 public void Deserialize()
 {
     if (string.IsNullOrEmpty(this.storedType))
     {
         Debug.LogError("The variable's type is not set: " + this.name);
     }
     else
     {
         Type type = Type.GetType(this.storedType);
         if (type != null)
         {
             this.valueHandler = (plyVarValueHandler)Activator.CreateInstance(type);
             if (this.valueHandler != null)
             {
                 this.valueHandler.DecodeValues(this, this.storedData);
             }
             else
             {
                 Debug.LogError("Error encountered while trying to create plyVar: " + this.storedType);
             }
         }
         else
         {
             Debug.LogError("Error encountered while deserializing plyVar. Type not found: " + this.storedType);
         }
     }
 }
Ejemplo n.º 2
0
        public void ClearValue()
        {
            plyVarValueHandler obj = this.valueHandler;

            if (obj != null)
            {
                obj.ClearValue(this);
            }
        }