Skip to content

Commit 06f7302

Browse files
author
Jesse Olmer
authored
fix: Update Add Component menu structure [MTT-4078] (#2191)
Put netcode components into a common sub-folder of the Add Component menu, and also fixed word spacing inconsistencies in the entries
1 parent fdebb55 commit 06f7302

8 files changed

Lines changed: 8 additions & 4 deletions

File tree

com.unity.netcode.gameobjects/Components/NetworkAnimator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ internal NetworkAnimatorStateChangeHandler(NetworkAnimator networkAnimator)
156156
/// <summary>
157157
/// NetworkAnimator enables remote synchronization of <see cref="UnityEngine.Animator"/> state for on network objects.
158158
/// </summary>
159-
[AddComponentMenu("Netcode/" + nameof(NetworkAnimator))]
159+
[AddComponentMenu("Netcode/Network Animator")]
160160
[RequireComponent(typeof(Animator))]
161161
public class NetworkAnimator : NetworkBehaviour
162162
{

com.unity.netcode.gameobjects/Components/NetworkRigidbody.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Unity.Netcode.Components
99
/// </summary>
1010
[RequireComponent(typeof(Rigidbody))]
1111
[RequireComponent(typeof(NetworkTransform))]
12+
[AddComponentMenu("Netcode/Network Rigidbody")]
1213
public class NetworkRigidbody : NetworkBehaviour
1314
{
1415
/// <summary>

com.unity.netcode.gameobjects/Components/NetworkRigidbody2D.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace Unity.Netcode.Components
99
/// </summary>
1010
[RequireComponent(typeof(Rigidbody2D))]
1111
[RequireComponent(typeof(NetworkTransform))]
12+
[AddComponentMenu("Netcode/Network Rigidbody 2D")]
1213
public class NetworkRigidbody2D : NetworkBehaviour
1314
{
1415
private Rigidbody2D m_Rigidbody;

com.unity.netcode.gameobjects/Components/NetworkTransform.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Unity.Netcode.Components
1010
/// The replicated value will be automatically be interpolated (if active) and applied to the underlying GameObject's transform.
1111
/// </summary>
1212
[DisallowMultipleComponent]
13-
[AddComponentMenu("Netcode/" + nameof(NetworkTransform))]
13+
[AddComponentMenu("Netcode/Network Transform")]
1414
[DefaultExecutionOrder(100000)] // this is needed to catch the update time after the transform was updated by user scripts
1515
public class NetworkTransform : NetworkBehaviour
1616
{

com.unity.netcode.gameobjects/Runtime/Core/NetworkManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace Unity.Netcode
2020
/// <summary>
2121
/// The main component of the library
2222
/// </summary>
23-
[AddComponentMenu("Netcode/" + nameof(NetworkManager), -100)]
23+
[AddComponentMenu("Netcode/Network Manager", -100)]
2424
public class NetworkManager : MonoBehaviour, INetworkUpdateSystem
2525
{
2626
#pragma warning disable IDE1006 // disable naming rule violation check

com.unity.netcode.gameobjects/Runtime/Core/NetworkObject.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Unity.Netcode
99
/// <summary>
1010
/// A component used to identify that a GameObject in the network
1111
/// </summary>
12-
[AddComponentMenu("Netcode/" + nameof(NetworkObject), -99)]
12+
[AddComponentMenu("Netcode/Network Object", -99)]
1313
[DisallowMultipleComponent]
1414
public sealed class NetworkObject : MonoBehaviour
1515
{

com.unity.netcode.gameobjects/Runtime/Transports/UNET/UNetTransport.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Unity.Netcode.Transports.UNET
99
{
10+
[AddComponentMenu("Netcode/UNet Transport")]
1011
public class UNetTransport : NetworkTransport
1112
{
1213
public enum SendMode

com.unity.netcode.gameobjects/Runtime/Transports/UTP/UnityTransport.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public static string ErrorToString(Networking.Transport.Error.StatusCode error,
9292
/// The Netcode for GameObjects NetworkTransport for UnityTransport.
9393
/// Note: This is highly recommended to use over UNet.
9494
/// </summary>
95+
[AddComponentMenu("Netcode/Unity Transport")]
9596
public partial class UnityTransport : NetworkTransport, INetworkStreamDriverConstructor
9697
{
9798
/// <summary>

0 commit comments

Comments
 (0)