Hello, I was searching around for about three days how to force a client to load the same map as the server has, I found something about using [RPC] (I’m using c#) but that’s not a way in my opinion, Is there something like getting a variable (string mapName) from server? Just remember that I have two different scenes so I can’t really use RPC because it creates me issues like “View ID AllocatedID: 4 not found during lookup. Strange behaviour may occur” etc.
This script is placed on every player character you want to be able to change scenes. Then set any game object with the tag you want and the name of your map and walk up to it and hit “E” on it either by server or client and bam you and your friend are at the next scene. It takes in the name of a gameObject with the proper tag by raycast then throws it to a [command] to tell the server to change the scene on all clients. [ClientRpc]. Hope it helps.