Skip to content

Commit 5aebc98

Browse files
author
wanderer
committed
ResouceVersion支持外部设置链接
1 parent 1984064 commit 5aebc98

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

GameFramework/Runtime/Resource/ResourceVersion.cs

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@ public class ResourceVersion
2626
//更新中
2727
private bool _updating = false;
2828

29+
/// <summary>
30+
/// 远程的版本信息
31+
/// </summary>
32+
/// <value></value>
33+
public AssetBundleVersionInfo RemoteVersion { get; private set; }
34+
35+
/// <summary>
36+
/// 本地的版本信息
37+
/// </summary>
38+
/// <value></value>
39+
public AssetBundleVersionInfo LocalVersion { get; private set; }
40+
2941

3042
public ResourceVersion(string remoteUpdatePath, string localResourcePath)
3143
{
@@ -43,16 +55,17 @@ public void OnUpdate()
4355
}
4456

4557
/// <summary>
46-
/// 远程的版本信息
47-
/// </summary>
48-
/// <value></value>
49-
public AssetBundleVersionInfo RemoteVersion { get; private set; }
50-
51-
/// <summary>
52-
/// 本地的版本信息
58+
/// 设置远程访问的连接,需要设置新的远程资源路径的链接
5359
/// </summary>
54-
/// <value></value>
55-
public AssetBundleVersionInfo LocalVersion { get; private set; }
60+
/// <param name="remoteUpdatePath"></param>
61+
public void SetRemoteUpdatePath(string remoteUpdatePath)
62+
{
63+
if (string.IsNullOrEmpty(remoteUpdatePath))
64+
{
65+
throw new GameException($"The remote version information link cannot be empty!");
66+
}
67+
_remoteUpdatePath = remoteUpdatePath;
68+
}
5669

5770
/// <summary>
5871
/// 请求本地版本信息

0 commit comments

Comments
 (0)