Having way too much difficulty synching my objects (Unity Networking)
I've been pulling my hair out over this for a few days and google searching didn't seem to help me, so here goes.
I'm an inexperienced programmer and pretty new with Unity, too, and as such made a mistake with my first multiplayer project by doing a lot of it as if it were a single-player project, without reading up on the Networking stuff. I've been trying to convert my project to a multiplayer one, with some success, but I can't seem to understand exactly how Instantiate, Spawn, Prefabs, and Start() work together in tandem.
My game works by Instantiating a bunch of tile prefabs as soon as the server goes up (to create a ramshackle map of tiles, which is probably an odd way to do it, but still). Those Instantiated tiles then arrange themselves using Start() in an attached script. This works fine in single player, obviously.
It breaks down a bit later, though: Spawning the objects means every instance of the object (on the server and on each client) does Start(), but I'd prefer if it were done once on the server, instead. Replacing Start() with OnStartServer() means it only happens on the server, but it doesn't sync up at all on the clients, which I'm pretty sure is because Spawning them only brings in the base Prefab, instead of copying the object on the server. It never seems to sync, too.
I'm half-expecting to be told that I'm doing this totally wrong, and I should only need to be spawning set prefabs and doing the rest of my work already synced, but I've had so many headaches getting this far that I'd appreciate being told I'm mental. Either way, any help would be appreciated!
Your answer
![](https://koobas.hobune.stream/wayback/20220612104344im_/https://answers.unity.com/themes/thub/images/avi.jpg)