I’m having some weird issues when calling the Button.onClick.Invoke() method. According to the Scripting API it is used to invoke all the callbacks that are registered to that button, which is exactly what I’m trying to do.
Sadly when I call this method, Unity hangs for a second and then starts giving me these weird errors:
TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations
Followed by a couple of these logs, and then repeats.
Allocation of 1280 bytes at 06179290
Another thing to note is that when I stop running and start again these errors appear without calling the method. I have to completely quit Unity and restart it to get rid of these errors.
A quick Google search has not given me any answers. Does someone here know what causes these errors?