Forum Discussion
bp2008
12 years agoProtege
Doesn't garbage collection cause distracting hitches?
For a while now I've been wondering about the effect of the C#/Mono/.NET or Java garbage collectors on VR games. Garbage collectors are well known to cause hitching and stuttering in games. For a lo...
Arowx
12 years agoExplorer
There are workarounds for a lot of GC issues, but it means having the Pro version of Unity and using it's profiler to track down and adapt your code to limit the memory allocations and garbage collections.
A simple example is the use of Object pooling for repeating fast use objects, e.g. bullets / missiles / effects.
But this will only reduce the impact of the GC in your game as far as I'm aware there is no way to remove it and some standard calls in Unity allocate memory.
Personally I have found that this approach is helpful but best combined with the optimisation pass on your game.
There are some great threads on the Unity forum for tips and hints that can help you optimise your game and the GC's activity.
A simple example is the use of Object pooling for repeating fast use objects, e.g. bullets / missiles / effects.
But this will only reduce the impact of the GC in your game as far as I'm aware there is no way to remove it and some standard calls in Unity allocate memory.
Personally I have found that this approach is helpful but best combined with the optimisation pass on your game.
There are some great threads on the Unity forum for tips and hints that can help you optimise your game and the GC's activity.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 11 years ago