// Use this for initialization void Start() { SQLite3Operate operate = SQLite3Factory.OpenToReadOnly("Database.db", false); Achievement[] achvList = operate.SelectArrayT <Achievement>(); for (int i = 0; i < achvList.Length; ++i) { Debug.LogError(achvList[i]); } Achievement achv = new Achievement(0, "abc", 0, "1001", "defg", "hij", new int[] { 1, 2, 3 }, new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6 } }, new int[][] { new int[] { 1, 2, 3 }, new int[] { 4, 5, 6 }, new int[] { 7, 8, 9 } }); //new int[][][] { new int[][] {new int[]{1, 2, 3}, new int[]{4, 5, 6} }, new int[][] { new int[]{7, 8, 9}, new int[]{10, 11, 12}} }); Debug.LogError(achv); }
public void Init() { ConfigSQLite3Operate = SQLite3Factory.OpenToRead("Database.db"); LocalSQLite3Operate = SQLite3Factory.OpenToWrite("Dynamic.db"); CheckTable(); IPlayer.Init(); IPlayerBattle.Init(); ICharacter.Init(); IEquipment.Init(); IPlayerBattle.Init(); IPlayerClearStage.Init(); IPlayerCurrency.Init(); IPlayerFormation.Init(); IPlayerHasCharacters.Init(); IPlayerHasEquips.Init(); IPlayerOtherItem.Init(); IPlayerStamina.Init(); IPlayerUnlockItem.Init(); //IPlayerHasEquips.InsertNewEquips("2001"); //IPlayerHasCharacters.InsertNewCharacter("1001"); }
void OnGUI() { GUI.skin.button.fontSize = 32; if (GUILayout.Button("Load Sqlite3 Data")) { SQLite3Data data = Resources.Load <SQLite3Data>("Sqlite3Data"); foreach (SQLite3SingleData singleData in data.AllData) { Debug.LogError(singleData); } } if (GUILayout.Button("Load Static Data")) { SQLite3Operate operate = SQLite3Factory.OpenToRead("Static.db"); Debug.LogError(operate.SelectTbyId <LevelConfig>(40000)); } if (GUILayout.Button("Load Dynamic Data")) { SQLite3Operate operate = SQLite3Factory.OpenToRead("Dynamic.db"); Debug.LogError(operate.SelectTbyId <LevelConfig>(40002)); } }