- Home /
How to make a global settings Editor Window for my game
I need to make a custom editor window to manage global configurations for my game, specifically I need an editor to change the players colors configuration so they are available in every scene.
Currently I'm using a singleton that is loaded in an Initialization scene at the begining of the game, so it lives through the entire game, but any time the designers want to change those colors they have to go there, or if I go to PlayMode in another scene, the gameobject with the singleton doesn't exist (currently I have a prefab with the singleton disabled, and I enable it if I have to Play)
I'm using an enum called PlayerColor to set the selected color to a player (Red, Blue, Yellow, etc), and then I ask the singleton (called PlayersColors) for a specific Color for a PlayerColor (A color for the board, the tokens, the UI, etc), so any PlayerColor has many color tones.
This is the current Inspector for my singleton:
This works, but I want a menu option that opens a config window, so they change the values there and those values are stored (I don't know where) and always available.
Also, I have a Server class with all the information to contact the backend, and I would like to do the same with that, a Window to change Server Settings.
Any ideas? Thank you!