コード例 #1
0
 protected void Awake()
 {
     if (Application.isPlaying)
     {
         sceneSemaphore = SceneSemaphore.Create(sceneToLoad);
     }
 }
コード例 #2
0
 public static SceneSemaphore Create(SceneReference sceneToLoad)
 {
     if (allSemaphores.ContainsKey(sceneToLoad.ScenePath))
     {
         return(allSemaphores[sceneToLoad.ScenePath]);
     }
     else
     {
         var sceneSemaphore = new SceneSemaphore(sceneToLoad);
         allSemaphores.Add(sceneToLoad.ScenePath, sceneSemaphore);
         return(sceneSemaphore);
     }
 }