Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smidgens/unity-data
Data abstraction wrappers for Unity
https://github.com/smidgens/unity-data
config data-abstraction not-affiliated-with-bryan-adams smidgenomics unity unity-data
Last synced: 27 days ago
JSON representation
Data abstraction wrappers for Unity
- Host: GitHub
- URL: https://github.com/smidgens/unity-data
- Owner: Smidgens
- License: mit
- Created: 2022-07-15T12:59:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-18T12:20:34.000Z (over 2 years ago)
- Last Synced: 2024-05-01T17:26:16.425Z (8 months ago)
- Topics: config, data-abstraction, not-affiliated-with-bryan-adams, smidgenomics, unity, unity-data
- Language: C#
- Homepage:
- Size: 1.29 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![](/.github/banner.png?raw=true "")
![](/.github/gallery.png?raw=true "")# âšī¸ Features
* ScriptableObject persistence for data.
* Data abstraction in code.
* Configure data sources in Inspector: static, asset, or function (reflection).
* đ¤ Reasonably lightweight.
# đĻ Install
1. Open Package Manager
2. Paste git URL (`#`)
# đ Usage
𧊠**Note**: To use plugin in code you need to add an assembly reference.
### Reading data
```cs
using Smidgenomics.Unity.Data;public class VariableTest : MonoBehaviour
{
public Readable num1;
public Readable num2;private void Awake()
{
Debug.Log("Number 1: " + num1.Value);
Debug.Log("Number 2: " + num2); // implicit conversion
}
}```
### Custom types
```cs
using UnityEngine;
using System;
using Smidgenomics.Unity.Data;[Serializable]
class MySerializedType
{
public int a, b, c;
}// inherit from ScriptableValue<>
class MyCustomAsset : ScriptableValue { }
```