예제 #1
0
 public void OnBeforeSerialize()
 {
     VariableJSON = new DerivedComponentJsonDataRow();
     if (Variable != null)
     {
         VariableJSON.SerializedObjects     = new List <UnityEngine.Object>();
         VariableJSON.AssemblyQualifiedName = Variable.GetType().AssemblyQualifiedName;
         VariableJSON.JsonText = JSONSerializer.Serialize(Variable.GetType(), Variable, false, VariableJSON.SerializedObjects);
     }
 }
예제 #2
0
 public void OnBeforeSerialize()
 {
     if (CurrentListener != null)
     {
         ListenerJSON = new DerivedComponentJsonDataRow();
         ListenerJSON.AssemblyQualifiedName = CurrentListener.GetType().AssemblyQualifiedName;
         ListenerJSON.SerializedObjects     = new List <UnityEngine.Object>();
         ListenerJSON.JsonText = JSONSerializer.Serialize(CurrentListener.GetType(), CurrentListener,
                                                          false, ListenerJSON.SerializedObjects);
     }
     else
     {
         ListenerJSON = null;
     }
 }