mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
refactor: handlers dictionaries should be readonly
This commit is contained in:
parent
9e3ecc1ced
commit
d08dd0328e
@ -52,8 +52,8 @@ public static class ClientScene
|
||||
public static Dictionary<ulong, NetworkIdentity> spawnableObjects;
|
||||
|
||||
// spawn handlers
|
||||
static Dictionary<Guid, SpawnDelegate> spawnHandlers = new Dictionary<Guid, SpawnDelegate>();
|
||||
static Dictionary<Guid, UnSpawnDelegate> unspawnHandlers = new Dictionary<Guid, UnSpawnDelegate>();
|
||||
static readonly Dictionary<Guid, SpawnDelegate> spawnHandlers = new Dictionary<Guid, SpawnDelegate>();
|
||||
static readonly Dictionary<Guid, UnSpawnDelegate> unspawnHandlers = new Dictionary<Guid, UnSpawnDelegate>();
|
||||
|
||||
// this is never called, and if we do call it in NetworkClient.Shutdown
|
||||
// then the client's player object won't be removed after disconnecting!
|
||||
|
Loading…
Reference in New Issue
Block a user