// void OnGUI() // { // GUI.skin = mySkin; // GUI.DrawTexture(new Rect(0,0,background.width,background.height),background); // // if (!GooglePlayDownloader.RunningOnAndroid()) // { // GUI.Label(new Rect(10, 10, Screen.width-10, 20), "Use GooglePlayDownloader only on Android device!"); // return; // } // // expPath = GooglePlayDownloader.GetExpansionFilePath(); // if (expPath == null) // { // GUI.Label(new Rect(10, 10, Screen.width-10, 20), "External storage is not available!"); // } // else // { // string mainPath = GooglePlayDownloader.GetMainOBBPath(expPath); // string patchPath = GooglePlayDownloader.GetPatchOBBPath(expPath); // if( alreadyLogged == false ) // { // alreadyLogged = true; // log( "expPath = " + expPath ); // log( "Main = " + mainPath ); // log( "Main = " + mainPath.Substring(expPath.Length)); // // if (mainPath != null) // StartCoroutine(loadLevel()); // // } // //GUI.Label(new Rect(10, 10, Screen.width-10, Screen.height-10), logtxt ); // // if (mainPath == null) // { // GUI.Label(new Rect(Screen.width-600, Screen.height-230, 430, 60), "The game needs to download 200MB of game content. It's recommanded to use WIFI connexion."); // if (GUI.Button(new Rect(Screen.width-500, Screen.height-170, 250, 60), "Start Download !")) // { // GooglePlayDownloader.FetchOBB(); // StartCoroutine(loadLevel()); // } // } // // } // // } void Start() { // nextScene = ""; #if UNITY_ANDROID && !UNITY_EDITOR if (Application.platform == RuntimePlatform.Android) { // log ("start => "); // expPath = GooglePlayDownloader.GetExpansionFilePath(); // log ("expPath => " + expPath); // string mainPath = GooglePlayDownloader.GetMainOBBPath(expPath); // log ("mainPath => " + mainPath); // string patchPath = GooglePlayDownloader.GetPatchOBBPath(expPath); // log ("patchPath => " + patchPath); // if (mainPath != null) // StartCoroutine(loadLevel()); GooglePlayDownloader.SetPublicKey(PUBLIC_KEY); expPath = GooglePlayDownloader.GetExpansionFilePath(); } #endif StartCoroutine(loadLevel()); }