mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Make playerData public to get rid of Unity's warning (#1152)
This commit is contained in:
parent
0f951858c5
commit
61428382f4
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user