Support fast build mode.
支持快速构建模式,真实的实现EditorPlayMode的运行时环境。
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user