Search Unity

BG Database (inMemory database | Excel/Google Sheets syncing | CodeGen | Save/Load support)

Discussion in 'Assets and Asset Store' started by BansheeGz, May 3, 2018.

  1. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    I'm looking to Import it doesn't seem to work, says 'path2' cannot be null.

    upload_2021-3-29_14-29-54.png
     
  2. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello, please, add the following line at the start of RunTask method:
    Code (CSharp):
    1. if (!BGRepo.DefaultRepoLoaded) BGRepo.Load();
    the full method is:
    Code (CSharp):
    1.     public static void RunTask(string googleJobName)
    2.     {
    3.         if (!BGRepo.DefaultRepoLoaded) BGRepo.Load();
    4.      
    5.         var googleJob = BGSettingsEditor.Model.SyncList.Find(model => string.Equals(model.Name, googleJobName));
    6.         var googleDatasource = (BGDsGoogleSheets) BGSettingsEditor.Model.DataSourceList.Find(model => string.Equals(model.DataSourceId, googleJob.DataSourceId)).DataSource;
    7.         var logger = new BGLogger();
    8.         var googleService = googleDatasource.TryToCreateService(logger);
    9.      
    10.         //if you want to export
    11.         googleService.Export(logger, BGRepo.I, googleJob.SettingsEntity, new BGMergeSettingsMeta(), googleJob.TransferRowsOrder);
    12.      
    13.         //if you want to import
    14.         // googleService.Import(logger, BGRepo.I, googleJob.SettingsEntity, new BGMergeSettingsMeta(), googleJob.UpdateIdsOnImport, googleJob.TransferRowsOrder);
    15.     }
    This should fix the error.
    The error comes up if the database window is closed
    Sorry for the inconvenience!
     
    inkyphilospher likes this.
  3. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
    Hi, are you thinking on Uvs "Unity Visual Scripting" integration? right now I'm having some errors:
    upload_2021-3-30_14-29-59.png

    I´m just considering the project migration.
     
    BansheeGz likes this.
  4. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hi, we did not know, that Unity decided to change the C# namespace name, thank you for letting me know about it
    We will release a fix very soon
    I will send it to you in a private message as soon as it's ready (1-2 days)

    Here is a quick workaround:
    Open DBBoltSource.cs file in a text editor and replace top 6 lines:
    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using BansheeGz.BGDatabase;
    4. using Bolt;
    5. using Ludiq;
    6. using UnityEngine;
    7.  
    with these 5 lines:
    Code (CSharp):
    1. using System;
    2. using System.Collections.Generic;
    3. using BansheeGz.BGDatabase;
    4. using Unity.VisualScripting;
    5. using UnityEngine;
    6.  
    This won't let you to re-generate the units but it should allow you to use already generated units with the new "Visual Scripting" package
    The same fix should work for all our additional Bolt plugins (e.g. replacing "using Bolt;using Ludiq;" with "using Unity.VisualScripting;" )
     
    Last edited: Mar 31, 2021
  5. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
  6. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
    Solved every error except this one:

    upload_2021-3-30_17-56-37.png
     
  7. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    Hello again, I'm working on two different repos and realized one was failing because I had only defined the DataSource and Jobs on the first machine, while on the second machine this appears entirely blank. When I make a new Job and save settings, I'm not seeing any changes appear in my source control. Is there a setting I can turn on so I can transfer these settings between machines or onto source control?
     
  8. motuproprio3000

    motuproprio3000

    Joined:
    Oct 1, 2016
    Posts:
    6
    Hello,
    I'm trying to populate a field declared as Dictionary(hashtable) with pair values as string/Vector3.
    I'm encountering difficulty when I populate it by script, this is my code :

      public Dictionary<string,Vector3> GL_positionerDict;
    BGEntity recordOrders = tableOrders.NewEntity();//NEW RECORD
    recordOrders.Set<Dictionary<string,Vector3>>("Waypoints", GL_positionerDict);//FIELD VALUE


    Can you help me?
    Thanks
     
  9. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    It looks like Unity did some changes apart from simple namespace renaming.
    Please, import the attached package - it should fix the error.
    We will update all our Bolt plugins very soon
     

    Attached Files:

  10. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello,

    There is an option to use one single shared settings file, located under your project's folder.

    1) Select "Settings->Main" and press on "Export (save as)" button as shown on the screenshot
    2) Navigate to your database folder and give the new file the following name bansheegz_database_settings.json
    Click on "Save"
    3) Open the database folder in Unity's "Project" window and make sure new settings file is created.
    If the file does not show up, minimize/maximize Unity window once
    4) Switch to the database window and click on the "Reload" button.
    The settings file location should change to a newly created settings file.
    If you add this file to the source control system- it will override the local settings file location for everyone
     
    Thankxz and inkyphilospher like this.
  11. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello,

    Sorry, unfortunately, we do not support Dictionary fields yet, only Hashtable

    You need to convert a dictionary to a hashtable before assigning it
    Code (CSharp):
    1. recordOrders.Set<Hashtable>("Waypoints", new Hashtable(GL_positionerDict)); //FIELD VALUE
    Also, when you read the value you need to read it as a Hashtable
    Code (CSharp):
    1. Hashtable value = recordOrders.Get<Hashtable>("Waypoints");
     
    motuproprio3000 likes this.
  12. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi, I would like to create a field that holds an AnimationClip within a FBX asset. How do I do that?

    For example, my FBX contain several animations, and I would like a field that can contain one of this animation.

    I try using the unityObject type, with optional type set to UnityEngine.AnimationClip. But when I drag a clip from inside a FBX onto the field, it only store the path FBX.

    Thanks
     
    Last edited: Apr 1, 2021
  13. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello,

    We will try to add a special "AnimationClip" field with an option to load from FBX asset, similar to how a single sprite can be loaded from sprite atlas/sprite sheet
    unityObject field does not support complex assets (when multiple assets are stored inside a single file)
    I will contact you as soon as I have new information, it may take a day or two
     
    cybie likes this.
  14. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Fantastic! Thank you!
     
  15. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi Banshee,

    What's the proper way to specify enum name when adding enum field?

    I have something like:

    Code (CSharp):
    1. namespace A.B
    2. {
    3.     public class C
    4.     {
    5.        public enum D
    6.        {...}
    7.     }
    8. }
    and I used A.B.C.D but it say it cannot find/load the type.

    Update:
    Never mind I figure it out, I need to do A.B.C+D

    Thanks1
     
    Last edited: Apr 3, 2021
  16. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello,
    I think the correct name is A.B.C+D
    Nested classes/enums are referred to by using a plus character as a separator

    After some considerations, we decided to not add a separate field, but to add support for nested assets to unityObject field, so now it should work exactly as you expected it to work initially
    We did it cause loading method seems to work ok with other sub-assets as well (like Material etc.)
    I will send you a new package in a private message later today as soon as we finish testing it
     
    Last edited: Apr 3, 2021
    cybie likes this.
  17. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi BansheeGz,

    I used the CodeGen to populate a table by code. It works great, except there was no setter for the unityObject field.

    Any reason why the setter is left out.

    This is a really great tool btw!
     
    BansheeGz likes this.
  18. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hi, thank you!

    Yes, there is a reason why all assets fields are read-only.
    We do not store assets inside the database, only references to them, so all the assets are resolved by reference.
    The reference can be the asset path for Resources loader or Addressables address or GUID for Addressables loader
    However, if you pass the asset itself- there is no way for us to calculate its reference, cause the asset does not have this information - that's why there are no setters for assets fields
    There is a way to set value for asset fields using another method, but you need to know the asset's reference (address/path/GUID) to use this method
     
    Last edited: Apr 3, 2021
  19. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    @cybie
    I've sent a new package to you in a private message
    Here is a guide on how to assign sub-assets to unityObject field
    1) Create unityObject field and set "Asset type" parameter to the required type (UnityEngine.AnimationClip)
    2) Drag sub-asset with correct type to the field's button to assign value
    3) Alternatively, drag the main asset or any sub-asset with a type, different from AnimationClip to the field's button.
    Popup window will show up with all available options to choose from
    Please, let me know if you have any questions
     
    cybie likes this.
  20. cybie

    cybie

    Joined:
    Sep 17, 2010
    Posts:
    91
    Hi BansheeGz,

    It works great! Thanks for adding this.

    Regarding setters for unityObject/animation clip, would it be possible to assign the asset's path? This is super useful if I have to move the asset to some other folders in the future. But this is minor, as I can manually assign the assets for now.

    Another nice thing to have would be when I click on the animation icon in the field, it will auto-select the animation clip in the Project folder :)

    Thanks a bunch!
     
    Last edited: Apr 3, 2021
  21. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hi,

    Yes, it's very easy to read/write an asset's path, especially with code generation
    1) First, you need to get a reference to a field
    Let's say you have table "MyTable" with field "clip" and you do not use class/fields prefixes while generating the classes, so your generated classes/properties have exactly the same names as table/fields
    In this case, you can access a field with the following static property MyTable._clip

    2) You can read an asset's path like this
    Code (CSharp):
    1.         //read asset path (entityIndex- int, entity index)
    2.         string path = MyTable._clip.GetStoredValue(entityIndex);
    3) You can write an asset's path like this
    Code (CSharp):
    1.         //write asset path (entityIndex- int, entity index)
    2.         MyTable._clip.SetStoredValue(entityIndex, path);
    Great idea, thank you, it's done!

    Also, we've added an option to not show the parent asset path for sub-assets
    I've sent a new package to you
     
    cybie likes this.
  22. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    Hello once again!

    I'm looking to insert an item into the middle of a table. It looks like there are methods to swap entities, but not insert. I've tried 'ForEach' with a proper sort, but I'm not seeing it propagate to stored database, even with a "Save" afterwards. Is there functionality I'm missing? I've been unable to find it in the documentation.

    Thanks!
     
  23. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
    Generting code with the new bolt is giving this error: upload_2021-4-8_11-59-1.png
     
  24. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello,
    There is a method "MoveEntities", which can be used for inserting a row/rows
    This method moves the rows and shifts other rows if needed.

    Create a C# file BGMetaEntityExtensions and put the following content to it:
    Code (CSharp):
    1. using System;
    2. namespace BansheeGz.BGDatabase
    3. {
    4.     public static class BGMetaEntityExtensions
    5.     {
    6.         public static BGEntity Insert(this BGMetaEntity meta, int index)
    7.         {
    8.             if (index < 0 || index > meta.CountEntities) throw new Exception($"Can not insert entity: invalid index {index}, valid range is 0-{meta.CountEntities}");
    9.             var entity = meta.NewEntity();
    10.             meta.MoveEntities(entity.Index, index, 1);
    11.             return entity;
    12.         }
    13.     }
    14. }
    Now, this method can be used like so:
    Code (CSharp):
    1.         var meta = BGRepo.I["test"];
    2.         var entity = meta.Insert(0);
    3.         print("Inserted at " + entity.Index);
    You can also create another method, which inserts multiple rows using the same method (MoveEntities)
    Code (CSharp):
    1.         public static void Insert(this BGMetaEntity meta, int index, int numberOfRows)
    2.         {
    3.             if (index < 0 || index > meta.CountEntities) throw new Exception($"Can not insert entities: invalid index {index}, valid range is 0-{meta.CountEntities}");
    4.             if (numberOfRows <= 0) throw new Exception($"Can not insert entities: invalid numberOfRows {numberOfRows}, should be more than 0");
    5.             var start = meta.CountEntities;
    6.             for (var i = 0; i < numberOfRows; i++) meta.NewEntity();
    7.             meta.MoveEntities(start, index, numberOfRows);
    8.         }
     
    inkyphilospher likes this.
  25. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    I could not reproduce this issue.
    This message means Bolt.Unit class (the base class of Bolt units) can not be found/loaded
    I think this can happen if you have errors in your project and Unity can not compile C# sources

    Please, do the following steps:
    1) Upgrade BGDatabase to the latest version from Asset Store (version 1.6.6)
    Also, if you use Bolt Addressables plugin, please, download and import the package for Bolt 1.4.15 here https://www.bansheegz.com/BGDatabase/Downloads/RuntimeAddressablesBolt/
    Unity changed Bolt API a little bit with version 1.4.15, so the plugin should be updated as well, unfortunately
    2) Make sure there are no error messages printed to the console after package(s) importing
    If there are any error messages printed to the console and you do not know how to get rid of them- please, post it here
     
    Last edited: Apr 9, 2021
  26. AdrianoDeRegino

    AdrianoDeRegino

    Joined:
    Aug 10, 2019
    Posts:
    87
    Worked, thanks!
     
  27. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    49
    BansheeGz likes this.
  28. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello, great news!
    Please, try the attached package. (the updated package below)
    It's an updated plugin for Addressables ( https://www.bansheegz.com/BGDatabase/Downloads/RuntimeAddressables/ ) , which uses WaitForCompletion method internally.

    To load asset synchronously, use generated property for asset field (just like any other fields)
     
    Last edited: Apr 17, 2021
  29. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    49
    Thank you, the new Addressables plugin works great so far. It's great to be able to use direct references to assets in metas again, just like Resources before. Much cleaner and simpler.
     
    BansheeGz likes this.
  30. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    49
    Hello, I'm afraid there is an issue with the beta Addressables plugin that uses synchronous loading.

    The issue is that addressable assets in bgdatabase will return null instead of the actual asset. This issue does not occur when using the "Use Asset Database" or "Simulate Groups" Play Mode scripts in the Editor. Rather, the issue appears when using Addressables in Packed Mode, such as an actual build or when using the "Use Existing Build" Addressables Play Mode Script.

    Example:
    Code (CSharp):
    1.  
    2. var entity = GameDB.CharacterAnimations.GetEntity(clipName);
    3.  
    4. // Here, 'var clip' will return the animation clip asset when using "Use Asset Database" or "Simulate Groups" addressable build scripts, but will return null when using Packed build scripts
    5. var clip = entity.animationClip;
    6.  
    7. // Here, 'var clip' always returns the asset in all build script scenarios
    8. var op = Addressables.LoadAssetAsync<AnimationClip>(GameDB.CharacterAnimations._animationClip.GetAddressablesAddress(entity.Index));
    9. var clip = op.WaitForCompletion();
    10.  
    Oddly, some assets do seem to load fine, while others return null. I am unable to find a repro case as to why some assets load and others do not. I can only confirm that this issue does not occur if I load the assets directly using LoadAssetAsync + WaitForCompletion.
     
  31. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello, sorry, could you please, try the updated package?

    UPD: the package can be downloaded here https://www.bansheegz.com/BGDatabase/Downloads/RuntimeAddressables/ (version 1.1)
     
    Last edited: Apr 26, 2021
  32. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello, I have a project with a launching scene and a main scene. The mainscene can use different .bytes (database) files, and I would like to know if it is possible to let the player choose, in the launching scene (which does not use BG Database) the database he wants to use ? And how. I am using easysave asset, that lets me rename a file, for instance in the streaming assets folder. It could be very intersting to add the persistent folder path to the possible locations of the .bytes file.

    Best regards, Phil
     
  33. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello, Phil,
    You can load the database manually by using BGRepo.I.Load method and passing byte array as a parameter
    You can load database content from any location
    I think it's the easiest way by far

    For example, attach this script to some GameObject in your launching scene
    Code (CSharp):
    1. using BansheeGz.BGDatabase;
    2. using UnityEngine;
    3.  
    4. public class DatabaseRegistry : MonoBehaviour
    5. {
    6.     public TextAsset[] Databases;
    7.  
    8.     public void Load(int index)
    9.     {
    10.         BGRepo.I.Load(Databases[index].bytes);
    11.     }
    12. }
    Initialize the "Databases" field with all possible options
    Call DatabaseRegistry.Load method and pass the database index
    Also, please, use the package, I've sent to you in a private message (we found a small issue with calling BGRepo.I.Load method)
     
    Philkrom likes this.
  34. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    When I export the settings file, the 'Editor Settings Loaded at Path' does not change. I have not been able to have a new unity instance read the new settings file without intervention in the UI, which prevents me from integrating into a build system. Is there a step I'm missing?

     
  35. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Do you use the StreamingAssets loader?
    If yes- can you switch to Resources loader or it's not possible?
    It seems it only works for Resources loader (not for streaming assets)
     
  36. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    I deleted the settings and repo and copied them back in after setting the initial repo to 'Resources' and it seems okay. Three questions:
    1) Is the settings path always absolute? That won't work on multiple machines
    2) Do I need to hit 'Reload' manually in the UI? Could I do this in code?
    3) Is there anyway to manually set the path in code and trigger a reload? So I could always prime the repo correctly on init on a new machine.
     
  37. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    If you put the settings file next to the database file-it will be resolved no matter what the absolute path is.
    It will work on multiple machines
    This code should work
    Code (CSharp):
    1. BGRepo.Load();
    2. BGSettingsEditor.Load();
    There is no way to override the settings file location, except for putting it next to the database file.
    If there is no settings file next to the database file- the path is calculated automatically based on database file GUID
    We could make this path public- so you could write some initial settings/template to this file and reload from the C# code

    But maybe we should come up with a better setup for a multi-user environment.
    I think we could add an option to split the settings file content into 2 parts:
    1) One is shared among all users.
    You could put this file somewhere in your project and it will be loaded for all users
    It can hold the data about shared export/import tasks and code generation settings- probably no need to share any other data
    This way you could update the shared data and it will be updated for all users

    2) The second part can be individual and it will be stored locally for each user.

    Please, let me know what you think
     
  38. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    Being next to the file and reloading sounds like it could work as long as it's okay in a headless build. Quick follow up, in one of your replies you mentioned saving the file as 'bansheegz_database_settings.json' but the tool wants to save it as 'bansheegz_db_settings.json' when I got to export. Which one is it looking for?
     
  39. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    bansheegz_database_settings.json
     
    inkyphilospher likes this.
  40. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13

    It would be great if I could .gitignore the database file and keep all of the jobs and settings. Having to have that committed while most users don't need the actual database is clunky, especially when it comes to including it in builds
     
  41. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Sorry, I do not understand your idea. Could you please, elaborate?
     
    Last edited: Apr 30, 2021
  42. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    I suggesting that the database file itself doesn't contain information about jobs, much like your post suggested as well.

    Separate question, I'm using google sheets. Is it possible to not have a '_id' column generated and to use one of the existing columns?
     
  43. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Jobs are stored in the settings file
    You can safely add the settings file to .gitignore and not commit it

    1) Database file contains tables and addons
    2) Setting file contains jobs/datasources, codegen config and different GUI preferences (columns widths, rows height etc. )

    The problem with the settings file is that it either fully local or if you put it next to the database file- it's one file for every team member

    So I thought maybe it makes sense to add an option to add an additional shared settings file for all team members with shared jobs/codegen config
    In this case- one part of the settings will be common/shared for all team members (like shared jobs for example) and another part will be private/local

    You have a column with unique values and you want to use it as a row's ID instead of "_id" column, correct?
    Currently, it's not possible but I think we could try to add such an option
    Which type this column has (string/int)?
     
  44. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Hello, thanks for your very detailed explanations (as always !) to my post a few days ago.

    Some suggestions concerning your runtime editor, a fantastic tool not easy to find as it is only in the "download" section, maybe you could move it to the addons too for more visibility.

    I am working on a contributive application, users can contribute to add / modify some information in the database. So your runtime editor is very interesting, and some improvements could be made. As C# is not my best friend (I am a PlayMaker user) I am afraid that I can’t do them by myself.
    • As I said, in the app we are working on users are allowed to modify only some tables and some fields within these tables. So it would be great to have public bool variables for the tables and their fields in the inspector, that would allow to display /modify only these specific fields (dynamically, depending on the users permissions.
    • Allowing to save the database in the persistent data folder, or better, create a public variable for the path that I could use with Playmaker. Using this asset allows you to browse easily within the disks / folders / files.
    • Allowing to save / import in Excel / Google sheet would be a great improvement too !
    Best regards, Phil
     
    BansheeGz likes this.
  45. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    Hello, Phil, thank you for your suggestions!
    We will look into it next week and I will post an updated package here as soon as it's ready
     
  46. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    I have another suggestion. When somebody enters new fields, these infos have to be validated by a moderator, thus a bool field "tovalidate" is set to 1. This would be great if the exported database (or xls) could only contain these fileds for 2 reasons : it would be much lighter and much easier to check, only a few lines instaed of the full database. I don't know if it could be possible to manage this ? Don't hesitate to ask if not clear, this is very important to me...
     
  47. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    @Philkrom

    Hello, Phil,
    I've attached updated packages to this message.
    I also attached an example project, which should work as expected
    Please, read my comments below and let me know if you have any questions.

    We have added settings to hide/disable tables or fields
    They can be edited in Unity Editor and dynamically at runtime, by using the following methods:
    BGRuntimeDatabaseEditor.SetMetaState and BGRuntimeDatabaseEditor.SetFieldState
    BGRuntimeDatabaseEditor is a component, attached to database editor prefab
    You can invoke these methods, using Playmaker Call action https://hutonggames.fogbugz.com/default.asp?W1139

    You can save the database to any location, using Tools->Save

    Read Path static variable from BansheeGz.BGDatabase.BGRuntimeEntityToolSaveLoadA class
    Unfortunately, this is a paid asset, so we decided to use another free asset instead https://assetstore.unity.com/packages/tools/gui/runtime-file-browser-113006
    To add a file browser button- you need to add this asset to your project
    Once the asset is installed- the file browser button is added to Save/Load dialogues


    We have Excel/GoogleSheets runtime export/import plugins, which can be used together with database editor
    1) Excel https://www.bansheegz.com/BGDatabase/Downloads/RuntimeExcelMonitor/
    2) GoogleSheets https://www.bansheegz.com/BGDatabase/Downloads/RuntimeGoogleSheets/
    GoogleSheets plugin has a major limitation (it does not support simultaneous export from multiple devices)

    So in the example project, we use an Excel plugin.
    I also attached an updated package of this plugin to this message
    An updated package supports export/import settings, which can be used to selectively include table/fields to the export job
    We also added integration so Export/import to Excel can be invoked from the Database tools menu in case the Excel plugin is in your project and setup properly (e.g. if the BGExcelImportGo component is loaded/attached to GameObject)
    To make bool field to be true by default (e.g. when a new row is added) you need to set the bool field default value to 1

    It is possible with C# scripting
    1) Open the attached example project
    2) Import BGDatabase package to this project
    3) open Assets\Scenes\SampleScene.unity scene
    4) There are 2 important GameObjects- Database editor and Excel runtime plugin
    5) Excel Manager GameObject has an additional DatabaseRowFilter component (Assets\Scenes\DatabaseRowFilter.cs) attached, which filter out the rows
    This component has "filterFields" array parameter.

    You need to include a path to a bool field you want to use to filter out the rows, using {TableName}.{FieldName} notation
    So in the screenshot above "toValidate" bool field from "test" table is used, you need to replace it with your own table name and field name

    To change the excel file path- change "ExcelFile" parameter of BGExcelImportGo component
    In the example project, we use "excel.xls" path, relative to the StreamingAssets folder.
    If you do not want excel file to be under StreamingAssets folder- use absolute path
     

    Attached Files:

    Philkrom likes this.
  48. inkyphilospher

    inkyphilospher

    Joined:
    Aug 26, 2014
    Posts:
    13
    The column is using a string as a unique ID. It'd be super helpful if this was a possible option.
     
  49. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    370
    we will try to implement this option, thank you for suggestion
     
    inkyphilospher likes this.
  50. Philkrom

    Philkrom

    Joined:
    Dec 26, 2015
    Posts:
    90
    Your support is ABSOLUTELY AWESOME, thanks so much for all those informations, this is a very great help !
    Give me time to test it all and I send you my feedback and possible questions !
    With my very gratefull thoughts :):):) !
    Phil
     
    BansheeGz likes this.