private void Start() { _downloader = gameObject.GetComponent <Downloader>(); _downloader.onUpdate = OnUpdate; _downloader.onFinished = OnComplete; _monitor = gameObject.GetComponent <NetworkMonitor>(); _monitor.listener = this; _savePath = string.Format("{0}/DLC/", Application.persistentDataPath); #if UNITY_EDITOR//编辑器下platform矫正 #if UNITY_IPHONE _platform = GetPlatformForAssetBundles(RuntimePlatform.IPhonePlayer); #elif UNITY_ANDROID _platform = GetPlatformForAssetBundles(RuntimePlatform.Android); #else _platform = GetPlatformForAssetBundles(Application.platform); #endif #else//打包出来后platform就没问题了 _platform = GetPlatformForAssetBundles(Application.platform); developmentMode = false; #endif _step = STEP_IDLE; Assets.updatePath = _savePath; }
private void Start() { _downloader = gameObject.GetComponent <Downloader>(); _downloader.onUpdate = OnUpdate; _downloader.onFinished = OnComplete; _monitor = gameObject.GetComponent <NetworkMonitor>(); _monitor.listener = this; _savePath = string.Format("{0}/DLC/", Application.persistentDataPath); _platform = GetPlatformForAssetBundles(Application.platform); _step = Step.Wait; Assets.updatePath = _savePath; #if UNITY_EDITOR if (development) { StartUpdate(); } else { _step = Step.Version; } #else _step = Step.Version; #endif }
private void Start() { _downloader = gameObject.GetComponent <Downloader>(); _downloader.onUpdate = OnUpdate; _downloader.onFinished = OnComplete; _monitor = gameObject.GetComponent <NetworkMonitor>(); _monitor.listener = this; _savePath = string.Format("{0}/DLC/", Application.persistentDataPath); _platform = GetPlatformForAssetBundles(Application.platform); _step = STEP_IDLE; Assets.updatePath = _savePath; }