void Start() { if (instance != null) { Destroy(this); } else { instance = this; debugScreen = GameObject.Find("Debug Screen"); world = GameObject.Find("World").GetComponent <World>(); screen = DebugScreen.GetInstance(); player = GameObject.Find("Player"); settingMenu = GetComponent <SettingMenu>(); if (MainScene == SceneManager.GetActiveScene().buildIndex) { inputController = PlayerInputController.GetInstance(); } else { inputController = EditInputController.GetInstance(); } WorldInit(); } }
private void Start() { if (instance != null) { Destroy(this); } else { instance = this; controller = GameObject.Find("Player").GetComponent <EditController>(); crosshair = GameObject.Find("Crosshair"); } }