Hello,
I’m wondering if there is a way to tell the server to always spawn the local player object before other objects for a connecting client.
The reason I hope to achieve this is to access the local player object (and thus server commands) during custom spawning procedures of the other objects.
Thanks.
For this you need a sort of ObjectSpawnerManager which checks if the player already spawned (there’s some callbacks that tells you when a player connected, including local one).
So don’t spawn anything until players (or whatever entity) is spawned on clients/servers.
Stupid me, now that I remember, when you add NetworkIdentity to objects they should automatically wait for player spawn! This is handled by the NetworkManager itself.