File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed
com.unity.netcode.gameobjects/Editor Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class NetcodeForGameObjectsProjectSettings : ScriptableSingleton<NetcodeF
2222
2323 private void OnEnable ( )
2424 {
25- if ( NetworkPrefabsPath ? . Length == 0 )
25+ if ( NetworkPrefabsPath . Length == 0 )
2626 {
2727 NetworkPrefabsPath = DefaultNetworkPrefabsPath ;
2828 }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ private static void OnDeactivate()
3636 if ( settings . TempNetworkPrefabsPath != settings . NetworkPrefabsPath )
3737 {
3838 var newPath = settings . TempNetworkPrefabsPath ;
39- if ( newPath ? . Length == 0 )
39+ if ( newPath . Length == 0 )
4040 {
4141 newPath = NetcodeForGameObjectsProjectSettings . DefaultNetworkPrefabsPath ;
4242 settings . TempNetworkPrefabsPath = newPath ;
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ public class UnityTransportEditor : HiddenScriptEditor
5555
5656 private SerializedProperty m_ServerAddressProperty ;
5757 private SerializedProperty m_ServerPortProperty ;
58- private SerializedProperty m_OverrideBindIpProperty ;
5958
6059 private const string k_LoopbackIpv4 = "127.0.0.1" ;
6160 private const string k_LoopbackIpv6 = "::1" ;
@@ -76,7 +75,7 @@ private void Initialize()
7675
7776 m_ServerAddressProperty = connectionDataProperty . FindPropertyRelative ( nameof ( UnityTransport . ConnectionAddressData . Address ) ) ;
7877 m_ServerPortProperty = connectionDataProperty . FindPropertyRelative ( nameof ( UnityTransport . ConnectionAddressData . Port ) ) ;
79- m_OverrideBindIpProperty = connectionDataProperty . FindPropertyRelative ( nameof ( UnityTransport . ConnectionAddressData . ServerListenAddress ) ) ;
78+ connectionDataProperty . FindPropertyRelative ( nameof ( UnityTransport . ConnectionAddressData . ServerListenAddress ) ) ;
8079 }
8180
8281 /// <summary>
@@ -129,7 +128,7 @@ public override void OnInspectorGUI()
129128 overrideIp = EditorGUILayout . TextField ( "Override Bind IP (optional)" , overrideIp ) ;
130129 if ( allowRemoteConnections )
131130 {
132- if ( overrideIp ? . Length == 0 )
131+ if ( overrideIp . Length == 0 )
133132 {
134133 if ( isIpV6 )
135134 {
Original file line number Diff line number Diff line change @@ -251,12 +251,12 @@ private void DisplayNetworkManagerProperties()
251251 // Default directory
252252 var directory = "Assets/" ;
253253 var assetPath = AssetDatabase . GetAssetPath ( m_NetworkManager ) ;
254- if ( assetPath ? . Length == 0 )
254+ if ( assetPath . Length == 0 )
255255 {
256256 assetPath = PrefabUtility . GetPrefabAssetPathOfNearestInstanceRoot ( m_NetworkManager ) ;
257257 }
258258
259- if ( assetPath != "" )
259+ if ( assetPath . Length > 0 )
260260 {
261261 directory = Path . GetDirectoryName ( assetPath ) ;
262262 }
@@ -270,7 +270,7 @@ private void DisplayNetworkManagerProperties()
270270 if ( prefabStage != null )
271271 {
272272 var prefabPath = prefabStage . assetPath ;
273- if ( ! string . IsNullOrEmpty ( prefabPath ) )
273+ if ( prefabPath . Length > 0 )
274274 {
275275 directory = Path . GetDirectoryName ( prefabPath ) ;
276276 }
You can’t perform that action at this time.
0 commit comments