private void InitializeNetworkedItems() { if (testingOffline) //This is just to find a player when testing in offline scenes, etc. { FPSMouseLookController fmlc = FindObjectOfType <FPSMouseLookController>(); if (fmlc != null) { localPlayer = fmlc.gameObject; Debug.LogWarning("USING PLAYER FOUND IN SCENE, NOT FROM GAME MANAGER. FIX NOT IN OFFLINE TEST MODE."); } } else { if (GameManager.Instance == null) { return; } localPlayer = GameManager.Instance.LocalPlayer; if (localPlayer != null) { localPlayerConnection = localPlayer.GetComponent <NetworkPlayerConnection>(); } } }
// Use this for initialization private void Awake() { m_MovementController = GetComponent <FPSMouseLookController>(); }