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 }