using System.IO; using Fantasy.ConfigTable; using UnityEditor; using UnityEngine; namespace Fantasy { public class AssetsBundleManager : IConfigTableAssetBundle { public string Combine(string assetBundleDirectoryPath, string dataConfig) { return Path.Combine(assetBundleDirectoryPath, $"{dataConfig}.bytes"); } public byte[] LoadConfigTable(string assetBundlePath) { #if UNITY_EDITOR || UNITY_EDITOR_64 if (File.Exists(assetBundlePath)) { return AssetDatabase.LoadAssetAtPath(assetBundlePath).bytes; } UnityEngine.Debug.LogError($"assetBundlePath:{assetBundlePath} not exist"); return null; #else #endif } } }