Esempio n. 1
0
 public StdEncoder Add(string tag, UnityEngine.Object obj, ISTD_SerializeNestedReferences referencesKeeper)
 {
     if (referencesKeeper != null && obj)
     {
         int ind = referencesKeeper.GetISTDreferenceIndex(obj);
         if (ind != -1)
         {
             Add(tag, ind);
         }
     }
     return(this);
 }
Esempio n. 2
0
        public StdEncoder Add_References <T>(string tag, List <T> objs, ISTD_SerializeNestedReferences referencesKeeper) where T : UnityEngine.Object
        {
            if (referencesKeeper != null && objs != null)
            {
                var indxs = new List <int>();

                foreach (var o in objs)
                {
                    indxs.Add(referencesKeeper.GetISTDreferenceIndex(o));
                }

                Add(tag, indxs);
            }
            return(this);
        }