I'm on a mission to eliminate garbage generation in our game (it's VR, so GC is a really bad thing for us). I've got to the point where there's only one source of garbage left, and it's the Global Message Listener.
Turns out that if any component has an OnGUI function, it causes Unity's IMGUI process to run every frame which generates a few hundred bytes of garbage. Global Message Listener has an OnGUI function, and so generates garbage.
We're not hooking in any of the messages that Message Listener supplies, so it's safe for us to get rid of it. My current plan is just to write some code that finds it and sets it as inactive. I was just wondering though - is there an "official" way to prevent it being created in the first place?
Customer support service by UserEcho