I'm planning to send a integer value to CallUpdatePlayerName after SetPlayerName is called is this possible? Below is my code
[SyncVar(hook = nameof(CallUpdatePlayerName))]
public string playerName;
[Command]
public void SetPlayerName(string value)
{
if (isLocalPlayer)
{
playerName = value;
}
}
private void CallUpdatePlayerName(string oldPlayerName, string newPlayerName, int index)
{
}