2026-04-16 오브젝트 그림자
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
using Unity.Collections;
|
||||
using Unity.Collections.LowLevel.Unsafe;
|
||||
|
||||
namespace BadDog.Rendering.AreaLight
|
||||
{
|
||||
internal static class NativeArrayExtensionsCompat
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe ref readonly T UnsafeElementAt<T>(this NativeArray<T> array, int index)
|
||||
where T : struct
|
||||
{
|
||||
return ref UnsafeUtility.ArrayElementAsRef<T>(NativeArrayUnsafeUtility.GetUnsafeReadOnlyPtr(array), index);
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe ref T UnsafeElementAtMutable<T>(this NativeArray<T> array, int index)
|
||||
where T : struct
|
||||
{
|
||||
return ref UnsafeUtility.ArrayElementAsRef<T>(NativeArrayUnsafeUtility.GetUnsafePtr(array), index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user