mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
chore: Updated AddComponentMenu attributes
This commit is contained in:
parent
e01b618dcb
commit
311edc09aa
@ -3,7 +3,7 @@
|
||||
|
||||
namespace Mirror.Experimental
|
||||
{
|
||||
[AddComponentMenu("Network/ Experimental/Network Lerp Rigidbody")]
|
||||
[AddComponentMenu("")]
|
||||
[HelpURL("https://mirror-networking.gitbook.io/docs/components/network-lerp-rigidbody")]
|
||||
[Obsolete("Use the new NetworkRigidbodyReliable/Unreliable component with Snapshot Interpolation instead.")]
|
||||
public class NetworkLerpRigidbody : NetworkBehaviour
|
||||
|
@ -4,6 +4,8 @@
|
||||
|
||||
namespace Mirror
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("Network/ Lag Compensation/ History Collider")]
|
||||
public class HistoryCollider : MonoBehaviour
|
||||
{
|
||||
[Header("Components")]
|
||||
|
@ -35,6 +35,7 @@ public static Capture3D Interpolate(Capture3D from, Capture3D to, double t) =>
|
||||
}
|
||||
|
||||
[DisallowMultipleComponent]
|
||||
[AddComponentMenu("Network/ Lag Compensation/ Lag Compensator")]
|
||||
[HelpURL("https://mirror-networking.gitbook.io/docs/manual/general/lag-compensation")]
|
||||
public class LagCompensator : NetworkBehaviour
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror
|
||||
{
|
||||
[AddComponentMenu("Network/Network Diagnostics Debugger")]
|
||||
public class NetworkDiagnosticsDebugger : MonoBehaviour
|
||||
{
|
||||
public bool logInMessages = true;
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Mirror
|
||||
{
|
||||
// [RequireComponent(typeof(Rigidbody))] <- OnValidate ensures this is on .target
|
||||
[AddComponentMenu("Network/Network Rigidbody (Reliable)")]
|
||||
public class NetworkRigidbodyReliable : NetworkTransformReliable
|
||||
{
|
||||
bool clientAuthority => syncDirection == SyncDirection.ClientToServer;
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Mirror
|
||||
{
|
||||
// [RequireComponent(typeof(Rigidbody))] <- OnValidate ensures this is on .target
|
||||
[AddComponentMenu("Network/Network Rigidbody 2D (Reliable)")]
|
||||
public class NetworkRigidbodyReliable2D : NetworkTransformReliable
|
||||
{
|
||||
bool clientAuthority => syncDirection == SyncDirection.ClientToServer;
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Mirror
|
||||
{
|
||||
// [RequireComponent(typeof(Rigidbody))] <- OnValidate ensures this is on .target
|
||||
[AddComponentMenu("Network/Network Rigidbody (Unreliable)")]
|
||||
public class NetworkRigidbodyUnreliable : NetworkTransformUnreliable
|
||||
{
|
||||
bool clientAuthority => syncDirection == SyncDirection.ClientToServer;
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace Mirror
|
||||
{
|
||||
// [RequireComponent(typeof(Rigidbody))] <- OnValidate ensures this is on .target
|
||||
[AddComponentMenu("Network/Network Rigidbody 2D (Unreliable)")]
|
||||
public class NetworkRigidbodyUnreliable2D : NetworkTransformUnreliable
|
||||
{
|
||||
bool clientAuthority => syncDirection == SyncDirection.ClientToServer;
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
namespace Mirror.Examples.Basic
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class Player : NetworkBehaviour
|
||||
{
|
||||
// Events that the PlayerUI will subscribe to
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.PredictionBenchmark
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class NetworkManagerPredictionBenchmark : NetworkManager
|
||||
{
|
||||
[Header("Spawns")]
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.CharacterSelection
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class NetworkManagerCharacterSelection : NetworkManager
|
||||
{
|
||||
// See the scene 'SceneMapSpawnWithNoCharacter', to spawn as empty player.
|
||||
|
@ -5,6 +5,7 @@
|
||||
|
||||
namespace Mirror.Examples.NetworkRoom
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class PlayerCamera : NetworkBehaviour
|
||||
{
|
||||
Camera mainCam;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.NetworkRoom
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
[RequireComponent(typeof(CapsuleCollider))]
|
||||
[RequireComponent(typeof(CharacterController))]
|
||||
[RequireComponent(typeof(NetworkTransformReliable))]
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.NetworkRoom
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class PlayerScore : NetworkBehaviour
|
||||
{
|
||||
[SyncVar]
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.NetworkRoom
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
[RequireComponent(typeof(Common.RandomColor))]
|
||||
public class Reward : NetworkBehaviour
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.PredictionBenchmark
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class NetworkManagerStackedPrediction : NetworkManager
|
||||
{
|
||||
[Header("Spawns")]
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Examples.TankTheftAuto
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class AuthorityNetworkManager : NetworkManager
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
namespace Mirror.Examples.Common
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class CanvasNetworkManagerHUD : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject startButtonsGroup;
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Mirror.Examples.Common
|
||||
{
|
||||
[AddComponentMenu("Network/Network Random Color")]
|
||||
public class RandomColor : NetworkBehaviour
|
||||
{
|
||||
// Unity clones the material when GetComponent<Renderer>().material is called
|
||||
|
@ -5,7 +5,7 @@ MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
icon: {fileID: 2800000, guid: 7453abfe9e8b2c04a8a47eb536fe21eb, type: 3}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
@ -1,7 +1,10 @@
|
||||
// simple network behaviour mock component which counts calls.
|
||||
// this is necessary for many tests.
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Tests
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class NetworkBehaviourMock : NetworkBehaviour
|
||||
{
|
||||
// start
|
||||
|
@ -1,5 +1,8 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Tests.EditorBehaviours.Attributes
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class AttributeBehaviour_NetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public static readonly float Expected_float = 2020f;
|
||||
|
@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Mirror.Tests.EditorBehaviours.NetworkIdentities
|
||||
{
|
||||
[AddComponentMenu("")]
|
||||
public class StartServerExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -12,6 +14,7 @@ public override void OnStartServer()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StartClientExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -22,6 +25,7 @@ public override void OnStartClient()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StartAuthorityExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -32,6 +36,7 @@ public override void OnStartAuthority()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StopAuthorityExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -42,6 +47,7 @@ public override void OnStopAuthority()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StartLocalPlayerExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -52,6 +58,7 @@ public override void OnStartLocalPlayer()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StopClientExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -62,6 +69,7 @@ public override void OnStopClient()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StopLocalPlayerExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -72,6 +80,7 @@ public override void OnStopLocalPlayer()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class StopServerExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int called;
|
||||
@ -82,6 +91,7 @@ public override void OnStopServer()
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SerializeTest1NetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int value;
|
||||
@ -95,6 +105,7 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SerializeTest2NetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public string value;
|
||||
@ -108,6 +119,7 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SyncVarTest1NetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
[SyncVar] public int value;
|
||||
@ -117,11 +129,13 @@ public class SyncVarTest1NetworkBehaviour : NetworkBehaviour
|
||||
public void SetValue(int n) => value = n;
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SyncVarTest2NetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
[SyncVar] public string value;
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SerializeExceptionNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public override void OnSerialize(NetworkWriter writer, bool initialState)
|
||||
@ -134,6 +148,7 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class SerializeMismatchNetworkBehaviour : NetworkBehaviour
|
||||
{
|
||||
public int value;
|
||||
@ -149,6 +164,7 @@ public override void OnDeserialize(NetworkReader reader, bool initialState)
|
||||
}
|
||||
}
|
||||
|
||||
[AddComponentMenu("")]
|
||||
public class IsClientServerCheckComponent : NetworkBehaviour
|
||||
{
|
||||
// OnStartClient
|
||||
|
Loading…
Reference in New Issue
Block a user