I have a background that is the same throughout my game. It starts in the start screen scene, where I apply DontDestroyOnLoad to it. However, what happens if the player returns to the start screen? I don’t want a duplicate background object to appear! There are obvious ways to make it so that the object doesn’t appear when returning, such as by setting a global flag variable, but that seems a bit messy. Is there a simpler way?
One quick solution would be to make your BG Singleton and handle spawning via Singleton Logic >> As Singletons can only have one object of said type at any given time.
Although I am not a fan of singletons, but here might just be the best example to use singleton.