Forum Discussion
FocusVRGames
9 years agoAdventurer
Is using LINQ allowed?
I have been using LINQ in parts of my game. It is mentioned in the Oculus guide to avoid LINQ, I have the two below bits of code, both do the same job. I have done some performance tests on a 1 mil...
vrdaveb
9 years agoOculus Staff
> Do Oculus allow LINQ in submissions or is it a complete no no?
There is no hard rule against LINQ or any of the practices our guides discourage. Our store team only looks at the end result - does the app pass the Technical Requirements Checks (Gear VR, Rift)? We try to help you meet those requirements, but how you meet them is of course up to you.
> Any advice on the garbage created from one to the other?
Typically LINQ and foreach create more garbage than a plain for loop because they instantiate iterators that take a small amount of memory for each iteration. You can check the GC impact by watching for spikes in Unity's CPU profiler. Look for GC.Collect.
There is no hard rule against LINQ or any of the practices our guides discourage. Our store team only looks at the end result - does the app pass the Technical Requirements Checks (Gear VR, Rift)? We try to help you meet those requirements, but how you meet them is of course up to you.
> Any advice on the garbage created from one to the other?
Typically LINQ and foreach create more garbage than a plain for loop because they instantiate iterators that take a small amount of memory for each iteration. You can check the GC impact by watching for spikes in Unity's CPU profiler. Look for GC.Collect.
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
- 12 months ago
- 12 months ago