Skip to content

Commit 9185677

Browse files
authored
fix: Fixed compile error in 2022.2 (#2214)
* Fix compile error in 2022.2+
1 parent c5dff6d commit 9185677

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

com.unity.netcode.gameobjects/Editor/HiddenScriptEditor.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
using Unity.Netcode.Components;
2+
#if UNITY_UNET_PRESENT
23
using Unity.Netcode.Transports.UNET;
4+
#endif
35
using Unity.Netcode.Transports.UTP;
46
using UnityEditor;
57

@@ -20,7 +22,7 @@ public override void OnInspectorGUI()
2022
EditorGUI.EndChangeCheck();
2123
}
2224
}
23-
25+
#if UNITY_UNET_PRESENT
2426
/// <summary>
2527
/// Internal use. Hides the script field for UNetTransport.
2628
/// </summary>
@@ -29,6 +31,7 @@ public class UNetTransportEditor : HiddenScriptEditor
2931
{
3032

3133
}
34+
#endif
3235

3336
/// <summary>
3437
/// Internal use. Hides the script field for UnityTransport.

com.unity.netcode.gameobjects/Editor/com.unity.netcode.editor.asmdef

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
"expression": "",
1515
"define": "MULTIPLAYER_TOOLS"
1616
},
17+
{
18+
"name": "Unity",
19+
"expression": "(0,2022.2.0a5)",
20+
"define": "UNITY_UNET_PRESENT"
21+
},
1722
{
1823
"name": "com.unity.modules.animation",
1924
"expression": "",

0 commit comments

Comments
 (0)