BDFramework修改Sqlite可读写
小于 1 分钟
打开挂载在BDFrame
上的BDLauncher
脚本,定位到Launch
函数,找到SqliteLoder.Load()
,定位到SqliterLoader
类中,添加一个函数
/// <summary>
/// runtime下加载,可读写
/// </summary>
/// <param name="str"></param>
static public void LoadReadWrite(AssetLoadPathType assetLoadPathTypeType)
{
Connection?.Dispose();
var path = GameConfig.GetLoadPath(assetLoadPathTypeType);
//用当前平台目录进行加载
path = GetLocalDBPath(path, Application.platform);
if (File.Exists(path))
{
Connection = new SQLiteConnection(path, SQLiteOpenFlags.ReadWrite);
BDebug.Log("DB加载路径:" + path, "red");
}
else
{
Debug.LogError("DB不存在:" + path);
}
}
将BDLauncher
中的SqliteLoder.Load()
替换成SqliteLoder.LoadReadWrite()