/// <summary> /// MonoBehaviour method called on GameObject by Unity during initialization phase. /// </summary> void Start() { DepenencyInjector.SetupInjection(); this.SetUserName(); discordApi = DepenencyInjector.Resolve <IDiscordApi>(); progressLabel.SetActive(false); controlPanel.SetActive(true); }
public void Start() { DepenencyInjector.SetupInjection(); if (playerPrefab == null) { Debug.LogError("<Color=Red><a>Missing</a></Color> playerPrefab Reference. Please set it up in GameObject 'Game Manager'", this); } else { Debug.Log("We are Instantiating LocalPlayer from " + Application.loadedLevelName); if (PlayerMovementManager.LocalPlayerInstance == null) { Debug.Log("We are Instantiating LocalPlayer from " + Application.loadedLevelName); // we're in a room. spawn a character for the local player. it gets synced by using PhotonNetwork.Instantiate GameObject go = PhotonNetwork.Instantiate(this.playerPrefab.name, new Vector3(0f, 5f, 0f), Quaternion.identity, 0); } else { Debug.Log("Ignoring scene load for " + Application.loadedLevelName); } normalCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); overheadCamera = GameObject.FindGameObjectWithTag("OverheadCamera").GetComponent <Camera>(); } }