Hi, Cosmoraph, thank you for your interest in our asset!
Currently, our DB is not thread-safe (it’s supposed to be run on the main thread), but we were thinking about adding multithreading support as an option if there is any demand for this.
DB does not call any code outside (apart from event listeners). A multi-threaded function cannot call DB (cause it’s not thread-safe )
We were thinking about new Unity’s Jobs and ECS and how we could integrate with them, but we’ve run out of ideas. Actually, you can easily create Unity’s Entities using information from the database without multithreading, and after you created these Entities, there is no much sense in storing them in the database unless you want to be able to save and load them afterwards. But if you want to save them, you could easily create a thread-safe function for this and call it when user want to save the game. So other than this usecase, there is no sense in using database (maybe we were wrong)
Anyway, if you are interested in using our asset in a multithreaded environment (probably with Jobs/ECS), we could
provide you with free evaluation copy (so you could decide if you want to use it or not)
If you decide you want to use it, we send you a voucher (so you could download our package for free), and a beta version with multithreading support. Later we decide together what needs to be added.
@BansheeGz ,
Thank you for your reply.
I bought it right away and am reviewing your performance.
Before ‘multi-threaded evaluation Copy’ request, I ask you a few more questions.
I found out that BGID is essential to access Entity on the code. But I need a way to search by a method other than BGID.
If the table is set to a unique name, is there any way I can search by name to get the Row I want?
In addition, I wish I could set up each Row with an ordered number instead of a unique name, and I would like it to be able to search by numbers in this order.
Is there a way to do these? If not, can you add these features?
In 1.2 version, which went live today several hours ago, there is a method to get entity by name: BGEntity result = meta[“entityName”]; Additionally if you use CodeGen you can generate static getters for each entity (if the number of entities <1024)
To search by predicate, use
List<BGEntity> result = meta.FindEntities(entity => entity.Get<int>("damage")>10);
BGEntity result = meta.FindEntity(entity => entity.Get<int>("damage")>10);
sorry, we forgot to add it to API page
Also, note, we used very bad decision to use temporary list in meta.FindEntities method to get rid of Garbage Collection
EDIT:
3)We’ve added Comparison parameter to Find/Iterate methods, so rows could be sorted.
I’ve sent you an updated package.
So, the signatures now are:
//find all items with damage>5 and return them in ascensing order
List<BGEntity> items = BGRepo.I["Items"].FindEntities(e => e.Get<int>("damage") > 5, null, (e1, e2) => e1.Get<int>("damage").CompareTo(e2.Get<int>("damage")));
Cosmoraph, with regard to performance: at the moment we are investigating opportunities to improve it, including the possibility to reduce the cost of field value getter(and partially setter) to single access to an array element (at least with generated code).
Probably we won’t be able to make it any faster than accessing array element by its index (without using C++)
@BansheeGz ,
I checked 1.2 version over the weekend. I am satisfied with the update. However, 3) is the 1.3 version? I’ll check as soon as updates register with the Unity store. Thank you for your quick updates.
Cosmoraph, yes, the sorting delegate parameter (Comparison) is in the 1.2.1Beta now.
I’ve sent beta version to you in the private message.
If you did not receive it, please, write to our support email, we’ll send it by email.
We plan to release 1.2.1 version next week
@BansheeGz , With Unity Types, when editing tables, it would be good if you could see a small preview of things like sprites, texture2ds, meshes, gameobjects in the cell? Would this be possible?
How do you store these in the Table databases? As path names to the assets in the Resource folder path?
@Duffer123, yes, we will add it. I will send an update to you in a private message very shortly.
Yes, we store it as path names to assets in Resources folder or in a asset bundle.
We want to add support for Unity’s addressables in the new version ( https://forum.unity.com/threads/addressables-are-here.536304/ )
I would be quite interested in seeing what you come up with if you were to move forward with a multithreaded implementation of this. I have been working on an RPG and actually have been thinking of revisiting my data storage setup.
Even if you don’t, I still like what you guys have going on there from what I can see.
@MostHated
could you please email us at support@bansheegz.com ?
We could provide you with free beta copy for review and we will be very interested to hear your opinion
I hope it will be ready within 1-2 weeks
We’ve added support for Unity addressables. (BGDatabase version 1.2.3)
We also added Unity assets preview in the table cells and drag and drop support.
Just installed v1.24. I have Windows 10 and Unity 2018.2.10f1.
I am still getting the following (non-breaking) yellow warnings:-
There are inconsistent line endings in the ‘Assets/BansheeGz/BGDatabase/Examples/Scripts/Generated/BGGeneratedPlaymaker.cs’ script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.
Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
UnityEditorInternal.InternalEditorUtility:GetGameObjectInstanceIDFromComponent(Int32)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
UnityEditorInternal.InternalEditorUtility:GetGameObjectInstanceIDFromComponent(Int32)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
@Duffer123_1 ,
Oh, I’m sorry, it slipped my mind, thank you for reminding me.
we’ll have it fixed soon (I’ll send you an updated package just in case you are interested)
Next version (ETA: end of next week) should have new node-based graph editor for building templates
We want to build a node-based graph tool to query/update database data without need to write code.
Something like Shader Graph https://unity3d.com/ru/shader-graph , but instead of building shaders we want to query/update data with it.
And these graphs need to be executable at runtime.
At the very least, we want to replace our templates with this tool ASAP, cause they are very basic and not very useful at all.
After the tool is released, any feedback would be greatly appreciated.