I read Thread “More Google OBB drama”, and saw this : “The OBB is added to the “search path” during a pause/resume cycle of the main activity. Application.dataPath will indicate if it is mounted.
So you need to trigger that a pause/resume cycle if its not mounted (simplest way would be to init a “dummy” activity that only returns immediately” from eriQue. So i try this, but i think that i am doing wrong, cause i am very very noobish with java and android develop (activities). Here are my code:
public class ReloadObbActivity extends Activity {
private Intent myIntent;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
myIntent= new Intent(this,ReloadObbActivity.class);
finish();
}
public void Launch()
{
startActivity(myIntent);
}
}
public static void RunDummyActivity()
{
using (AndroidJavaClass unity_player = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
var jc = new AndroidJavaClass("mycompany.com.reloadobbplugin.ReloadObbActivity");
jc.Call("Launch");
if (AndroidJNI.ExceptionOccurred() != System.IntPtr.Zero)
{
Debug.LogError("Exception occurred while attempting to start DownloaderActivity - is the AndroidManifest.xml incorrect?");
AndroidJNI.ExceptionDescribe();
AndroidJNI.ExceptionClear();
}
}
}
So what i am doing wrong?