Question by
AditHaz · Mar 13, 2020 at 07:48 AM ·
dontdestroyonload
Map select from menu trouble with DontDestroyOnLoad()
So i have a 2 map objects lets call it map1 & map2. When the main menu is started, map1 is on the background, and i also have 2 buttons to change background to map1 or map2. When button 1 is clicked map1 is active and map2 is inactive and so. I want to make this background continue to the main game with DontDestroyOnLoad() method, but when i go back to main menu or reload the main menu, the map objects is duplicated. What should i do to make this right?
Comment