- Home /
Do unused scripts affect on performance?
Example; player plays scene1 with script1 but there is scene2 with script2 and there is script3 includes variables and methods. Script1 and scipt2 indipendent from each other but they both use methods and variables of script3. Does script2 effect scene1's perfomance?
Answer by FlaSh-G · Aug 16, 2020 at 12:14 AM
Performance is what is used up to do things. If you don't do things, you don't have any less performance. Having objects or classes lying around doesn't cost computation power. Of course, if your code for some reason does some sort of work, that work has to be done by the computer.
So the answer is no, unless you built something into script 2 that performs some work while scene 1 is open.
Your answer
Follow this Question
Related Questions
Levels: scenes or GameObjects? 3 Answers
Referenced script on this behaviour(Main camera) is missing 1 Answer
Why 3D models look bad in unity? 2 Answers
Why is the Mover script blocking movement in Space Shooter? 2 Answers
To pass a variable between scenes should I use scriptableobject or static ? 1 Answer