mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
OnClientConnect: explain clientLoadedScene flag
This commit is contained in:
parent
5f655098f1
commit
f7500a2a82
@ -1277,6 +1277,9 @@ public virtual void OnServerSceneChanged(string sceneName) { }
|
||||
/// <param name="conn">Connection to the server.</param>
|
||||
public virtual void OnClientConnect(NetworkConnection conn)
|
||||
{
|
||||
// OnClientConnect by default calls AddPlayer but it should not do
|
||||
// that when we have online/offline scenes. so we need the
|
||||
// clientLoadedScene flag to prevent it.
|
||||
if (!clientLoadedScene)
|
||||
{
|
||||
// Ready/AddPlayer is usually triggered by a scene load completing. if no scene was loaded, then Ready/AddPlayer it here instead.
|
||||
|
Loading…
Reference in New Issue
Block a user