Пример #1
0
 public static T TryGUIDThenFull <T>(this SerializationInfo info, StreamingContext context, string variableName) where T : GameObject
 {
     if (!context.GetVars().FullySerializeEverything&& info.ContainsKey(variableName + "GUID"))
     {
         return(context.GetVars().Local.GetGameObjectByGUID(Guid.Parse(info.GetString(variableName + "GUID"))) as T);
     }
     else
     {
         return(info.GetValue(variableName, typeof(T)) as T);
     }
 }