com.alicizax.unity.framework/Runtime/Scene/SceneComponent.cs

21 lines
461 B
C#
Raw Normal View History

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