We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This NativeArray extension could optimize LiDAR calculation.
using System; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; namespace HOGE_NAMESPACE { public static partial class NativeArrayRefExtensions { public static ref T GetRef<T>(this NativeArray<T> array, int index) where T : struct { if (index < 0 || index >= array.Length) throw new ArgumentOutOfRangeException(nameof(index)); unsafe { return ref UnsafeUtility.ArrayElementAsRef<T>(array.GetUnsafePtr(), index); } } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This NativeArray extension could optimize LiDAR calculation.
The text was updated successfully, but these errors were encountered: