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,53 @@
#nullable enable
using System;
using System.Collections.Generic;
namespace IlInterpreter
{
/// <summary>Base exception for all IlInterpreter errors.</summary>
public class ScriptException : Exception
{
/// <summary>Create the exception with a message.</summary>
/// <param name="message">The exception message.</param>
public ScriptException(string message) : base(message) { }
/// <summary>Create the exception with a message and an inner cause.</summary>
/// <param name="message">The exception message.</param>
/// <param name="inner">The exception that caused this one, if any.</param>
public ScriptException(string message, Exception? inner) : base(message, inner) { }
}
/// <summary>Raised when script source fails to compile.</summary>
public class ScriptCompileException : ScriptException
{
/// <summary>The compiler diagnostics that failed the compilation.</summary>
public IReadOnlyList<string> Diagnostics { get; }
/// <summary>Create the exception from the diagnostics that failed the compilation.</summary>
/// <param name="diagnostics">The compiler diagnostics that failed the compilation.</param>
public ScriptCompileException(IReadOnlyList<string> diagnostics)
: base($"Script compilation failed with {diagnostics.Count} error(s).")
{
Diagnostics = diagnostics;
}
}
/// <summary>Raised when compiled IL fails validation.</summary>
public class ScriptValidationException : ScriptException
{
/// <summary>Create the exception with a message.</summary>
/// <param name="message">The exception message.</param>
public ScriptValidationException(string message) : base(message) { }
}
/// <summary>Raised during interpreter execution.</summary>
public class ScriptRuntimeException : ScriptException
{
/// <summary>Create the exception with a message.</summary>
/// <param name="message">The exception message.</param>
public ScriptRuntimeException(string message) : base(message) { }
/// <summary>Create the exception with a message and an inner cause.</summary>
/// <param name="message">The exception message.</param>
/// <param name="inner">The exception that caused this one, if any.</param>
public ScriptRuntimeException(string message, Exception? inner) : base(message, inner) { }
}
}