From bd85c74f5262215e2a2e44365b10410fe8e133b6 Mon Sep 17 00:00:00 2001 From: MrGadget1024 <9826063+MrGadget1024@users.noreply.github.com> Date: Sun, 5 Nov 2023 07:53:35 -0500 Subject: [PATCH] NetworkManagerWithActions template - made actions non-static - the singleton is already static, so ref them through that. --- ...ctions-NewNetworkManagerWithActions.cs.txt | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/Assets/ScriptTemplates/51-Mirror__Network Manager With Actions-NewNetworkManagerWithActions.cs.txt b/Assets/ScriptTemplates/51-Mirror__Network Manager With Actions-NewNetworkManagerWithActions.cs.txt index 43b430a9d..24fb60df9 100644 --- a/Assets/ScriptTemplates/51-Mirror__Network Manager With Actions-NewNetworkManagerWithActions.cs.txt +++ b/Assets/ScriptTemplates/51-Mirror__Network Manager With Actions-NewNetworkManagerWithActions.cs.txt @@ -12,35 +12,35 @@ public class #SCRIPTNAME# : NetworkManager { // You can adjust the parameters of the Actions below to suit your needs and pass the values through the Invoke() method. - public static event Action OnStartAction; - public static event Action OnDestroyAction; + public event Action OnStartAction; + public event Action OnDestroyAction; - public static event Action OnApplicationQuitAction; + public event Action OnApplicationQuitAction; - public static event Action ServerChangeSceneAction; - public static event Action OnServerChangeSceneAction; - public static event Action OnServerSceneChangedAction; - public static event Action OnClientChangeSceneAction; - public static event Action OnClientSceneChangedAction; + public event Action ServerChangeSceneAction; + public event Action OnServerChangeSceneAction; + public event Action OnServerSceneChangedAction; + public event Action OnClientChangeSceneAction; + public event Action OnClientSceneChangedAction; - public static event Action OnServerConnectAction; - public static event Action OnServerReadyAction; - public static event Action OnServerAddPlayerAction; - public static event Action OnServerDisconnectAction; - public static event Action OnServerErrorAction; + public event Action OnServerConnectAction; + public event Action OnServerReadyAction; + public event Action OnServerAddPlayerAction; + public event Action OnServerDisconnectAction; + public event Action OnServerErrorAction; - public static event Action OnClientConnectAction; - public static event Action OnClientDisconnectAction; - public static event Action OnClientNotReadyAction; - public static event Action OnConnectionQualityChangedAction; - public static event Action OnClientErrorAction; + public event Action OnClientConnectAction; + public event Action OnClientDisconnectAction; + public event Action OnClientNotReadyAction; + public event Action OnConnectionQualityChangedAction; + public event Action OnClientErrorAction; - public static event Action OnStartServerAction; - public static event Action OnStopServerAction; - public static event Action OnStartHostAction; - public static event Action OnStopHostAction; - public static event Action OnStartClientAction; - public static event Action OnStopClientAction; + public event Action OnStartServerAction; + public event Action OnStopServerAction; + public event Action OnStartHostAction; + public event Action OnStopHostAction; + public event Action OnStartClientAction; + public event Action OnStopClientAction; // Overrides the base singleton so we don't have to cast to this type everywhere. public static new #SCRIPTNAME# singleton => (#SCRIPTNAME#)NetworkManager.singleton;