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-03-31 17:25:20 +08:00
|
|
|
if (!AppServices.App.TryGet<ISceneService>(out _))
|
|
|
|
|
{
|
|
|
|
|
AppServices.App.Register(new SceneService());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AppServices.EnsureScene();
|
2025-09-05 19:46:30 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|