Initial commit: AIGame Unity client with URP, HybridCLR, YooAsset and tooling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-09-21 14:21:07 +08:00
co-authored by Cursor
commit f3f66ab063
931 changed files with 112366 additions and 0 deletions
@@ -0,0 +1,23 @@
#nullable enable
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace IlInterpreter.Interpreter
{
// Default frame allocator used outside Unity (and anywhere a host doesn't inject its own).
// Marshal.AllocHGlobal is platform-neutral and AOT/IL2CPP-safe, and keeps the engine free of
// any Unity.Collections dependency. Returns 8-byte-aligned memory on all supported runtimes.
sealed unsafe class MarshalFrameAllocator : IFrameAllocator
{
public static readonly MarshalFrameAllocator Instance = new();
public void* Alloc(int byteCount) => (void*)Marshal.AllocHGlobal(byteCount);
public void Free(void* ptr)
{
if (ptr != null) Marshal.FreeHGlobal((nint)ptr);
}
}
}