So hello everyone, I need to know something about the Unity’s process of optimizing unused scripts. So let me explain, I have one huge scene, it’s like there are 3-4 floors, some passages and some extra rooms etc. I’ve created checkpoints, where the player will not be able to return back. For example, there is a huge livingroom, when player is done with it, it goes to the floor below and won’t be able to turn back to the livingroom. Now my question is, I already achieve graphics optimization via Occlusion Culling and LOD. But, when the player gets to the lower floors, there will be a lot of inactive objects with gameplay scripts on them. Will this affect the gameplay or the memory a lot? Should I do something like a loading screen, when the player gets down to the lower floors, just for a few seconds, and while at it, run a coroutine to delete all the gameobjects on the upper floor which has scripts on it ( some are disabled, some are enabled ) and then request a Garbage Collection right afterwards? Or should I just leave the objects like that, will the automatic GC process handle those objects?

I don’t necessarily delete gameobjects on the gameplay, in every gameplay script I wrote, I did:

gameObject.SetActive(false);

instead of

Destroy(gameObject);

So, considering that there will be a lot of checkpoints, there will be a lot of ( from 10 to - 110 according to the player’s process on the level ) unused, both active & inactive gameobjects that have both active & inactive scripts on them, what should I do to prevent those unused objects to affect further gameplay?

I would not ‘delete/destroy’ game objects seeing how that is expensive, set active is fine.
There are a few more things you can do.

batching: Unity - Manual: Draw call batching.

Object pooling: https://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/object-pooling

You can even go as far as change or turn of materials how far away the user is from the object.
Turn off as many Colliders as you can or have the ones you need turn on when the player gets to a position in the game.

If you really need to, yes put checkpoints in the game. I would also suggest to have a manager for the objects you need and not have 100 components that have diffrent memory in them, example: 100 checkpoints with each one calling it’s own functions. You should have a manager that checks to see what objects collider has gone off and then call the managing function.
If one checkpoint has gone off turn that one off and activate only the next checkpoint in the array. The Collider checks are expensive as well.