增加yooasset兼容

main
刘涛 2024-02-21 16:24:29 +08:00
parent ad9c30e375
commit 7780d0c25f
5 changed files with 62 additions and 6 deletions

Binary file not shown.

View File

@ -117,6 +117,30 @@ MonoBehaviour:
FilterRuleName: CollectAll
AssetTags:
UserData:
- CollectPath: Assets/Scenes/ObjectPostProcessData.asset
CollectorGUID: d4ab67b80d948f842a6f2561f4857870
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory
FilterRuleName: CollectAll
AssetTags:
UserData:
- CollectPath: Assets/Art/Character/Models/Emoji/Tex
CollectorGUID: 0ebead508731f0d439b3a1106127d6cd
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory
FilterRuleName: CollectAll
AssetTags:
UserData:
- CollectPath: Assets/Art/Character/Models/Emoji/Mat
CollectorGUID: f0f1bba7c39305342bae159384ba5508
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory
FilterRuleName: CollectAll
AssetTags:
UserData:
- GroupName: Level_BuildIn
GroupDesc:
AssetTags:
@ -437,6 +461,14 @@ MonoBehaviour:
FilterRuleName: CollectScene
AssetTags:
UserData:
- CollectPath: Assets/Scenes/TeamEdit/TeamPreviewNode.prefab
CollectorGUID: 8b38720b2a034bd47b42be95986ebc2f
CollectorType: 0
AddressRuleName: AddressByFileName
PackRuleName: PackDirectory
FilterRuleName: CollectAll
AssetTags:
UserData:
- GroupName: SplitCharacter
GroupDesc:
AssetTags:

View File

@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using Cysharp.Threading.Tasks;
using PhxhSDK.AOT;
using UnityEngine;
namespace PhxhSDK
@ -7,10 +9,17 @@ namespace PhxhSDK
public class Main : SingletonMono<Main>
{
private static Game _game;
private bool _isInited;
private void Awake()
{
SDKManager.GetSingleton().InitEarly();
DontDestroyOnLoad(gameObject);
}
private void _InitGame()
{
SDKManager.GetSingleton().InitEarly();
_game = new MyGame();
if (_game == null)
{
@ -18,22 +27,33 @@ namespace PhxhSDK
}
SDKManager.GetSingleton().Init();
_game.Init();
_game.Start();
}
private async void _InitAsync()
{
_isInited = false;
#if USE_YOO
await YooAssetHelper.Init();
#endif
_isInited = true;
_InitGame();
}
private void Start()
{
_game.Start();
_InitAsync();
}
private void Update()
{
if (!_isInited) return;
_game.Update(Time.deltaTime);
}
private void OnApplicationPause(bool pauseStatus)
{
if (!_isInited) return;
_game.OnApplicationPause(pauseStatus);
}

View File

@ -5,6 +5,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using PhxhSDK.AOT;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.ResourceManagement.AsyncOperations;
@ -121,6 +122,9 @@ public class GameLauncher : MonoBehaviour
// _SafeProtect();
#if UNITY_EDITOR
enableHotUpdate = false;
#endif
#if USE_YOO
yield return YooAssetHelper.Init();
#endif
Debug.Log($"Launch Game! enableHotUpdate:{enableHotUpdate}");
yield return VersionCheck();

@ -1 +1 @@
Subproject commit 705bd7e7cec73f5d7bcc582a8a7911c4312fc52d
Subproject commit 14e358220f377f2ca7cd48051ef12f49049fbf2a