1.进步优化UI系统 加载问题 性能问题 Canvas重绘问题 边界处理问题 2.优化对象池和游戏对象池的性能 游戏对象池根据窗口 策略定期清理 3.优化整个AppService 和ServiceWorld结构 固定三大类 具体参考代码
45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using System;
|
|
using AlicizaX;
|
|
using Cysharp.Threading.Tasks;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
namespace AlicizaX.Scene.Runtime
|
|
{
|
|
public interface ISceneService : IService
|
|
{
|
|
public string CurrentMainSceneName { get; }
|
|
|
|
public UniTask<UnityEngine.SceneManagement.Scene> LoadSceneAsync(string location, LoadSceneMode sceneMode = LoadSceneMode.Single, bool suspendLoad = false, uint priority = 100, bool gcCollect = true,
|
|
Action<float> progressCallBack = null);
|
|
|
|
public void LoadScene(string location,
|
|
LoadSceneMode sceneMode = LoadSceneMode.Single,
|
|
bool suspendLoad = false,
|
|
uint priority = 100,
|
|
Action<UnityEngine.SceneManagement.Scene> callBack = null,
|
|
bool gcCollect = true,
|
|
Action<float> progressCallBack = null);
|
|
|
|
public bool ActivateScene(string location);
|
|
|
|
public bool UnSuspend(string location);
|
|
|
|
public bool IsMainScene(string location);
|
|
|
|
public UniTask<bool> UnloadAsync(string location, Action<float> progressCallBack = null);
|
|
|
|
public void Unload(string location, Action callBack = null, Action<float> progressCallBack = null);
|
|
|
|
public bool IsContainScene(string location);
|
|
}
|
|
|
|
public interface ISceneStateService : IService
|
|
{
|
|
public string CurrentMainSceneName { get; }
|
|
|
|
public bool IsContainScene(string location);
|
|
|
|
public bool IsMainScene(string location);
|
|
}
|
|
}
|