mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-19 14:50:10 +00:00
feat: complete compatibility layer
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
@@ -46,5 +47,10 @@ namespace YooAsset
|
||||
/// 虚拟归档文件资源包(编辑器模拟 ArchiveBundle)
|
||||
/// </summary>
|
||||
VirtualArchiveBundle = 14,
|
||||
|
||||
#if YOOASSET_LEGACY_API
|
||||
[Obsolete("Use VirtualAssetBundle instead.")]
|
||||
VirtualBundle = VirtualAssetBundle,
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#if YOOASSET_LEGACY_API
|
||||
using System;
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
[Obsolete("Use EditorSimulateBuildInvoker.Build(packageName, (int)EBundleType.VirtualAssetBundle) instead.")]
|
||||
public static class EditorSimulateModeHelper
|
||||
{
|
||||
public static PackageBuildResult SimulateBuild(string packageName)
|
||||
{
|
||||
return EditorSimulateBuildInvoker.Build(packageName, (int)EBundleType.VirtualAssetBundle);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 89a5eac0288b2c04dba6f26e6bbdeb0f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -329,6 +329,32 @@ namespace YooAsset
|
||||
return CreateResourceImporter(options);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 资源包文件加载
|
||||
[Obsolete("Use LoadBundleFileSync(AssetInfo) instead.")]
|
||||
public BundleFileHandle LoadRawFileSync(AssetInfo assetInfo)
|
||||
{
|
||||
return LoadBundleFileSync(assetInfo);
|
||||
}
|
||||
|
||||
[Obsolete("Use LoadBundleFileSync(string) instead.")]
|
||||
public BundleFileHandle LoadRawFileSync(string location)
|
||||
{
|
||||
return LoadBundleFileSync(location);
|
||||
}
|
||||
|
||||
[Obsolete("Use LoadBundleFileAsync(AssetInfo, uint) instead.")]
|
||||
public BundleFileHandle LoadRawFileAsync(AssetInfo assetInfo, uint priority = 0)
|
||||
{
|
||||
return LoadBundleFileAsync(assetInfo, priority);
|
||||
}
|
||||
|
||||
[Obsolete("Use LoadBundleFileAsync(string, uint) instead.")]
|
||||
public BundleFileHandle LoadRawFileAsync(string location, uint priority = 0)
|
||||
{
|
||||
return LoadBundleFileAsync(location, priority);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user