From 2dca328fff78e4ceb4ec2e629a9f0796b6102eff Mon Sep 17 00:00:00 2001 From: MrGadget1024 Date: Sat, 9 Oct 2021 09:32:10 -0400 Subject: [PATCH] Basic Example: Syntax --- Assets/Mirror/Examples/Basic/Scripts/Player.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Assets/Mirror/Examples/Basic/Scripts/Player.cs b/Assets/Mirror/Examples/Basic/Scripts/Player.cs index 90da159a8..86f00a142 100644 --- a/Assets/Mirror/Examples/Basic/Scripts/Player.cs +++ b/Assets/Mirror/Examples/Basic/Scripts/Player.cs @@ -114,9 +114,9 @@ public override void OnStartClient() playerUI.GetComponent().SetPlayer(this, isLocalPlayer); // Invoke all event handlers with the current data - OnPlayerNumberChanged.Invoke(playerNumber); - OnPlayerColorChanged.Invoke(playerColor); - OnPlayerDataChanged.Invoke(playerData); + OnPlayerNumberChanged?.Invoke(playerNumber); + OnPlayerColorChanged?.Invoke(playerColor); + OnPlayerDataChanged?.Invoke(playerData); } ///