- Home /
Object.get_name() performance
So basically one of my methods in my AI script calls this method a fair bit - usually about 120 to 150 times per frame This causes the GC Alloc to be about 5KB per frame, which takes 3 to 4 milliseconds Anybody got any ideas on how to reduce this? I guess I could write a script that caches the name, but then I'd have to remember to add it to every new prefab I make, so an alternative solution would be preferable Thanks
Your answer
Follow this Question
Related Questions
Most performance friendly way to "unrender" a GameObject? 6 Answers
Should I pool an object that only spawn every second? 1 Answer
Disable objects far away from player to make performance better 2 Answers
Are .gameObject and .transform both using GetComponent() in the background? 1 Answer
Add 2d rigidbodies to moving objects to increase performance or not? 1 Answer