ultimatexr-unity
ultimatexr-unity copied to clipboard
Improved CPU performance
Improved CPU performance with different fixes. Some more important than others (SetPositionAndRotation should ALWAYS be used for example)
- Use SetPositionAndRotation instead of double transform call
- Re ordering vector calculations
- Merged if/else return into return
- Merged if/else bool into direct bool set
- Use TryGetComponent to avoid garbage allocation
- Use native .Count/.Length instead of LINQ alternative
- Improve string comparison
- Use AddRange
- Use Color32 when setting pixels
Hey Dylan. Hoping that gets merged! Thanks again for posting those Unity project templates for accelerated Quest performance.
Thanks a lot @smitdylan2001! Will be reviewed and merged in the next update.