Update samples
This commit is contained in:
@@ -45,9 +45,6 @@ public class GameScene1 : MonoBehaviour
|
||||
|
||||
void InitWindow()
|
||||
{
|
||||
var resVersion = CanvasRoot.transform.Find("res_version/label").GetComponent<Text>();
|
||||
resVersion.text = $"资源版本 : {YooAssets.GetResourceVersion()}";
|
||||
|
||||
var playMode = CanvasRoot.transform.Find("play_mode/label").GetComponent<Text>();
|
||||
if (BootScene.GamePlayMode == YooAssets.EPlayMode.EditorSimulateMode)
|
||||
playMode.text = "编辑器下模拟模式";
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public class FsmUpdateManifest : IFsmNode
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
// 更新补丁清单
|
||||
var operation = YooAssets.UpdateManifestAsync(PatchUpdater.ResourceVersion, 30);
|
||||
var operation = YooAssets.UpdateManifestAsync("DefaultPackage", PatchUpdater.PackageCRC, 30);
|
||||
yield return operation;
|
||||
|
||||
if(operation.Status == EOperationStatus.Succeed)
|
||||
|
||||
+3
-3
@@ -24,13 +24,13 @@ internal class FsmUpdateStaticVersion : IFsmNode
|
||||
yield return new WaitForSecondsRealtime(0.5f);
|
||||
|
||||
// 更新资源版本号
|
||||
var operation = YooAssets.UpdateStaticVersionAsync(30);
|
||||
var operation = YooAssets.UpdateStaticVersionAsync("DefaultPackage", 30);
|
||||
yield return operation;
|
||||
|
||||
if (operation.Status == EOperationStatus.Succeed)
|
||||
{
|
||||
Debug.Log($"Found static version : {operation.ResourceVersion}");
|
||||
PatchUpdater.ResourceVersion = operation.ResourceVersion;
|
||||
Debug.Log($"Found static version : {operation.PackageCRC}");
|
||||
PatchUpdater.PackageCRC = operation.PackageCRC;
|
||||
FsmManager.Transition(nameof(FsmUpdateManifest));
|
||||
}
|
||||
else
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ public static class PatchUpdater
|
||||
/// <summary>
|
||||
/// 资源版本
|
||||
/// </summary>
|
||||
public static int ResourceVersion { set; get; }
|
||||
public static string PackageCRC { set; get; }
|
||||
|
||||
/// <summary>
|
||||
/// 开启初始化流程
|
||||
|
||||
Reference in New Issue
Block a user