试错:
//string filepath = Application.streamingAssetsPath + "/navy.cdb";
string filepath = Application.streamingAssetsPath + "/navy.cdb";
if(!File.Exists(filepath)){
WWW loadDB = new WWW( filepath ); // this is the path to your StreamingAssets in android
while(!loadDB.isDone) {} // CAREFUL here, for safety reasons you shouldn't let this while loop unattended, place a timer and error check
File.WriteAllBytes(filepath, loadDB.bytes);
}
string connection = "URI=file:" + filepath;
this._Config = new CDBProject( connection );
/*
string AndroidPath = Application.persistentDataPath + "/navy.cdb";
if(!File.Exists(AndroidPath))
{
WWW loadDB = new WWW("jar:file://
//string filepath = Application.streamingAssetsPath + "/navy.cdb";
string filepath = Application.streamingAssetsPath + "/navy.cdb";
if(!File.Exists(filepath)){
WWW loadDB = new WWW( filepath ); // this is the path to your StreamingAssets in android
while(!loadDB.isDone) {} // CAREFUL here, for safety reasons you shouldn't let this while loop unattended, place a timer and error check
File.WriteAllBytes(filepath, loadDB.bytes);
}
string connection = "URI=file:" + filepath;
this._Config = new CDBProject( connection );
/*
string AndroidPath = Application.persistentDataPath + "/navy.cdb";
if(!File.Exists(AndroidPath))
{
WWW loadDB = new WWW("jar:file://