#Syncing Player Names

1 messages · Page 1 of 1 (latest)

novel verge
#

That video is a bit out of date. But yea, post your code here

novel ginkgo
novel verge
#

is your clientData dictionary there getting filled?

novel ginkgo
#

Yes

#

I will try printing it to make sure it is properly

novel ginkgo
#

Printing

novel ginkgo
#

I think this should run on the client side

#
private void HandleDisplayNameChanged(FixedString32Bytes oldDisplayName, FixedString32Bytes newDisplayName)
        {
            if (IsClient) Debug.Log("client");
            Debug.Log("Change in value");
            displayNameText.text = newDisplayName.ToString();
        }
#

but its not for some reason?

#

I have a Client Network Transform on the player body would that be causing some troubles?

novel verge
#

OnValueChange might be called in OnNetworkSpawn

novel ginkgo
#
displayName.OnValueChanged += HandleDisplayNameChanged;
#

I tried putting this on network spawn, ill try again

#

This is on client side I've somehow managed to sync the clients name but the host player is still default

novel ginkgo
novel ginkgo
#

I figured it out