Files
SVSimServer/SVSim.BattleEngine/Engine/Cute/BootSystem.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
2026-06-05 17:22:20 -04:00

146 lines
3.1 KiB
C#

#define STEAM
using System;
using System.Collections;
using System.Diagnostics;
using com.adjust.sdk;
using RedShellUnity;
using Steamworks;
using UnityEngine;
using Wizard;
namespace Cute;
public class BootSystem : MonoBehaviour
{
[SerializeField]
[Tooltip("チェックするとMaxFramerateが有効")]
private bool _dontVsync;
[SerializeField]
[Range(0f, 60f)]
private int _maxFramerate;
public static bool isRootBootCamera;
private Coroutine _logCoroutine;
private string _logMsg = "";
private void Awake()
{
_logMsg += "Awake";
if (isRootBootCamera)
{
UnityEngine.Object.Destroy(GameObject.Find("BootCamera"));
isRootBootCamera = false;
}
VisibleBootCamera(enable: true);
UnityEngine.Object.DontDestroyOnLoad(base.gameObject);
}
private IEnumerator Start()
{
_logCoroutine = StartCoroutine(WaitToAccumulateTraceLog());
_logMsg += " Start";
while (Toolbox.DeviceManager == null)
{
yield return 0;
}
_logMsg += " DeviceManager";
while (Toolbox.SavedataManager == null)
{
yield return 0;
}
_logMsg += " SavedataManager";
while (Toolbox.QualityManager == null)
{
yield return 0;
}
_logMsg += " QualityManager";
while (Toolbox.SceneManager == null)
{
yield return 0;
}
_logMsg += " SceneManager";
while (Toolbox.ResourcesManager == null)
{
yield return 0;
}
_logMsg += " ResourcesManager";
while (Toolbox.AssetManager == null)
{
yield return 0;
}
_logMsg += " AssetManager";
while (Toolbox.AudioManager == null)
{
yield return 0;
}
_logMsg += " AudioManager";
while (Toolbox.MovieManager == null)
{
yield return 0;
}
_logMsg += " MovieManager";
SocialServiceUtility.CreateInstance();
bootAdjust();
setupRedShell();
if (_dontVsync)
{
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = _maxFramerate;
}
StopCoroutine(_logCoroutine);
Toolbox.BootSystem = this;
}
private IEnumerator WaitToAccumulateTraceLog()
{
yield return new WaitForSeconds(5f);
LocalLog.AccumulateTraceInquiryLog("BootSystem " + _logMsg);
}
private void bootAdjust()
{
try
{
}
catch (Exception ex)
{
LocalLog.AccumulateTraceLog(ex.ToString());
}
Adjust.addSessionCallbackParameter("viewer_id", Certification.ViewerId.ToString());
}
private void OnDestroy()
{
}
public void VisibleBootCamera(bool enable)
{
GameObject gameObject = base.transform.Find("BootCamera").gameObject;
if (gameObject != null)
{
gameObject.SetActive(enable);
}
}
[Conditional("STEAM")]
private void setupRedShell()
{
RedShell.SetVerboseLogs(verboseLogs: true);
RedShell.SetApiKey("04b8d4a58416140132fdcd680b17a0d8");
try
{
RedShell.SetUserId(SteamUser.GetSteamID().m_SteamID.ToString());
}
catch (Exception ex)
{
Debug.LogError("<color=aqua>steam client が起動していない。steamの機能を使えません。</color>");
Debug.LogError(ex.Message);
Debug.LogError(ex.StackTrace);
}
RedShell.MarkConversion();
}
}