AlicizaX/Client/Assets/Scripts/Hotfix/GameLogic/HotfixEntry.cs
2025-09-02 16:30:55 +08:00

45 lines
1.1 KiB
C#

using UnityEngine;
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using AlicizaX;
using YooAsset;
using Cysharp.Threading.Tasks;
using Hotfix.GameLogic;
using Luban;
using UnityEngine.SceneManagement;
namespace GameLogic
{
public static class HotfixEntry
{
private static List<Assembly> _hotfixAssembly;
public static List<Assembly> HotfixAssembly => _hotfixAssembly;
public static void Entrance(object[] objects)
{
Log.Info("HotFix Logic Entry!");
_hotfixAssembly = (List<Assembly>)objects[0];
}
/// <summary>
/// 加载二进制配置表
/// </summary>
/// <param name="file"></param>
/// <returns></returns>
private static async Task<ByteBuf> ConfigBufferLoader(string file)
{
var textAsset = await GameApp.Resource.LoadAssetAsync<TextAsset>(file);
byte[] bytes = textAsset.bytes;
GameApp.Resource.UnloadAsset(textAsset);
return ByteBuf.Wrap(bytes);
}
}
}