Esempio n. 1
0
 public void Execute(Console console, params string[] args)
 {
     if (args.Length == 0)
     {
         console.Syntax(Syntax);
         return;
     }
     if (CommandUtil.IsOptionSet("-s", args) || CommandUtil.GetNumSetOptions(args) == 0)
     {
         SceneManager.LoadScene(args[0], LoadSceneMode.Single);
     }
     else if (CommandUtil.IsOptionSet("-a", args))
     {
         SceneManager.LoadScene(args[0], LoadSceneMode.Additive);
     }
 }
Esempio n. 2
0
 public void Execute(Console console, params string[] args)
 {
     if (CommandUtil.IsOptionSet("-b", args))
     {
         for (int i = 0; i < SceneManager.sceneCountInBuildSettings; i++)
         {
             console.Log($"{i} - {System.IO.Path.GetFileNameWithoutExtension(SceneUtility.GetScenePathByBuildIndex(i))}");
         }
     }
     else if (CommandUtil.IsOptionSet("-l", args) || CommandUtil.GetNumSetOptions(args) == 0)
     {
         for (int i = 0; i < SceneManager.sceneCount; i++)
         {
             console.Log($"{i} - {SceneManager.GetSceneAt(i).name}");
         }
     }
 }