- Home /
More scripts = more lag?
I just want to know, if I do thousands of scripts, even if it's short scripts, it'll affect the performance?
Answer by Meltdown · Mar 19, 2015 at 12:04 AM
Yes, each time the engine has to call into an Update() or FixedUpdate() method, even if it's empty, it will incur a performance hit. So yes, thousands of short scripts will still affect performance.
But, let's say: 1 - I use lots of scripts just to store information. 2 - I use a giant script on lots of objects ins$$anonymous$$d of lots of scripts on lots of objects.
Answer by Eluate · Mar 19, 2015 at 08:38 AM
It all depends on what those scripts are doing. If they are calling a method which is constantly update (for example Update() and FixedUpdate()) you are going to see a performance hit. If they are just storing variables (I'd recommend not doing this), then you won't see a performance hit. It may use slightly more memory though.
Your answer
Follow this Question
Related Questions
Random lag spikes any time processor intensive tasks a scene 0 Answers
Game Runs Horribly Slow On iPad? 3 Answers
iOS : Delayed response to touch began? 1 Answer
Lagspike when using instantiate in coorutine 0 Answers
Android Performance REALLY Laggy 2 Answers