Search Unity

[RELEASED] DataMaster - Clean and performant management of your game’s data.

Discussion in 'Assets and Asset Store' started by sballew7, Mar 13, 2018.

  1. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76


    Clean and performant management of your game’s data.
    Define items and abilities for your RPG, enemies for your Rogue-like, physics for your platformer, or anything else.
    All within the Unity editor.


    Asset Store | Documentation | Support



    DataMaster is built on top of Unity’s concept of ScriptableObjects.

    ScriptableObjects are a flexible and performant way of storing data within Unity, and is heavily recommended by the Unity team. Unfortunately, ScriptableObjects can be a bit of a pain to organize and to use.

    DataMaster adds structure and editor tools on top of ScriptableObjects to make them simple to create and use with minimal code. DataMaster organizes your data into Catalogs, which are like containers for your data. Then, DataMaster lets you to fill those catalogs with Catalog Items.

    You can use catalogs for any type of data you want for your game. Examples include managing a growing list of RPG Items and their stats, enemy types, platformer level definitions, treasure chest loot tables, or really anything else.

    Even better, because DataMaster is built on top of ScriptableObjects, you can include any data type within your catalogs. That means your data can include references to Unity prefabs, sprites, textures, enums, or simple integers and strings. You can even reference other catalog items.
    Features:
    • Create catalogs for your data.
    • Edit your catalogs, add items, all within the Unity editor.
    • Create custom inspector interfaces with minimal code.
    • Use any data type in your catalogs, including custom prefabs, classes, or other references to other catalogs.
    • Built on top of Unity's ScriptableObjects for performance and editor integration.
    • Export catalogs to different file formats, including CSV, for usage outside of Unity.
    • Easily access your data using standard Unity processes; by direct reference or by Resources.Load.



     
    Last edited: Mar 31, 2018
    TeagansDad, Maxium and hasanbayat like this.
  2. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Hey there, I like the idea. Any chance you have seen GameDB Pro? Do you know how this compares? I have been looking around at something to handle my data.
     
    Last edited: Mar 31, 2018
  3. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sballew7 ,

    I am always drawn in by Assets like this. Whilst I can code reasonable well myself now, and I'm v familiar with ScriptableObjects and how to get the best out of them with say Assets like Odin, I really do like an Asset that makes things nice and accessible and visual for the sake of speed. I like the look of your catalogs as tables for instance then accessing the catalog items.

    However, what I don't really get from the video or a skim of the documentation are answers to these questions:-

    1. Is it all namespaced so it won't conflict with my code and other Assets?;
    2. Can you have Catalogs as variables/classes within another Catalog Item? (for example I am designing weapons and each weapon will have a weapon type - I have defined weapon types in another Catalog);
    3. Can a catalog item reference items within it's own catalog? (for example, I am designing elements as catalog items within an 'Elements' catalog like fire and ice, i want to define any given element's opposing element(s) - can I reference say the Ice catalog item - from same catalog - in the Fire catalog item for this purpose);
    4. What are the full catalog export functions like? to JSON (binary or string)? Excel? CSV? Google Sheets? XML? Or do you have your own custom scripted export/save and import/load implementations?
    5. Same question in reverse - what formats can it import from?
    6. How much of Unity Types and even Custom Classes can be exported/imported beyond JSON serialisation (which should, in theory, be able to do all)?
    7. If I run this Asset with Odin Inspector on board, what is it going to do, if anything to your nice-looking UI?
    8. Are there search and filter functions within Catalogs and for Catalogs?
    9. Can you re-order Catalog Items within Catalogs?
    10. How do Catalog Items display say Meshes? Anim Curves?
    11. Following on from that, can you preview media like say Audio Clips?
     
  4. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Hey all,

    DataMaster is now live in the Asset Store!

    @MostHated ,

    I have seen GameDB Pro, but have not personally used it. I don't believe GameDB Pro utilizes ScriptableObjects. It looks like it does everything in JSON, which is not something I can recommend. ScriptableObjects are tightly integrated into the Unity engine, while giving many benefits, including performance and flexibility (no hard-coded references, etc.).

    @Duffer123 , thanks for the list of questions. I will try to answer each one. Some of the features you ask about are available now, while others I am currently working on for the next update.

    Yes, all of the code is under the DataMaster namespace.

    Yes, you can reference one catalog from another. To illustrate this, the asset comes with a few demo catalogs. One demo catalog is RPG Items, while another is TreasureChestRewards. The TreasureChestReward catalog defines treasure chests, which reference an RPG Item as a key, and a list of RPG Items as rewards. You can see a screenshot of that here:

    Yes, items can reference other items within it's own catalog.

    The only export function right now is to CSV. The JSON export button is there, but it is currently disabled. I am working on that function for a future update.

    Exporters are created by implementing the DataMasterExporter interface. The plan is to automatically expose menu entries for any implementations of this interface, allowing you to define your own custom exporters.

    DataMaster does not currently have import functionality. Because the workflow is really intended to happen inside the Unity editor, I worry that an import function will promote a workflow that does not utilize ScriptableObjects to their full benefit.

    With that said, I would love to hear more about use-cases around importing to see if it's a feature we should put on the roadmap.

    DataMaster does not do any custom serialization. Custom serialization is always annoying, because it will always be lagging behind in feature support.

    Instead, DataMaster lets Unity handle serialization. That means any Serializable class would work, just like Unity normally does it. That includes custom classes.

    Great question! I actually do not own Odin, but I have been considering picking it up!

    From what I understand of Odin, you should be able to create a custom inspector for catalog items. The catalog browser windows would stay the same, but you'd be able to create your own inspectors.

    Note that DataMaster does come with it's own CustomEditor class that overrides the inspector for DataMaster items. I'm not sure how Odin would handle overriding that.

    There are not currently any search or filter functions, but I think that is worth exploring. Thanks for the suggestion.

    Catalog items are currently shown in alphabetical order. Again, good suggestion, and I think another feature worth exploring.

    Great question! Right now, the display will show the name of the mesh in the table.
    I added a Mesh field and took a quick screenshot:

    However, I have an update ready that creates asset previews for any UnityEngine.Object type. That makes it look like this:


    AnimationCurves currently fallback to a ToString() call, which isn't really ideal. AnimationCurve does not inherit from UnityEngine.Object, so I'll need to either handle that case specifically or a better way to display it.

    Note this is only in reference to the catalog display table. Inspectors use built-in Unity editor fields.

    Building on the earlier answer to #10, AudioClips will display the clip name in the current version. In the next version, you will see the asset preview, since AudioClips are Unity Objects.


    I currently have a couple more fixes in progress before I submit the update to the asset store, including a bug fix for when Mesh values are empty.

    Thanks for all of the questions!
     
    Duffer123 likes this.
  5. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sballew7 ,

    Thanks for the quick responses and this goes now near the top of my desired purchases...
     
  6. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sballew7 ,

    Going to start in on this Asset when return home tomorrow. However, looking at the Asset Store page and documentation I think there could be a bit more on creating catalogs/their structure...?

    I think you could attempt to create a ‘Create Catalog Schema’ Menu Option leading to an Editor that does just that:- creates at least the basic Unity Types and Other Catalog Classes as field types - designing the schema of the Catalog visually? (Rather than adding in c# code public fields in the relevant .cs file)
     
    Last edited: Apr 2, 2018
  7. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Great. If version 1.1 is not live on the Asset Store by the time you start, we can send you the package file directly.

    Also note that we have seen some cases where the Database asset, which is auto generated for every catalog, sometimes appears empty in a built/exported game. We are fixing this. Until then, you can reference catalog item asset files directly. I'll provide an update when this is fixed.
     
    Duffer123 likes this.
  8. Duffer123

    Duffer123

    Joined:
    May 24, 2015
    Posts:
    1,215
    @sballew7 ,

    Ok. Should be back home and give it a whirl sometime tomorrow evening and I'm off work day after too.

    With Assets like GDE you can see that the schema of the equivalent of Catalogs can be visually developed too so I think that should probably be on your to-do list... ;)
     
  9. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Visual creation of catalog definitions is on the list, but no ETA on that.

    Version 1.1 has been submitted to the Asset Store and is awaiting approval. This includes the new asset previews, a bug fix for empty fields, and a bug fix that was preventing the database asset from being serialized.
     
    Duffer123 likes this.
  10. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Is it able to automatically generate the class code or anything?
     
  11. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    There is some code generation that happens, but editing the resulting ScriptableObject class is ultimately how you would modify a schema. If a visual editor were to be created, it could generate this, but it does not do that as of now.

    DataMaster generated the initial class file, as well as a "database" class for it. This database class manages a list of the data items in the catalog, and offers functions like looking up an item by ID. The Database asset isn't really needed, but helps if you want a single asset to reference all items in your catalog. The asset of managed by DataMaster and updated any time items in the catalog are added or removed.
     
  12. MostHated

    MostHated

    Joined:
    Nov 29, 2015
    Posts:
    1,235
    Understood, I was meaning more though does it generate the code for you to use in your own code to access that data within what you create
     
  13. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    DataMaster generates ScriptableObject asset files, which are Unity asset files that can be referenced in the editor. So there isn't really any code needed to access the data, you can just drag and drop the asset files wherever you need them. Once you have that reference, you can just access any properties like a normal object.

    You can choose to drag and drop individual catalog asset files, or you can drag and drop the database asset, which contains all of the catalog items.
     
  14. pleasantPretzel

    pleasantPretzel

    Joined:
    Jun 12, 2013
    Posts:
    34
    Looks great!

    Something I'm interested in is importing a CSV file. So for example, because you can export a CSV with DataMaster, it would be nice to send that file to a non-Unity-using team member for editing. They could make their text edits, and then we could reimport the CSV file with the new edited values.

    Not sure if this would work with the intended workflow of DataMaster. Excuse me -- my developer skills are weak so I know that I may be approaching or understanding this all rather poorly!
     
  15. pleasantPretzel

    pleasantPretzel

    Joined:
    Jun 12, 2013
    Posts:
    34
    Ending up buying it to test it out! :)

    I'm expecting to have many items in my catalogs. I put about 1300 items in the Example Scene's RPGitem catalog. The Catalog editor window is struggling to scroll. However, the standard Unity asset editor window (where I'm viewing the 1300 scriptable object asset files) scrolls without issue.

    Just wanted to let you know! Should I not expect to create such large Catalogs? I could organize differently if need be.
     
  16. sballew7

    sballew7

    Joined:
    Sep 3, 2013
    Posts:
    76
    Hey @slufter ,

    Thanks for the feedback!

    Regarding performance of large catalogs, yes you are expected to create large catalogs! I'll admit 1,300 is larger than we have created internally so far. Right now, DataMaster is creating asset previews for each field of every item and trying to display everything, even if you only see a few in the visible area at a time. We will do some work to improve the performance of that and release it soon! I will be sure to send you a message when that's fixed.

    Regarding import, I agree with you. It would be helpful, as some teams do editing outside of the Unity editor. Here's the thing with doing this in DataMaster. Some fields are reference types, and they reference other Unity assets. For example, you might reference a Sprite or a Mesh within your catalog item. There really isn't a good workflow to manage these references outside of Unity.

    However, there are also primitive type fields. These include strings, numbers, and other simple types. For example, an RPG Item might have a "damage" field that is a number, or a "IsLegendary" boolean, or even a "Modifiers" enum. These types of things should be easy to modify outside of Unity.

    Given that, I think we can craft together an import feature that allows importing of primitive type fields. Would that be of use? This would let non-Unity team members edit basic fields, but complex fields (Sprite, etc.) would still be done within Unity.

    Thanks again for the feedback, and we'll get that performance issue fixed soon!
     
  17. newlife

    newlife

    Joined:
    Jan 20, 2010
    Posts:
    1,080
    Hello, is this still supported and developed?