Files
YooAssetScene/Assets/YooAsset/Runtime/PatchSystem/PlayMode/EditorPlayModeImpl.cs
T
hevinci 2cb006f3d9 Support addressable location
支持可寻址资源定位
2022-04-28 17:23:31 +08:00

48 lines
1.1 KiB
C#

using System;
using System.Collections;
using System.Collections.Generic;
namespace YooAsset
{
internal class EditorPlayModeImpl : IBundleServices
{
/// <summary>
/// 异步初始化
/// </summary>
public InitializationOperation InitializeAsync()
{
var operation = new EditorPlayModeInitializationOperation();
OperationSystem.ProcessOperaiton(operation);
return operation;
}
/// <summary>
/// 获取资源版本号
/// </summary>
public int GetResourceVersion()
{
return 0;
}
#region IBundleServices接口
BundleInfo IBundleServices.GetBundleInfo(string bundleName)
{
YooLogger.Warning($"Editor play mode can not get bundle info.");
BundleInfo bundleInfo = new BundleInfo(bundleName);
return bundleInfo;
}
string IBundleServices.ConvertAddress(string address)
{
throw new Exception($"Editor play mode not support addressable.");
}
string IBundleServices.GetBundleName(string assetPath)
{
return assetPath;
}
string[] IBundleServices.GetAllDependencies(string assetPath)
{
return new string[] { };
}
#endregion
}
}