Understanding game structure

I’m learning c# and unity, lockdown boredom but I’m having a lot of fun .

I’m not necessarily looking for the answer to my problem more to what question to ask .

If I have a scene in a 2d platfomer and around half way through I have a disappearing platform , it doesn’t need to be disappearing and reappearing until the player comes near to it. Same with say a Goomba style enemy , it doesn’t need to be patrolling when the player is at the other half of the scene .

Is it some sort of trigger related to the camera position for example ?

Any tips on where to start my search or give me a tip as to what type of solution I should be looking.

Any advice would be gratefully received.

Frustum Culling stops you rendering things that are outside of the cameras frame.

If you want to (and if your camera pans on the horizontal axis like Mario) add in other optimisations you can dynamically load assets into position slightly ahead of your cameras position.

Have you looked into object pooling?

Thanks for taking the time to answer it gives me a great start