diff --git a/Assets/ScriptTemplates/50-Mirror__Network Manager-NewNetworkManager.cs.txt b/Assets/ScriptTemplates/50-Mirror__Network Manager-NewNetworkManager.cs.txt index f0c066923..29c8956cf 100644 --- a/Assets/ScriptTemplates/50-Mirror__Network Manager-NewNetworkManager.cs.txt +++ b/Assets/ScriptTemplates/50-Mirror__Network Manager-NewNetworkManager.cs.txt @@ -10,6 +10,10 @@ using Mirror; public class #SCRIPTNAME# : NetworkManager { + // Overrides the base singleton so we don't + // have to cast to this type everywhere. + public static new PortalsNetworkManager singleton { get; private set; } + #region Unity Callbacks public override void OnValidate() @@ -32,6 +36,7 @@ public class #SCRIPTNAME# : NetworkManager /// public override void Start() { + singleton = this; base.Start(); }