0

Bolt with sqlite

3d_Artist 2 years ago updated 2 years ago 3

Hi,

How to read db in bolt?

How to do this in bolt?


private void GetScores()
{
   using (IDbConnection dbConnection = new SqliteConnection(connectionString))
   {
      dbConnection.Open();
      using (IDbCommand dbCommand = dbConnection.CreateCommand())
      {
         string sqlQuery = "select* from HighScores";
         dbCommand.CommandText = sqlQuery;
         using (IDataReader reader = dbCommand.ExecuteReader())
         {
            while (reader.Read())
            {
               Debug.Log(reader.GetString(1));
            }
            dbConnection.Close();
            reader.Close();
         }
      }
   }
}
Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):

I don't find (IDbConnection) node in bolt.

I am trying but still not find any solution.

Find attachment of bolt.

HighScoreManager.asset

HighScoreDB.db

You can call public methods of your own custom scripts. No need to build everything in Bolt. See https://support.ludiq.io/knowledge-bases/4/articles/160-reflection-failure

If you really want to make a complicated graph, you can use the "Unit Options Wizard..." (Menu Tools -> Bolt) to add new assemblies and types to the list of known Units.

Hey,

Thank you very much.

I Don't want to use custom script.

I use this method (Unit Options Wizard) but its not help me.