mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix(NetworkMatch): Added read only display of MatchID
This commit is contained in:
parent
0cb96901b8
commit
f963f0eb9e
@ -11,6 +11,12 @@ public class NetworkMatch : NetworkBehaviour
|
|||||||
{
|
{
|
||||||
Guid _matchId;
|
Guid _matchId;
|
||||||
|
|
||||||
|
#pragma warning disable IDE0052 // Suppress warning for unused field...this is for debugging purposes
|
||||||
|
[SerializeField, ReadOnly]
|
||||||
|
[Tooltip("Match ID is shown here on server for debugging purposes.")]
|
||||||
|
string MatchID = string.Empty;
|
||||||
|
#pragma warning restore IDE0052
|
||||||
|
|
||||||
///<summary>Set this to the same value on all networked objects that belong to a given match</summary>
|
///<summary>Set this to the same value on all networked objects that belong to a given match</summary>
|
||||||
public Guid matchId
|
public Guid matchId
|
||||||
{
|
{
|
||||||
@ -25,6 +31,7 @@ public Guid matchId
|
|||||||
|
|
||||||
Guid oldMatch = _matchId;
|
Guid oldMatch = _matchId;
|
||||||
_matchId = value;
|
_matchId = value;
|
||||||
|
MatchID = value.ToString();
|
||||||
|
|
||||||
// Only inform the AOI if this netIdentity has been spawned (isServer) and only if using a MatchInterestManagement
|
// Only inform the AOI if this netIdentity has been spawned (isServer) and only if using a MatchInterestManagement
|
||||||
if (isServer && NetworkServer.aoi is MatchInterestManagement matchInterestManagement)
|
if (isServer && NetworkServer.aoi is MatchInterestManagement matchInterestManagement)
|
||||||
|
Loading…
Reference in New Issue
Block a user