Skip to content

Commit

Permalink
Update Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppArrayBase.cs
Browse files Browse the repository at this point in the history
Co-authored-by: js6pak <me@6pak.dev>
  • Loading branch information
ds5678 and js6pak authored Oct 5, 2024
1 parent c76252d commit 5c28694
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ protected Il2CppArrayBase(IntPtr pointer) : base(pointer)
/// <summary>
/// The pointer to the first element in the array.
/// </summary>
private protected IntPtr ArrayStartPointer => IntPtr.Add(Pointer, 4 * IntPtr.Size);
private protected unsafe IntPtr ArrayStartPointer => IntPtr.Add(Pointer, sizeof(Il2CppObject) /* base */ + sizeof(void*) /* bounds */ + sizeof(nuint) /* max_length */);

Check failure on line 17 in Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppArrayBase.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'Il2CppObject' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 17 in Il2CppInterop.Runtime/InteropTypes/Arrays/Il2CppArrayBase.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'Il2CppObject' could not be found (are you missing a using directive or an assembly reference?)

public int Length => (int)IL2CPP.il2cpp_array_length(Pointer);

Expand Down

0 comments on commit 5c28694

Please sign in to comment.