Make playerData public to get rid of Unity's warning (#1152)

This commit is contained in:
MrGadget 2019-10-16 15:16:46 -04:00 committed by vis2k
parent 0f951858c5
commit 61428382f4

View File

@ -1,4 +1,4 @@
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
namespace Mirror.Examples.Basic namespace Mirror.Examples.Basic
@ -21,7 +21,7 @@ public class Player : NetworkBehaviour
// This is updated by UpdateData which is called from OnStartServer via InvokeRepeating // This is updated by UpdateData which is called from OnStartServer via InvokeRepeating
[SyncVar(hook = nameof(OnPlayerDataChanged))] [SyncVar(hook = nameof(OnPlayerDataChanged))]
int playerData; public int playerData;
// This is called by the hook of playerData SyncVar above // This is called by the hook of playerData SyncVar above
void OnPlayerDataChanged(int newPlayerData) void OnPlayerDataChanged(int newPlayerData)