Hi, I would like to know the best practice for my game regarding switching assets on and off during gameplay.
I am doing an update to my train game “Alpine Train 3D”. The scene consists of a big 3D mountain with tunnels going into the centre of the mountain. Originally there was just one large cave model that sits inside the mountain and is always switched on.
In my last update I built a new cave that occupied the same physical space as the original cave. As you drive your train into the new tunnel the old cave switches off by setting the mesh renderer to off and then I switch the new cave’s mesh renderer on. This way I can keep adding new caves into the same space in the mountain.
I have notices that there is a few frames pause in the game as the different meshes are being switched off and on.
Is there a better way to dynamically load and unload large meshes into a scene as you are playing the game?
Also a very big thank you to all the unity community, without your answers my game would have never got off the ground, let alone be for sale in the app store.