using System.Collections; using System.Collections.Generic; using UnityEngine; using System.IO; using System; public class SDKInitedTask : LaunchTask { public override float expectTime { get { return LocalSave.GetFloat("SDKInitedTask_ExpectTime", 1f); } protected set { LocalSave.SetFloat("SDKInitedTask_ExpectTime", value); } } public override void Begin() { LaunchInHot.m_CurrentStage = LaunchStage.SDKInit; duration = Mathf.Max(0.1f, expectTime); } public override void End() { expectTime = timer; Debug.LogFormat("{0}执行时长:{1};", this.GetType().Name, timer); // TODO YYL // OperationLogCollect.Instance.RecordLauchEvent(1); // OperationLogCollect.Instance.RecordEvent(1); var cpu = 2; var memory = 2048; DeviceUtility.GetCpuAndMemory(out cpu, out memory); Debug.LogFormat("获得机器信息:cpu {0}----内存 {1}", cpu, memory); } public override void Update() { if (done) { return; } timer += Time.deltaTime; if (SDKUtils.Instance.InitFinished) { done = true; } else { done = false; progress = timer / duration; } ExceptionReport(); } }