111
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using YooAsset;
|
||||
|
||||
namespace Tuan.GameFramework
|
||||
{
|
||||
public class Asset : MonoBehaviour
|
||||
{
|
||||
async UniTask LoadAsync(string name)
|
||||
{
|
||||
AssetHandle handle = YooAssets.LoadAssetAsync(name);
|
||||
await handle.ToUniTask();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d9170e9f660395d47b0f02466e5fd091
|
||||
@@ -26,13 +26,9 @@ namespace Tuan.GameFramework
|
||||
private async UniTask EnterGame()
|
||||
{
|
||||
Debug.Log("EnterGame");
|
||||
var assetHandle = YooAssets.TryGetPackage("Main").LoadSceneAsync("Test");
|
||||
var assetHandle = YooAssets.LoadAssetAsync<GameObject>("GameStart");
|
||||
await assetHandle.ToUniTask();
|
||||
if (assetHandle.Status == EOperationStatus.Succeed)
|
||||
{
|
||||
assetHandle.ActivateScene();
|
||||
PatchEvent.ClosePatchWindow();
|
||||
}
|
||||
GameObject.Instantiate(assetHandle.AssetObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,8 @@
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:3fe1a3e70da50184f9897101cad7e4f2",
|
||||
"GUID:13ba8ce62aa80c74598530029cb2d649",
|
||||
"GUID:928f8a513cd12e84cb0d3c0a21a84e2f"
|
||||
"GUID:928f8a513cd12e84cb0d3c0a21a84e2f",
|
||||
"GUID:3de88c88fbbb8f944b9210d496af9762"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
using IngameDebugConsole;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Tuan.GameFramework
|
||||
{
|
||||
public class GameManager : Singleton<GameManager>
|
||||
{
|
||||
|
||||
[ConsoleMethod("clear_prefs", "Clears all PlayerPrefs data")]
|
||||
public static void ClearPlayerPrefs()
|
||||
{
|
||||
PlayerPrefs.DeleteAll();
|
||||
PlayerPrefs.Save();
|
||||
Debug.Log("<color=orange>All PlayerPrefs have been cleared!</color>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user