mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
TEngine全面更新,升级YooAsset2.1.1、UniTask、UIWindow、I2Localization
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
|
||||
namespace YooAsset
|
||||
{
|
||||
internal static class PersistentHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取WWW加载本地资源的路径
|
||||
/// </summary>
|
||||
public static string ConvertToWWWPath(string path)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
return StringUtility.Format("file:///{0}", path);
|
||||
#elif UNITY_WEBGL
|
||||
return path;
|
||||
#elif UNITY_IPHONE
|
||||
return StringUtility.Format("file://{0}", path);
|
||||
#elif UNITY_ANDROID
|
||||
if (path.StartsWith("jar:file://"))
|
||||
return path;
|
||||
else
|
||||
return StringUtility.Format("jar:file://{0}", path);
|
||||
#elif UNITY_STANDALONE_OSX
|
||||
return new System.Uri(path).ToString();
|
||||
#elif UNITY_STANDALONE
|
||||
return StringUtility.Format("file:///{0}", path);
|
||||
#else
|
||||
return path;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user