示例#1
0
 public static KeepObjectBetweenScenes GetInList(KeepObjectBetweenScenes current)
 {
     foreach (var item in listDontDestroyObjects)
     {
         if (item.gameObject.CompareTag(current.gameObject.tag) && item.gameObject.name == current.gameObject.name)
         {
             return(item);
         }
     }
     return(null);
 }
示例#2
0
 public static void SetInList(KeepObjectBetweenScenes current)
 {
     listDontDestroyObjects.Add(current);
 }