mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(NetworkRoomManagerExt): Simplified singleton
This commit is contained in:
parent
a322f009c6
commit
1430027e99
@ -14,17 +14,7 @@ public class NetworkRoomManagerExt : NetworkRoomManager
|
|||||||
[Tooltip("Reward Prefab for the Spawner")]
|
[Tooltip("Reward Prefab for the Spawner")]
|
||||||
public GameObject rewardPrefab;
|
public GameObject rewardPrefab;
|
||||||
|
|
||||||
public static new NetworkRoomManagerExt singleton { get; private set; }
|
public static new NetworkRoomManagerExt singleton => NetworkManager.singleton as NetworkRoomManagerExt;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Runs on both Server and Client
|
|
||||||
/// Networking is NOT initialized when this fires
|
|
||||||
/// </summary>
|
|
||||||
public override void Awake()
|
|
||||||
{
|
|
||||||
base.Awake();
|
|
||||||
singleton = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is called on the server when a networked scene finishes loading.
|
/// This is called on the server when a networked scene finishes loading.
|
||||||
|
Loading…
Reference in New Issue
Block a user