Network objects as network variables

I don’t think it’s possible to have a network variable field that’s a network object, so what’s the best way to solve this problem.

I have a player and many character network objects spawned. I want to assign a character for control by the player and set the player.Character field on the server to that character. What would be the best way of telling the client player it now has that character assigned to them?

You can use a NetworkVariable. NetworkObjectReference.Value can be used to get/set a NetworkObject to reference.

3 Likes

I missed that, I’ll have a play with it thank you.