Question by
IgnitedGames · Feb 15, 2020 at 11:14 AM ·
foreachoptimisationoptimise
Optimising assigning variables automatically
So at the moment, my approach to this is to have one central script that I assign 4 major gameObjects manually to. Then it goes through each of these objects and does a tonne of "foreach (Transform child in x.transform) stuff and assigns every variable through there. I don't have any evidence that this is taking a hit on performance. Is there a more optimised way of doing this?
Comment
@IgnitedGames Could you explain what you are intending to do, generally speaking? What's the goal of the tons of stuff you do which you mention? Also, could you paste the relevant code parts of the transform changing loop? Thanks!