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. Irishall

    Irishall

    Joined:
    Dec 9, 2016
    Posts:
    13
    Hi @BansheeGz
    Can I include multiple of the same Entities in "relationMutiple Field"?
    For Example: [Enemy A, Enemy A, Enemy B, Enemy B, Enemy A, Enmey C ...]
     
  2. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi,
    No, relationMutiple field contains a distinct list of entities without duplicates.
    We could add a new relational field with duplicates support (or maybe add "allow duplicates" configuration parameter to relationMutiple field)
    Please, let me know if you are interested
     
  3. Irishall

    Irishall

    Joined:
    Dec 9, 2016
    Posts:
    13
    That's the solution I need! both look nice.
     
  4. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    110
    Hi,
    I'm interested in this feature too (think of a deck of cards that can contain the same card multiple time).

    Thanks a lot !
     
  5. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello,
    We've added an option to use string/int field values as IDs
    Also there is a new option to use row's index as ID (e.g. first database row is mapped to the first Excel/GoogleSheets row etc.)
    You can change rows mapping strategy under Export/Import->Data sources->Rows mapping config
    I've sent updated packages to you in a private message
    Please, test it with new empty Excel file to make sure it works as expected and let me know if something is wrong
     
  6. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hello, we've added support for duplicate values for relation field
    I've send updated package in a private message
    Please, let me know if something is missing
     
  7. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi, please, check private messages- I've sent you an updated package
    Please, let me know if it does not work as expected
     
  8. Irishall

    Irishall

    Joined:
    Dec 9, 2016
    Posts:
    13
    It works successfully! Thank you
     
  9. Poupi

    Poupi

    Joined:
    Jan 11, 2012
    Posts:
    110
    Yes this is perfect, thanks a lot !
     
  10. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    i, I´m having a error on building to Android with the new adressables update "1.1", using the first 1.0 version it works again.

    The error points to: \com.unity.addressables@1.16.19\Runtime\ResourceManager\AsyncOperations\AsyncOperationHandle.cs:20
     
  11. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi, our addressables plugin v.1.1 requires Addressables version 1.17.17 minimum

    If version 1.17.17 does not show up in the Package Manager- open {YourProjectFolder}\Packages\manifest.json file in the text editor and set Addressables to version 1.17.17 manually as shown on the screenshot below
     
    Last edited: May 26, 2021
  12. RuaaTech

    RuaaTech

    Joined:
    Apr 26, 2021
    Posts:
    5
    Hi I’m AR developer, and I want to make an AR application will work in this way; the doctor look at a patient record using AR glass, he will see the heart and a data will come as text in the same scene, the data in the text showing his heart beat rate, which is coming from the hospital database which is downloaded from the hospital cloud. As the hospital data’s will be uploaded all the time to the cloud, and the AR application will take those data from the cloud. Is it possible with your asset please?
     
  13. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi!
    Sorry, no, our database is a client-side database, which is used mainly as a replacement for scriptable objects
     
  14. Studiomaurer

    Studiomaurer

    Joined:
    Sep 5, 2012
    Posts:
    43
    Why? One of the main benefits of a Database is that you can collect Data in it. If it is not possible to save that data in builds, what is the point? Am I missing a core concept of bgdatabase?
     
  15. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Database data can be saved at runtime, but saving the database inside Unity editor and saving the database in builds are different.

    When we save the database inside Unity editor, we have a database file and we have write access to it- so all we have to do is overwrite this file.
    When we deploy our application to a player device- we do not have write access to database file anymore (at least on mobile platforms) and if we use Resources loader- we do not even have a file, cause the database file is packed along with other data.
    So the database file, shipped with the game files, becomes read-only data on player's devices

    1) The most obvious workaround would be saving the whole database to some file under Application.persistentDataPath folder ( https://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html ) using BGRepo.I.Save() method to get database content, and loading this file at application startup and passing its content to BGRepo.I.Load() method.
    In this case, we again have a database file and read/write access to it.
    But this method has a huge disadvantage- the developer will not be able to update database data in the next releases- cause the whole database is stored locally on players devices

    2) That's why we tried to create an alternative method for saving/loading database- SaveLoad add-on
    SaveLoad add-on configuration splits the database into two parts- dynamic (data, which can be changed during play session) and static(read-only).
    When you save the database using Save/Load add-on- only the dynamic part is saved
    When you load the database using Save/Load add-on- the main database, which is shipped with the game, is loaded first and only after that the dynamic part is merged with the main database
    By using this method- the developers can update the static part between app/game releases, change addons settings, add new fields/tables.
    More information about Save/Load add-on can be found on its home page: https://www.bansheegz.com/BGDatabase/Addons/SaveLoad/

    Please, let me know If you have any questions
     
  16. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Amazing, thanks!
     
  17. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    Hi, I´m using Save/Load Bolt addon, and it was all good, but today I´v started seeing a strange behaviour, when I save, the file ".sav" is created perfectly I can even load it and its all fine, but if I exit play mode, when I click "enter play mode" again, the file disappear and I got this error:
    upload_2021-6-9_16-42-32.png

    I've played a scene that has no Save/Load logic, even any BG db logic, and the file still vanishes.

    Any idea what may be causing it?

    Unity 2021.1.9f1 and UnityVs 1.6.1

    Also, just updated windows 10
     
  18. DG_Adriano

    DG_Adriano

    Joined:
    Aug 10, 2019
    Posts:
    68
    I´m currently trying to upgrade BG database and etc...

    (EDIT) No success, the file is gone as soon the game started playing.
    (EDIT2) Playing an empty scene and the file stills there,... Will investigate my starting scene.
    (EDIT3) Found it, I was checking if the app version changed and deleting user data in some situations, but never setting the new version again. sorry.
     
    Last edited: Jun 9, 2021 at 9:10 PM
    BansheeGz likes this.
  19. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Hi, thank you for the update
     
  20. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    18
    Is there a best-practice for tamper-detection of the BG database data? I see that encryption is supported, but not necessarily recommended. Assuming that the data could eventually be tampered with, what's the most appropriate way to detect the tampering?
     
  21. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    Unfortunately, currently, there is no tamper protection/detection feature available
    If you know of any good algorithm for data tamper detection - please, let me know
    As far as I understand, if data protection is critical- the best way to protect the data is to keep it on the server but this solution requires an online connection
    Regarding encrypting/decrypting database data- we support any algorithm- but we doubt it can be done efficiently
    Maybe it can make data decrypting a little bit harder at best
     
  22. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    18
    Would the BansheeDB event listener trigger if a database value was edited in memory? Our database is used in a read-only situation for tuning, asset references, etc, so we would never expect the data to change.
     
  23. BansheeGz

    BansheeGz

    Joined:
    Dec 17, 2016
    Posts:
    238
    No, the event will not be fired
    We are not experts in this field, but probably even if we implemented the data change detection algorithm for read-only data- it won't protect against data tampering, cause all the checks can be bypassed with code injection
     
  24. mike6502

    mike6502

    Joined:
    Oct 5, 2016
    Posts:
    18
    Got it, thank you for the info.
     
unityunity