com.alicizax.unity.framework/Runtime/Scene/SceneComponent.cs
陈思海 6397cc03b2 框架大更新
1.进步优化UI系统 加载问题 性能问题 Canvas重绘问题 边界处理问题
2.优化对象池和游戏对象池的性能 游戏对象池根据窗口 策略定期清理
3.优化整个AppService 和ServiceWorld结构 固定三大类 具体参考代码
2026-03-31 17:25:20 +08:00

21 lines
461 B
C#

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();
}
}
}