- Home /
Too subjective and argumentative
Why SetActive Game Objects generate too much Garbage in the profiler?
Hello,
I'm trying to undertand the data in my profiler. I'm getting these spikes everytime I call a coroutine. Inside the coroutine I call other fucntion in my class that Disable and latter on Enable Game Objects ( about 60 or so, every turn). I'm not sure why that much of Garbage is being collected. What could be causing this? I've tried WaitUntil, when calling the functions that enable and siable GO, but still the same.
Use Deep Profile for more info. It s not clear what is generating the garbage.
Answer by abuelitovip · Nov 18, 2017 at 01:08 AM
Can you test with IEnumerator and Invoke options for control of times. If you add lines of Debug.Log for check with "start" and "pause" button the game and read debug messages for control of the repeats in 5 seconds, this can help to you for see how affect your changes to the number of repeats in specific zones of the code.