Skip to content

Commit 78a9979

Browse files
update
marking all unity.netcode.editor public API as having moved to a new namespace in order to auto-upgrade users.
1 parent 82bbda0 commit 78a9979

12 files changed

Lines changed: 28 additions & 1 deletion

com.unity.netcode.gameobjects/Editor/Configuration/NetcodeForGameObjectsProjectSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using UnityEditor;
22
using UnityEngine;
3+
using UnityEngine.Scripting.APIUpdating;
34

45
namespace Unity.Netcode.GameObjects.Editor.Configuration
56
{
67
/// <summary>
78
/// A <see cref="ScriptableSingleton{T}"/> of type <see cref="NetcodeForGameObjectsProjectSettings"/>.
89
/// </summary>
910
[FilePath("ProjectSettings/NetcodeForGameObjects.asset", FilePathAttribute.Location.ProjectFolder)]
11+
[MovedFrom(true, "Unity.Netcode.Editor.Configuration", "Unity.Netcode.Editor", null)]
1012
public class NetcodeForGameObjectsProjectSettings : ScriptableSingleton<NetcodeForGameObjectsProjectSettings>
1113
{
1214
internal static readonly string DefaultNetworkPrefabsPath = "Assets/DefaultNetworkPrefabs.asset";

com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabProcessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using System.Collections.Generic;
22
using UnityEditor;
33
using UnityEngine;
4+
using UnityEngine.Scripting.APIUpdating;
45

56
namespace Unity.Netcode.GameObjects.Editor.Configuration
67
{
78
/// <summary>
89
/// Updates the default <see cref="NetworkPrefabsList"/> instance when prefabs are updated (created, moved, deleted) in the project.
910
/// </summary>
11+
[MovedFrom(true, "Unity.Netcode.Editor.Configuration", "Unity.Netcode.Editor", null)]
1012
public class NetworkPrefabProcessor : AssetPostprocessor
1113
{
1214
/// <summary>

com.unity.netcode.gameobjects/Editor/Configuration/NetworkPrefabsEditor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using UnityEditor;
22
using UnityEditorInternal;
33
using UnityEngine;
4+
using UnityEngine.Scripting.APIUpdating;
45

56
namespace Unity.Netcode.GameObjects.Editor
67
{
@@ -9,6 +10,7 @@ namespace Unity.Netcode.GameObjects.Editor
910
/// </summary>
1011
[CustomEditor(typeof(NetworkPrefabsList), true)]
1112
[CanEditMultipleObjects]
13+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1214
public class NetworkPrefabsEditor : UnityEditor.Editor
1315
{
1416
private ReorderableList m_NetworkPrefabsList;

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
using Unity.Netcode.Transports.UTP;
55
using UnityEditor;
66
using UnityEngine;
7+
using UnityEngine.Scripting.APIUpdating;
78

89
namespace Unity.Netcode.GameObjects.Editor
910
{
1011
/// <summary>
1112
/// Internal use. Hides the script field for the given component.
1213
/// </summary>
14+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1315
public class HiddenScriptEditor : UnityEditor.Editor
1416
{
1517
private static readonly string[] k_HiddenFields = { "m_Script" };
@@ -31,6 +33,7 @@ public override void OnInspectorGUI()
3133
/// Internal use. Hides the script field for UnityTransport.
3234
/// </summary>
3335
[CustomEditor(typeof(UnityTransport), true)]
36+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
3437
public class UnityTransportEditor : HiddenScriptEditor
3538
{
3639
private static readonly string[] k_HiddenFields = { "m_Script", "ConnectionData" };
@@ -148,6 +151,7 @@ public override void OnInspectorGUI()
148151
/// Internal use. Hides the script field for NetworkAnimator.
149152
/// </summary>
150153
[CustomEditor(typeof(NetworkAnimator), true)]
154+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
151155
public class NetworkAnimatorEditor : HiddenScriptEditor
152156
{
153157

@@ -159,6 +163,7 @@ public class NetworkAnimatorEditor : HiddenScriptEditor
159163
/// Internal use. Hides the script field for NetworkRigidbody.
160164
/// </summary>
161165
[CustomEditor(typeof(NetworkRigidbody), true)]
166+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
162167
public class NetworkRigidbodyEditor : HiddenScriptEditor
163168
{
164169

@@ -170,6 +175,7 @@ public class NetworkRigidbodyEditor : HiddenScriptEditor
170175
/// Internal use. Hides the script field for NetworkRigidbody2D.
171176
/// </summary>
172177
[CustomEditor(typeof(NetworkRigidbody2D), true)]
178+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
173179
public class NetworkRigidbody2DEditor : HiddenScriptEditor
174180
{
175181

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using UnityEngine;
66
using UnityEngine.SceneManagement;
77

8-
namespace Unity.Netcode.Editor
8+
namespace Unity.Netcode.GameObjects.Editor
99
{
1010
/// <summary>
1111
/// A <see cref="IProcessSceneWithReport"/> that sets the <see cref

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using UnityEditor;
33
using UnityEngine;
4+
using UnityEngine.Scripting.APIUpdating;
45

56
namespace Unity.Netcode.GameObjects.Editor
67
{
@@ -15,6 +16,7 @@ namespace Unity.Netcode.GameObjects.Editor
1516
/// </remarks>
1617
/// <typeparam name="TT">The base <see cref="MonoBehaviour"/> derived component type</typeparam>
1718
[CanEditMultipleObjects]
19+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1820
public partial class NetcodeEditorBase<TT> : UnityEditor.Editor where TT : MonoBehaviour
1921
{
2022
private const int k_IndentOffset = 15;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Unity.Netcode.GameObjects.Editor.Configuration;
55
using UnityEditor;
66
using UnityEngine;
7+
using UnityEngine.Scripting.APIUpdating;
78

89
namespace Unity.Netcode.GameObjects.Editor
910
{
@@ -12,6 +13,7 @@ namespace Unity.Netcode.GameObjects.Editor
1213
/// </summary>
1314
[CustomEditor(typeof(NetworkBehaviour), true)]
1415
[CanEditMultipleObjects]
16+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1517
public class NetworkBehaviourEditor : UnityEditor.Editor
1618
{
1719
private bool m_Initialized;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#if UNITY_6000_5_OR_NEWER
1010
using UnityEngine.Assemblies;
1111
#endif
12+
using UnityEngine.Scripting.APIUpdating;
1213

1314
namespace Unity.Netcode.GameObjects.Editor
1415
{
@@ -18,6 +19,7 @@ namespace Unity.Netcode.GameObjects.Editor
1819
/// </summary>
1920
[CustomEditor(typeof(NetworkManager), true)]
2021
[CanEditMultipleObjects]
22+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
2123
public class NetworkManagerEditor : NetcodeEditorBase<NetworkManager>
2224
{
2325
private static GUIStyle s_CenteredWordWrappedLabelStyle;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
using UnityEditor;
66
using UnityEngine;
77
using UnityEngine.SceneManagement;
8+
using UnityEngine.Scripting.APIUpdating;
89

910
namespace Unity.Netcode.GameObjects.Editor
1011
{
1112
#if UNITY_EDITOR
1213
/// <summary>
1314
/// Specialized editor specific NetworkManager code
1415
/// </summary>
16+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1517
public class NetworkManagerHelper : NetworkManager.INetworkManagerHelper
1618
{
1719
internal static NetworkManagerHelper Singleton;

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#endif
99
using UnityEditor;
1010
using UnityEngine;
11+
using UnityEngine.Scripting.APIUpdating;
1112

1213
namespace Unity.Netcode.GameObjects.Editor
1314
{
@@ -16,6 +17,7 @@ namespace Unity.Netcode.GameObjects.Editor
1617
/// </summary>
1718
[CustomEditor(typeof(NetworkObject), true)]
1819
[CanEditMultipleObjects]
20+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
1921
public class NetworkObjectEditor : UnityEditor.Editor
2022
{
2123
private const NetworkObject.OwnershipStatus k_AllOwnershipFlags = NetworkObject.OwnershipStatus.RequestRequired | NetworkObject.OwnershipStatus.Transferable | NetworkObject.OwnershipStatus.Distributable;
@@ -224,6 +226,7 @@ private void OnDestroy()
224226
// enum flags is resolved
225227
#if BYPASS_DEFAULT_ENUM_DRAWER && MULTIPLAYER_SERVICES_SDK_INSTALLED
226228
[CustomPropertyDrawer(typeof(NetworkObject.OwnershipStatus))]
229+
[MovedFrom(true, "Unity.Netcode.Editor", "Unity.Netcode.Editor", null)]
227230
public class NetworkObjectOwnership : PropertyDrawer
228231
{
229232
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)

0 commit comments

Comments
 (0)