mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Mergd master
This commit is contained in:
commit
3d6659d885
@ -931,6 +931,14 @@ public static void ReplaceHandler<T>(Action<NetworkConnectionToClient, T> handle
|
||||
handlers[msgType] = NetworkMessages.WrapHandler(handler, requireAuthentication, exceptionsDisconnect);
|
||||
}
|
||||
|
||||
/// <summary>Replace a handler for message type T. Most should require authentication.</summary>
|
||||
public static void ReplaceHandler<T>(Action<NetworkConnectionToClient, T, int> handler, bool requireAuthentication = true)
|
||||
where T : struct, NetworkMessage
|
||||
{
|
||||
ushort msgType = NetworkMessageId<T>.Id;
|
||||
handlers[msgType] = NetworkMessages.WrapHandler(handler, requireAuthentication, exceptionsDisconnect);
|
||||
}
|
||||
|
||||
/// <summary>Unregister a handler for a message type T.</summary>
|
||||
public static void UnregisterHandler<T>()
|
||||
where T : struct, NetworkMessage
|
||||
|
@ -367,6 +367,7 @@ MonoBehaviour:
|
||||
connectionQualityInterval: 3
|
||||
timeInterpolationGui: 0
|
||||
spawnAmount: 50000
|
||||
spawnAmount: 10000
|
||||
interleave: 2
|
||||
spawnPrefab: {fileID: 449802645721213856, guid: 0ea79775d59804682a8cdd46b3811344,
|
||||
type: 3}
|
||||
|
@ -5,9 +5,13 @@ namespace Mirror.Examples.NetworkRoom
|
||||
[RequireComponent(typeof(Common.RandomColor))]
|
||||
public class Reward : NetworkBehaviour
|
||||
{
|
||||
public bool available = true;
|
||||
[Header("Components")]
|
||||
public Common.RandomColor randomColor;
|
||||
|
||||
[Header("Diagnostics")]
|
||||
[ReadOnly, SerializeField]
|
||||
bool available = true;
|
||||
|
||||
protected override void OnValidate()
|
||||
{
|
||||
base.OnValidate();
|
||||
|
Loading…
Reference in New Issue
Block a user