Files
SVSimServer/SVSim.BattleEngine/Shim/UnityEngine/UnityShim2.cs
gamer147 d01e3da869 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>
2026-06-05 22:14:23 -04:00

69 lines
2.8 KiB
C#

// AUTHORED SHIM (not copied). Second UnityEngine batch surfaced by the M1 compile
// loop (wave after the 2,570-file copy closure). Same rules as UnityShim.cs: no-op
// presentation/IO surface; add only what the compiler demands. Asset/light/collider
// types are referenced only as field/parameter types or via suppressed-IO calls.
using System;
namespace UnityEngine
{
public class TextAsset : Object
{
public string text => "";
public byte[] bytes => new byte[0];
}
public class AsyncOperation
{
public bool isDone => true;
public float progress => 1f;
public int priority { get; set; }
public bool allowSceneActivation { get; set; }
}
public class AssetBundle : Object
{
public static AssetBundle LoadFromFile(string path) => null;
public static AssetBundleCreateRequest LoadFromFileAsync(string path) => null;
public string[] GetAllAssetNames() => new string[0];
public T LoadAsset<T>(string name) where T : Object => null;
public Object LoadAsset(string name) => null;
public Object[] LoadAllAssets() => new Object[0];
public AssetBundleRequest LoadAllAssetsAsync() => null;
public void Unload(bool unloadAllLoadedObjects) { }
}
public class AssetBundleCreateRequest : AsyncOperation { public AssetBundle assetBundle => null; }
public class AssetBundleRequest : AsyncOperation { public Object asset => null; public Object[] allAssets => new Object[0]; }
public class Collider2D : Component { public bool enabled { get; set; } }
public partial class BoxCollider2D : Collider2D { }
public partial class Light : Behaviour { }
public class AudioListener : Behaviour { }
public enum RenderTextureFormat { ARGB32, Depth, ARGBHalf, ARGB64, Default }
public enum RuntimeInitializeLoadType
{
AfterSceneLoad, BeforeSceneLoad, AfterAssembliesLoaded,
BeforeSplashScreen, SubsystemRegistration
}
public sealed class RuntimeInitializeOnLoadMethodAttribute : Attribute
{
public RuntimeInitializeOnLoadMethodAttribute() { }
public RuntimeInitializeOnLoadMethodAttribute(RuntimeInitializeLoadType loadType) { }
}
}
// Sub-namespace anchors (referenced via `using`; types unmask in later waves if used).
namespace UnityEngine.Experimental { internal class _ShimAnchor { } }
namespace UnityEngine.Experimental.Rendering { internal class _ShimAnchor { } }
namespace UnityEngine.SceneManagement { internal class _ShimAnchor { } }
namespace UnityEngine.SocialPlatforms
{
// NOTE: no IAchievementCallback here -- the engine's AchievementImpl uses
// Cute.IAchievementCallback; adding one here makes the unqualified name ambiguous.
public interface IAchievement { }
public interface IAchievementDescription { }
}