feat(battle-engine): UnityEngine member + static-class shims (3526->2706)
Extend the UnityEngine value/component shims with no-op members surfaced by the compile loop (UnityWebRequest/Font/Mesh/LODGroup/AudioSource/Rigidbody/Camera/Sprite/Animation/ Transform/Material/Texture2D/Light/Input/Resources + CharacterInfo/Vector4), via partial declarations + UnityShimExt.cs. Add the missing UnityEngine static classes (PlayerPrefs/ Physics/GUI/SystemInfo/Graphics/QualitySettings/StackTraceUtility) + enums (TextureFormat/ ColorSpace/EventModifiers/RenderTextureReadWrite) + Experimental.Rendering.GraphicsFormat* in UnityStatics.cs. All cosmetic, off the battle path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -8,7 +8,7 @@ using System.Collections;
|
||||
namespace UnityEngine
|
||||
{
|
||||
// ---- value types (Vector2/3, Quaternion, Color, Mathf, Debug live in Primitives.cs) ----
|
||||
public struct Vector4 { public float x, y, z, w; public Vector4(float x, float y, float z, float w){ this.x=x; this.y=y; this.z=z; this.w=w; } }
|
||||
public partial struct Vector4 { public float x, y, z, w; public Vector4(float x, float y, float z, float w){ this.x=x; this.y=y; this.z=z; this.w=w; } }
|
||||
public struct Color32 { public byte r, g, b, a; public Color32(byte r, byte g, byte b, byte a){ this.r=r; this.g=g; this.b=b; this.a=a; } }
|
||||
public struct Bounds
|
||||
{
|
||||
@@ -113,7 +113,7 @@ namespace UnityEngine
|
||||
public bool IsInvoking() => false;
|
||||
}
|
||||
|
||||
public class Transform : Component, IEnumerable
|
||||
public partial class Transform : Component, IEnumerable
|
||||
{
|
||||
public Vector3 position { get; set; }
|
||||
public Vector3 localPosition { get; set; }
|
||||
@@ -231,12 +231,12 @@ namespace UnityEngine
|
||||
public struct Particle { public Vector3 position; public Vector3 velocity; public Color32 startColor; public float remainingLifetime; }
|
||||
}
|
||||
public class ParticleSystemRenderer : Renderer { }
|
||||
public class LODGroup : Component { }
|
||||
public partial class LODGroup : Component { }
|
||||
public class Collider : Component { public bool enabled { get; set; } }
|
||||
public class BoxCollider : Collider { public Vector3 size { get; set; } public Vector3 center { get; set; } public bool isTrigger { get; set; } }
|
||||
public class Rigidbody : Component { }
|
||||
public partial class Rigidbody : Component { }
|
||||
public class Rigidbody2D : Component { }
|
||||
public class Material : Object
|
||||
public partial class Material : Object
|
||||
{
|
||||
public Material() { }
|
||||
public Material(Material src) { }
|
||||
@@ -265,9 +265,9 @@ namespace UnityEngine
|
||||
public bool IsKeywordEnabled(string k) => false;
|
||||
public bool HasProperty(string n) => false;
|
||||
}
|
||||
public class Mesh : Object { public Vector3[] vertices { get; set; } public int[] triangles { get; set; } public void Clear() { } public void RecalculateBounds() { } }
|
||||
public partial class Mesh : Object { public Vector3[] vertices { get; set; } public int[] triangles { get; set; } public void Clear() { } public void RecalculateBounds() { } }
|
||||
public class Texture : Object { public int width => 0; public int height => 0; }
|
||||
public class Texture2D : Texture { public Texture2D(int w, int h) { } public void Apply() { } public Color GetPixel(int x, int y) => Color.white; public void SetPixel(int x, int y, Color c) { } }
|
||||
public partial class Texture2D : Texture { public Texture2D(int w, int h) { } public void Apply() { } public Color GetPixel(int x, int y) => Color.white; public void SetPixel(int x, int y, Color c) { } }
|
||||
public enum FilterMode { Point, Bilinear, Trilinear }
|
||||
public enum TextureWrapMode { Repeat, Clamp, Mirror, MirrorOnce }
|
||||
public enum WrapMode { Once = 1, Loop = 2, PingPong = 4, Default = 0, ClampForever = 8, Clamp = 1 }
|
||||
@@ -275,10 +275,10 @@ namespace UnityEngine
|
||||
public struct AnimatorStateInfo { public bool IsName(string name) => false; public float normalizedTime => 0f; public int shortNameHash => 0; public float length => 0f; }
|
||||
public struct AnimatorClipInfo { public AnimationClip clip => null; public float weight => 0f; }
|
||||
public class RenderTexture : Texture { public RenderTexture(int w, int h, int depth) { } public RenderTexture(int w, int h, int depth, RenderTextureFormat fmt) { } public void Create() { } public void Release() { } public bool IsCreated() => false; public static RenderTexture active { get; set; } public int depth { get; set; } public FilterMode filterMode { get; set; } public TextureWrapMode wrapMode { get; set; } public void DiscardContents() { } public static RenderTexture GetTemporary(int w, int h) => null; public static RenderTexture GetTemporary(int w, int h, int depth) => null; public static RenderTexture GetTemporary(int w, int h, int depth, RenderTextureFormat fmt) => null; public static void ReleaseTemporary(RenderTexture rt) { } }
|
||||
public class Sprite : Object { public Rect rect => default; public Texture2D texture => null; public static Sprite Create(Texture2D t, Rect r, Vector2 pivot) => null; }
|
||||
public class Shader : Object { public static Shader Find(string n) => null; public bool isSupported => true; }
|
||||
public partial class Sprite : Object { public Rect rect => default; public Texture2D texture => null; public static Sprite Create(Texture2D t, Rect r, Vector2 pivot) => null; }
|
||||
public partial class Shader : Object { public static Shader Find(string n) => null; public bool isSupported => true; }
|
||||
public class AnimationClip : Object { public float length => 0f; public string name { get; set; } }
|
||||
public class Animation : Component, IEnumerable { public AnimationClip clip { get; set; } public bool isPlaying => false; public void Play() { } public void Play(string n) { } public void Stop() { } public IEnumerator GetEnumerator() { yield break; } }
|
||||
public partial class Animation : Component, IEnumerable { public AnimationClip clip { get; set; } public bool isPlaying => false; public void Play() { } public void Play(string n) { } public void Stop() { } public IEnumerator GetEnumerator() { yield break; } }
|
||||
public class Animator : Component
|
||||
{
|
||||
public void SetTrigger(string n) { } public void SetTrigger(int id) { }
|
||||
@@ -295,8 +295,8 @@ namespace UnityEngine
|
||||
}
|
||||
public class AnimationCurve { public float Evaluate(float t) => 0f; public int length => 0; public Keyframe[] keys { get; set; } public WrapMode preWrapMode { get; set; } public WrapMode postWrapMode { get; set; } public static AnimationCurve Linear(float a, float b, float c, float d) => new AnimationCurve(); }
|
||||
public class AudioClip : Object { public float length => 0f; }
|
||||
public class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } public bool isPlaying => false; public bool loop { get; set; } public void Play() { } public void Stop() { } public void Pause() { } }
|
||||
public class Camera : Component
|
||||
public partial class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } public bool isPlaying => false; public bool loop { get; set; } public void Play() { } public void Stop() { } public void Pause() { } }
|
||||
public partial class Camera : Component
|
||||
{
|
||||
public static Camera main => null;
|
||||
public static Camera current => null;
|
||||
@@ -328,7 +328,7 @@ namespace UnityEngine
|
||||
public void Render() { }
|
||||
}
|
||||
public enum CameraClearFlags { Skybox = 1, Color = 2, SolidColor = 2, Depth = 3, Nothing = 4 }
|
||||
public struct CharacterInfo { }
|
||||
public partial struct CharacterInfo { }
|
||||
|
||||
// ---- coroutine machinery (never pumped headless; types must exist) ----
|
||||
public class YieldInstruction { }
|
||||
@@ -366,7 +366,7 @@ namespace UnityEngine
|
||||
public class MultilineAttribute : Attribute { public MultilineAttribute() { } public MultilineAttribute(int lines) { } }
|
||||
|
||||
// ---- subsystem singletons / statics ----
|
||||
public static class Application
|
||||
public static partial class Application
|
||||
{
|
||||
public static bool isEditor => false;
|
||||
public static bool isPlaying => true;
|
||||
@@ -384,7 +384,7 @@ namespace UnityEngine
|
||||
}
|
||||
public enum RuntimePlatform { WindowsPlayer, OSXPlayer, IPhonePlayer, Android, WindowsEditor, OSXEditor, LinuxPlayer }
|
||||
public enum SystemLanguage { English, Japanese, ChineseSimplified, ChineseTraditional, Korean, French, German, Unknown }
|
||||
public static class Time
|
||||
public static partial class Time
|
||||
{
|
||||
public static float deltaTime => 0f;
|
||||
public static float time => 0f;
|
||||
@@ -396,7 +396,7 @@ namespace UnityEngine
|
||||
public static int frameCount => 0;
|
||||
public static float timeSinceLevelLoad => 0f;
|
||||
}
|
||||
public static class Screen
|
||||
public static partial class Screen
|
||||
{
|
||||
public static int width => 1920;
|
||||
public static int height => 1080;
|
||||
|
||||
Reference in New Issue
Block a user