How do singletons work in PUN?

Options
My entire game started as a single player game, making singletons everywhere. Now that I'm trying to add multiplayer, I have to make sure that there's no way around having to refactor my entire game.
I have things like menus, inventories, settings, input, file management, completely in singleton patterns.
Is there no way for each client to only access its own singleton? As a client, I do not need to see anyone else's menus or inventories, or settings, just my own. Meaning in the end, I will still only have one instance of these systems.

My understanding is that all clients will access the same singleton inventory? How would its data even be transported to the other clients without me sending things?

The only thing I want the clients to see from each other are pretty much the transforms of player bodies and certain commands they send to each other. These are independent of my singleton systems, but my player itself is wrapped in a singleton.

What can I do here?

Answers

  • S_Oliver
    Options
    Even with Pun a Singelton work's like it does without.
    You'll facing alot of problems if you are using Singletons for everything.
    You should rework your Game to work without Singeltons, also it is complicated to turn a local Game to a Multiplayer Game.