Hi,
I was trying to code a simple multiplayer for my game. I got stuck when setting the correct camera for a joined player. When the client player joins my host player the cameras get switched. Camera A for player A is now snapped to player B and vice versa. Here is my code for the player after the prefab:
Camera problem when client joins
I was trying to code a simple multiplayer for my game. I got stuck when setting the correct camera for a joined player. When the client player joins my host player the cameras get switched. Camera A for player A is now snapped to player B and vice versa. Here is my code for the player after the prefab:
Code (CSharp):
- using UnityEngine;
- using UnityEngine.Networking;
- using UnityEngine.UI;
- public class PlayerSetup : NetworkBehaviour {
- int counter;
- Camera...
Camera problem when client joins