// Use this for initialization void Start() { myGM = GameObject.Find("GameManager").GetComponent<GameMangerScript>(); Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(Camera.main, Vector3.left); transform.FindChild("P1Space").GetComponent<RectTransform>().position = screenPoint; }
// Use this for initialization void Start() { myGM = GameObject.Find("GameManager").GetComponent <GameMangerScript>(); Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint(Camera.main, Vector3.left); transform.FindChild("P1Space").GetComponent <RectTransform>().position = screenPoint; }
private void Start() { Manager = this; if (playerPrefab == null) { Debug.LogError("No player prefab provided", this); } else { if (PlayerManager.localPlayerInstance == null) { Debug.Log("Instatiating player for " + SceneManager.GetActiveScene().name); PhotonNetwork.Instantiate(this.playerPrefab.name, new Vector3(0f, 5f, 0f), Quaternion.identity, 0); } else { Debug.Log("Do not need to load this player prefab, already exists"); } } }
// Use this for initialization void Start() { MainScript = GameObject.Find("GameManager").GetComponent <GameMangerScript> (); }
// Use this for initialization void Start() { MainScript = GameObject.Find ("GameManager").GetComponent<GameMangerScript> (); }
private void Awake() { instance = this; }