From 7fc730521268f0f95af4800e2460b88efede4906 Mon Sep 17 00:00:00 2001 From: MrGadget <9826063+MrGadget1024@users.noreply.github.com> Date: Fri, 25 Oct 2024 05:04:15 -0400 Subject: [PATCH] Use nameof(OnDiscoveredServer) --- Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs | 2 +- Assets/Mirror/Examples/Discovery/Scenes/MirrorDiscovery.unity | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs b/Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs index 94aad86cc..a34bbe094 100644 --- a/Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs +++ b/Assets/Mirror/Components/Discovery/NetworkDiscoveryHUD.cs @@ -28,7 +28,7 @@ void Reset() // Add default event handler if not already present if (!Enumerable.Range(0, networkDiscovery.OnServerFound.GetPersistentEventCount()) - .Any(i => networkDiscovery.OnServerFound.GetPersistentMethodName(i) == "OnDiscoveredServer")) + .Any(i => networkDiscovery.OnServerFound.GetPersistentMethodName(i) == nameof(OnDiscoveredServer))) { UnityEditor.Events.UnityEventTools.AddPersistentListener(networkDiscovery.OnServerFound, OnDiscoveredServer); UnityEditor.Undo.RecordObjects(new UnityEngine.Object[] { this, networkDiscovery }, "Set NetworkDiscovery"); diff --git a/Assets/Mirror/Examples/Discovery/Scenes/MirrorDiscovery.unity b/Assets/Mirror/Examples/Discovery/Scenes/MirrorDiscovery.unity index 8a4c05a6d..7ea11edd2 100644 --- a/Assets/Mirror/Examples/Discovery/Scenes/MirrorDiscovery.unity +++ b/Assets/Mirror/Examples/Discovery/Scenes/MirrorDiscovery.unity @@ -98,6 +98,7 @@ LightmapSettings: m_TrainingDataDestination: TrainingData m_LightProbeSampleCountMultiplier: 4 m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} --- !u!196 &4 NavMeshSettings: serializedVersion: 2