Hey ive got a dumb question: can you findobjectsoftype somehow on multiple frames? I get big spikes in my void start when i try to findobjectoftype. I need it so not searching them like this isnt an option. Did someone else stumbled across this and fixed it somehow? Coroutines and waitforframe wont work but maybe with async there is a way? Anyone got experience with async?
FindObjectsOfType is not a performant method in general.
A better option may be to maintain your own list of objects that you’re interested in and use that list directly. Simply add objects to the list as they are created and remove them as they are destroyed. Then there is no need for any Findxxx methods at all.
1 Like