mirror of
https://github.com/tuyoogame/YooAsset.git
synced 2026-05-22 08:20:18 +00:00
update space shooter
启用了新的内置资源查询机制。
This commit is contained in:
@@ -92,41 +92,29 @@ internal class FsmInitialize : IStateNode
|
||||
{
|
||||
//string hostServerIP = "http://10.0.2.2"; //安卓模拟器地址
|
||||
string hostServerIP = "http://127.0.0.1";
|
||||
string gameVersion = "v1.0";
|
||||
string appVersion = "v1.0";
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.Android)
|
||||
return $"{hostServerIP}/CDN/Android/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/Android/{appVersion}";
|
||||
else if (UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.iOS)
|
||||
return $"{hostServerIP}/CDN/IPhone/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/IPhone/{appVersion}";
|
||||
else if (UnityEditor.EditorUserBuildSettings.activeBuildTarget == UnityEditor.BuildTarget.WebGL)
|
||||
return $"{hostServerIP}/CDN/WebGL/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/WebGL/{appVersion}";
|
||||
else
|
||||
return $"{hostServerIP}/CDN/PC/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/PC/{appVersion}";
|
||||
#else
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
return $"{hostServerIP}/CDN/Android/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/Android/{appVersion}";
|
||||
else if (Application.platform == RuntimePlatform.IPhonePlayer)
|
||||
return $"{hostServerIP}/CDN/IPhone/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/IPhone/{appVersion}";
|
||||
else if (Application.platform == RuntimePlatform.WebGLPlayer)
|
||||
return $"{hostServerIP}/CDN/WebGL/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/WebGL/{appVersion}";
|
||||
else
|
||||
return $"{hostServerIP}/CDN/PC/{gameVersion}";
|
||||
return $"{hostServerIP}/CDN/PC/{appVersion}";
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 内置文件查询服务类
|
||||
/// </summary>
|
||||
private class GameQueryServices : IQueryServices
|
||||
{
|
||||
public bool QueryStreamingAssets(string fileName)
|
||||
{
|
||||
string buildinFolderName = YooAssets.GetStreamingAssetBuildinFolderName();
|
||||
return StreamingAssetsHelper.FileExists($"{buildinFolderName}/{fileName}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 资源文件解密服务类
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user