From fdeb2b05bde939f02b71d1ae6d599abbea46859d Mon Sep 17 00:00:00 2001 From: MrGadget1024 Date: Sat, 23 Jan 2021 14:34:01 -0500 Subject: [PATCH] Added comments to NetworkManager::OnValidate --- Assets/Mirror/Runtime/NetworkManager.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Mirror/Runtime/NetworkManager.cs b/Assets/Mirror/Runtime/NetworkManager.cs index 632bdffc2..94836bbf1 100644 --- a/Assets/Mirror/Runtime/NetworkManager.cs +++ b/Assets/Mirror/Runtime/NetworkManager.cs @@ -209,6 +209,8 @@ public virtual void OnValidate() logger.Log("NetworkManager: added default Transport because there was none yet."); } #if UNITY_EDITOR + // For some insane reason, this line fails when building unless wrapped in this define. Stupid but true. + // error CS0234: The type or namespace name 'Undo' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?) UnityEditor.Undo.RecordObject(gameObject, "Added default Transport"); #endif }