Unity-SODatabase
日本語版はこちら | English version here
Overview
SODatabase is a Unity library for managing ScriptableObjects.
It has the following features:
- Minimal database system
- CRUD operations completed through a GUI
- Extensibility
Setup
Requirements
Installation
- Open the Package Manager.
- Click the “+” button and select “Add package from git URL.”
- Enter the following URL to install:
https://github.com/Mt3Zz/Unity-SODatabase.git?path=/Assets/SODatabase
Usage
- Open Window > SODatabase Editor.
- Click the “Preference” button to open package settings.
- Click the “Create New Storage” button to create a new storage in “Managed Storages.”
- Return to the SODatabase Editor window.
- The created storage will be displayed in the sidebar. Create a new object from “Append Record.”
Extension
- Create a new assembly definition reference file in any folder.
- Attach “SODatabase” to the assembly definition of the created file. Be careful not to attach SODatabase.Editor, SODatabase.Editor.Tests, or SODatabase.Tests.PlayMode.
- Create C# code in the folder. Refer to the sample code below.
- The defined object will be added to the window. Use “Append Record” to create and use the defined object.
// SampleObject.cs
using UnityEngine;
// Add SODatabase.DataObject
using SODatabase.DataObject;
// Inherit from BaseObject
public sealed class SampleObject : BaseObject
{
[SerializeField]
private int _sampleIntValue;
[SerializeField]
private string _sampleStringValue;
}