Hey,
I’m currently using a singleton pattern, that is created at run-time when it’s needed, so it isn’t just sitting there in the scene.
I’m loading the UI prefabs from resources when I need them since the singleton is not scene-dependent and wherever the scene the player is on, the manager keeps working. I’ve seen this method in a post, and I found it interesting, so I’m implementing it in my current project.
Though I’m feeling a little weird about this and I feel that there is a better way to do it. Since we load the UI and our singleton is not on screen until run-time, I can’t just reference the UI elements on the inspector, instead, I need to find everything on my prefab for just then manipulate them according to my needs, which takes time.
My question is if this approach is bad and if it is, is there a better way to do it?