mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkIdentity - moved ResetStatics up
This commit is contained in:
parent
bc28022552
commit
9405e9fef6
@ -244,6 +244,16 @@ internal void HandleRemoteCall(byte componentIndex, ushort functionHash, RemoteC
|
||||
}
|
||||
}
|
||||
|
||||
// RuntimeInitializeOnLoadMethod -> fast playmode without domain reload
|
||||
// internal so it can be called from NetworkServer & NetworkClient
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
internal static void ResetStatics()
|
||||
{
|
||||
// reset ALL statics
|
||||
ResetClientStatics();
|
||||
ResetServerStatics();
|
||||
}
|
||||
|
||||
// reset only client sided statics.
|
||||
// don't touch server statics when calling StopClient in host mode.
|
||||
// https://github.com/vis2k/Mirror/issues/2954
|
||||
@ -258,16 +268,6 @@ internal static void ResetServerStatics()
|
||||
nextNetworkId = 1;
|
||||
}
|
||||
|
||||
// RuntimeInitializeOnLoadMethod -> fast playmode without domain reload
|
||||
// internal so it can be called from NetworkServer & NetworkClient
|
||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSceneLoad)]
|
||||
internal static void ResetStatics()
|
||||
{
|
||||
// reset ALL statics
|
||||
ResetClientStatics();
|
||||
ResetServerStatics();
|
||||
}
|
||||
|
||||
/// <summary>Gets the NetworkIdentity from the sceneIds dictionary with the corresponding id</summary>
|
||||
public static NetworkIdentity GetSceneIdentity(ulong id) => sceneIds[id];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user