Files
SVSimServer/SVSim.BattleEngine/Shim/UnityEngine/UnityShim2.cs
gamer147 9376b35db2 port(m1): wave 6c — Unity + Steam/FB/Adjust static-class shims (696->572)
Off-battle-path static surfaces (CS0103 cluster):
- UnityStatics: Gizmos, Physics2D, Caching, GUIUtility, Cursor, ColorUtility,
  ScreenCapture, RenderSettings, JsonUtility, Social + CursorLockMode enum.
- RaycastHit2D implicit-bool operator; ILocalUser in SocialPlatforms.
- Steamworks: Callback<T>.Create, AppId_t/CSteamID/HAuthTicket/SteamNetworkingIdentity,
  MicroTxn/GetAuthSessionTicket response structs, SteamAPI/User/Utils/Client statics.
  Removed empty dup GetAuthSessionTicketResponse_t from ThirdParty.cs.
- Facebook.Unity: FB + ILoginResult + FacebookDelegate<T>; com.adjust.sdk.Adjust;
  global TimeNativePlugin/Packsize native-plugin stubs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-05 23:56:52 -04:00

70 lines
3.0 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 bool isTrigger { get; set; } public Vector2 offset { get; set; } public Vector2 size { get; set; } }
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 { }
public interface ILocalUser { void Authenticate(System.Action<bool> callback); }
}