public ISceneConfigurator CreateSceneConfigurator() { // if (DefaultPlatform == Platform.WinPC && System.Environment.GetCommandLineArgs().Length > 1 && System.Environment.GetCommandLineArgs()[1] == "WinVR") // DefaultPlatform = Platform.WinVR; ISceneConfigurator konfigurator = null; switch (DefaultPlatform) { case Platform.Android: konfigurator = new AndroidSceneConfigurator(); break; default: konfigurator = new AndroidSceneConfigurator(); break; } return(konfigurator); }
private void Awake() { CurrentGamePhase = GamePhase.INIT_STATE; if (Instance != null && Instance != this) { Destroy(gameObject); //This can happen when you start game from mainScene and it will be reloaded after loading bundles. Starter object could be duplicated and the duplicate must be destroyed now. } else { Instance = this; Platform = GetComponent <PlatformSelector>(); if (Platform == null) { throw new System.Exception("Brak obiektu PlatformSelector"); } _configurator = Platform.CreateSceneConfigurator(); _mainSceneRoot = null; _absManager = null; DontDestroyOnLoad(this.gameObject); } }