diff --git a/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs b/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs index cae7ed55df..a5abeb0c99 100644 --- a/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs +++ b/com.unity.netcode.gameobjects/Editor/NetworkTransformEditor.cs @@ -156,9 +156,10 @@ public override void OnInspectorGUI() } EditorGUILayout.PropertyField(m_UseHalfFloatPrecision); -#if COM_UNITY_MODULES_PHYSICS // if rigidbody is present but network rigidbody is not present var go = ((NetworkTransform)target).gameObject; + +#if COM_UNITY_MODULES_PHYSICS if (go.TryGetComponent(out _) && go.TryGetComponent(out _) == false) { EditorGUILayout.HelpBox("This GameObject contains a Rigidbody but no NetworkRigidbody.\n" +