using System; using System.IO; namespace ET.Client { [Callback(CallbackType.InitClient)] public class InitClient: IFunc { public async ETTask Handle() { // 加载配置 Game.Scene.AddComponent(); Game.Scene.AddComponent(); await ResourcesComponent.Instance.LoadBundleAsync("unit.unity3d"); Scene clientScene = await SceneFactory.CreateClientScene(1, "Game", Game.Scene); await Game.EventSystem.PublishAsync(clientScene, new EventType.AppStartInitFinish()); } } }