void LoadResource() { Debug.Log("LoadResource"); if (!GooglePlayDownloader.RunningOnAndroid()) { //GUI.Label(new Rect(10, 10, Screen.width-10, 20), "Use GooglePlayDownloader only on Android device!"); Debug.Log("Use GooglePlayDownloader only on Android device!"); return; } string expPath = GooglePlayDownloader.GetExpansionFilePath(); if (expPath == null) { //GUI.Label(new Rect(10, 10, Screen.width-10, 20), "External storage is not available!"); Debug.Log("External storage is not available!"); } else { string mainPath = GooglePlayDownloader.GetMainOBBPath(expPath); string patchPath = GooglePlayDownloader.GetPatchOBBPath(expPath); Debug.Log("mainPath:" + mainPath); Debug.Log("patchPath:" + patchPath); //GUI.Label(new Rect(10, 10, Screen.width-10, 20), "Main = ..." + ( mainPath == null ? " NOT AVAILABLE" : mainPath.Substring(expPath.Length))); //GUI.Label(new Rect(10, 25, Screen.width-10, 20), "Patch = ..." + (patchPath == null ? " NOT AVAILABLE" : patchPath.Substring(expPath.Length))); if (mainPath == null) //if (GUI.Button(new Rect(10, 100, 100, 100), "Fetch OBBs")) { GooglePlayDownloader.SetMainOBBInfo(ClientConfigure.getResourceURL()); //GooglePlayDownloader.SetMainOBBFileName("file name"); GooglePlayDownloader.FetchOBB(); StartCoroutine(WaitForObbDownLoadOver()); } else { //SDKManager.GetInstance(); Application.LoadLevel(Utils.UI_NAME_Login); } } }