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); } ///