SanAndreasUnity
SanAndreasUnity copied to clipboard
Code improvements
Following code improvements:
- Remove blank Unity callbacks
- Combine .position and .rotation into .SetPositionAndRotation for better performance
- Use tuplet for swapping values
- Change Vector calculations for better performance
- Use TryGetComponent to have less memory allocations when no component is present
- Convert if-else to single return for performance
- Put together 2 strings for better performance and less garbage allocations
- Use SetPixels32 instead of SetPixels for better performance and lower memory usage
- Reuse collision callbacks for lower garbage allocation