Support fast build mode.

支持快速构建模式,真实的实现EditorPlayMode的运行时环境。
This commit is contained in:
hevinci
2022-05-02 23:15:09 +08:00
parent 8d02406211
commit 665a16fe60
39 changed files with 492 additions and 383 deletions
@@ -3,27 +3,9 @@ namespace YooAsset
{
public class AddressLocationServices : ILocationServices
{
public AddressLocationServices()
public string ConvertLocationToAssetPath(string location)
{
#if UNITY_EDITOR
LocationServicesHelper.InitEditorPlayMode(true);
#endif
}
public string ConvertLocationToAssetPath(YooAssets.EPlayMode playMode, string location)
{
if (playMode == YooAssets.EPlayMode.EditorPlayMode)
{
#if UNITY_EDITOR
return LocationServicesHelper.ConvertLocationToAssetPath(location);
#else
throw new System.NotImplementedException();
#endif
}
else
{
return YooAssets.ConvertAddress(location);
}
return YooAssets.MappingToAssetPath(location);
}
}
}