This is a paid asset, but now you can download Vault Core Free.
Detail this asset from Unity Store: Original Link
Vault Core v1.0
“If possible, please buy the package to support the developer”
Vault is a client database system for games. It is built on ScriptableObjects inheriting from it’s base DataEntity class and can support content of any type.
What is Vault?
Vault Core is a Database for your game, a Design Dashboard for your developers and a highly extensible API for your developers.
How does it work?
It uses ScriptableObject asset files to define “Data Entities” in your game. These are modified Editor via the Vault Dashboard Window. Programmers can extend the DataEntity class easily, creating new types of DataEntities. These appear in the Dashboard as design options, allowing you to create instances of those classes and automatically store them in the database. Implementation is as simple as defining a field of your type and then interacting with the built-in type-filtered dropdown to reference the instance you want.
Why do I need it?
If you need a no fuss data/design solution with minimal setup and high extensibility then this is your tool. There are a plethora of solutions for Databases and design tools. Vault is a simple, intuitive, non-invasive database system for your project which uses the tried-and-true and very powerful ScriptableObject class to store all of your data right in your project. It’s easy, powerful, and virtually futureproof.
Vault is a core tool that works as a database for your project and design front-end for your team. Content is serialized as scriptable object asset files and very friendly to the git workflow.
Vault has a number of extensions such as Attributes and Inventory. You can find documentation for them on our gitbook pages. We’re confident that our tool ecosystem will make your project development go significantly smoother and be a much more enjoyable experience.
Vault Inventory is a pretty straightforward module with a simple integration API. The vast majority of the heavy lifting is already done for you and the code focuses on event based interactions to keep runtime expenses to a minimum.
The architecture was designed to keep in mind a variety of projects that may want different features and to avoid coding ourselves into a corner where we couldn’t support different approaches and integrations. The example project is just one approach to the broad concept of Inventory management.
Most of the interaction with the Inventory system will be event based and very painless. Clients essentially do nothing except request the Server to do simple events with Slot Indexes and wait for a return with what the new slot looks like.
Here’s the primary classes you want to be familiar with:
These are the backbones of the module.
Your characters and things with pockets are going to implement an Inventory class which is where the actual real-time data is stored and the inventory interactions are piped through.
Your UI spaces will use an InventoryUi class to handle displaying the current state of an Inventory that it’s aimed at.
Your UI slots displaying item icons and handling navigation will be using the ItemUiPlug component to facilitate dragging, dropping, moving, splitting, discarding and otherwise potatoing with your Items inside the UI space.
Your powerhouse back-end is the Vault where all database items are stored. Check it out!
References to sprites, objects, numerical values, restrictions, descriptions, titles, and everything else you want to cram into your database are all in the Vault. If you need an Item you can linear search by name or direct fetch by index. Other search methods are planned in future releases.
So how do I put stuff in the Vault?
Fortunately you don’t have to code your items in XML or create assets by hand, or work with an external SQL database, or pull data in from Google Sheets. While these are all legitimate ways to approach a game database of varying sizes, it’s not the one we’re doing here. Vault is targeting those who want a solution within Unity with no fuss.
What we have here is a ScriptableObject asset based approach. The Vault Dashboard is a space where you can design items and it will automatically create an asset of any vaild class via dropdown menu, automatically reference it in the database for runtime access and allow you to modify it with ease from within the Vault Dashboard. It is designed with UI Elements and custom property drawers will work fine.
The Vault Dashboard is accessible by pressing Ctrl+Shift+I or going to Tools > Cleverous > Vault Dashboard. From the Vault Dashboard you can create a new item of any class that derives from DataEntity and you can spawn any item in the world that derives from RootItem.
So how does the UI stuff work then?
The UI consists of an InventoryUi component with a Grid and SlotRestriction information waiting for something to fire it’s public static Action OnPlayerSpawn event in order to hook into that interface’s Inventory component and display the current state of that Inventory on it’s Grid.
To display that information, the InventoryUi component will fill it’s Grid with a bunch of template prefab instances. The template prefab will have an ItemUiPlug component which facilitates dragging, dropping, moving, discarding and other functions for the item.
When a user interacts with the ItemUiPlug it will figure out what the action is and request that to be done over the network through the Inventory script. This will send a message to the Server, the server will say “hmm, can Slot X do that with Slot Y? If so, how?” then send an update to clients for any affected slot numbers after it takes action – if it can. The Clients have no control over the results.
There’s lots of hooks available to integrate functionality, for example check out the provided component for handling sound in the example project: