Hello Everyone, Hope all doing well.
I have a silly doubt, pardon me. I was just wondering can I have a GameObject syncField like below:
@syncField()
lastSpawnPoint?: GameObject | null;
This is a gameobject synced across all the network players.
Original Post on Discord
by user 389863047159873540
kipash
(kipash)
2
Hey
Thereβs a chance that in your usecase the gameobject wonβt have the same guid.
What is your usecase?
Can you define all possible spawnspots in an array and then sync index to the adequate game object?
Random Spawn Point. I want to make sure that new users who joins room dont spawn where some other user already spawned and standing idle
by user 389863047159873540
kipash
(kipash)
4
You should be able to synchronize a vector: world position of a safe spawn.
marwie1
(marwi)
5
Hi, the syncField can not synchronize a Object3D / GameObject but as Kipash said you can send a Vector3 if you only care about the position
marwie1
(marwi)
6
If you have a list of spawnpoints you could also sync the index only
great! that will help. Thanks 
by user 389863047159873540