12345678910111213141516171819202122232425262728293031323334353637383940 |
- using UnityEngine;
- using System.Collections;
- public class DownloadObb : MonoBehaviour {
- private void Awake()
- {
- //#if UNITY_ANDROID && !UNITY_EDITOR
- // if (!GooglePlayDownloader.RunningOnAndroid())
- // {
- // Continue("not android");
- // return;
- // }
- // string expPath = GooglePlayDownloader.GetExpansionFilePath();
- // if (string.IsNullOrEmpty(expPath))
- // {
- // Continue("no obb file");
- // return;
- // }
-
- // string mainPath = GooglePlayDownloader.GetMainOBBPath(expPath);
- // string patchPath = GooglePlayDownloader.GetPatchOBBPath(expPath);
- // if (mainPath == null || patchPath == null)
- // {
- // GooglePlayDownloader.FetchOBB();
- // Continue("all done");
- // }
- //#else
- Continue("need no obb");
- //#endif
- }
- private void Continue(string reason)
- {
- Debug.LogWarning(reason);
- Application.LoadLevel("_loader");
- }
- }
|