2025-09-05 19:46:30 +08:00
|
|
|
using AlicizaX;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
namespace AlicizaX.Scene.Runtime
|
|
|
|
|
{
|
|
|
|
|
[DisallowMultipleComponent]
|
|
|
|
|
[AddComponentMenu("Game Framework/Scene")]
|
|
|
|
|
public sealed class SceneComponent : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
private void Awake()
|
|
|
|
|
{
|
2026-04-20 13:46:44 +08:00
|
|
|
if (!AppServices.TryGetApp<ISceneService>(out _))
|
2026-03-31 17:25:20 +08:00
|
|
|
{
|
2026-04-20 13:46:44 +08:00
|
|
|
AppServices.RegisterApp(new SceneService());
|
2026-03-31 17:25:20 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AppServices.EnsureScene();
|
2025-09-05 19:46:30 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|