i want to make another page for my application in which there would be 3d object rotating on canvas.
i made another scene for that. but when i switch to another scene and return back light become dim.
i don’t know what happened.
i also generate coins (prefab), which go disappear after coming on first scene.
You can use Serialization or…you can simply use this:
The lights dimming like that is caused by it not rebuilding the lightmap. I believe this only happens when switching scenes when playing the game from the editor though and not in a standalone build.
You can solve this issue in the editor by going to Window>Lighting, unticking Auto and clicking Build to store the lightmap.
‘Serialization’ is a pretty generic term which doesn’t really explain what to do and
DontDestroyOnLoad seems like a good way of just hogging extra memory unnecessarily if used on all the objects. If all you need it to do is remember how many coins were on screen and their positions then a script using DontDestroyOnLoad just for itself and which stores the coin positions and instantiates them again in the same place when the scene is revisited seems like it would perhaps be more sensible. It depends how frequently you need the scene to be reloaded, how complex it is and therefore how long it takes to load.