Skip to content

Commit 8f8e152

Browse files
Merge pull request #1 from Greener-Games/feature/create-readme
Create README.md
2 parents 26656a5 + abf3b2c commit 8f8e152

1 file changed

Lines changed: 28 additions & 20 deletions

File tree

README.md

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
1-
# Introduction
2-
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
3-
4-
# Getting Started
5-
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:
6-
1. Installation process
7-
2. Software dependencies
8-
3. Latest releases
9-
4. API references
10-
11-
# Build and Test
12-
TODO: Describe and show how to build your code and run the tests.
13-
14-
# Contribute
15-
TODO: Explain how other users and developers can contribute to make your code better.
16-
17-
If you want to learn more about creating good readme files then refer the following [guidelines](https://docs.microsoft.com/en-us/azure/devops/repos/git/create-a-readme?view=azure-devops). You can also seek inspiration from the below readme files:
18-
- [ASP.NET Core](https://github.com/aspnet/Home)
19-
- [Visual Studio Code](https://github.com/Microsoft/vscode)
20-
- [Chakra Core](https://github.com/Microsoft/ChakraCore)
1+
# Scriptable Data Asset for Unity
2+
3+
This repository provides a powerful and easy-to-use system for managing global data in Unity projects through a "Scriptable Data Asset". It's a lightweight, yet robust solution for creating singleton `ScriptableObject`s.
4+
5+
## What is a Scriptable Data Asset?
6+
7+
A Scriptable Data Asset, in the context of this repository, is a `ScriptableObject` that is automatically instantiated and can be accessed from anywhere in your code base with a single static reference. Think of it as a centralized data container for your game's settings, configurations, or any other data that needs to be globally accessible.
8+
9+
This utility provides a generic base class, `ScriptableDataAsset<T>`, that you can inherit from to create your own custom data assets. The system ensures that there is only one instance of your data asset, and it handles its creation and loading, so you don't have to.
10+
11+
## Why use it?
12+
13+
Managing game data, especially settings that need to be accessed by various systems, can be challenging. This Scriptable Data Asset pattern offers several advantages:
14+
15+
* **Centralized Data:** It provides a single source of truth for your data, making it easier to manage and modify.
16+
* **Easy Access:** Data can be accessed from any script, at any time, without needing a direct reference to an object in a scene.
17+
* **Decoupling:** It helps to decouple your systems. Instead of scripts communicating directly with each other, they can refer to the data asset, reducing dependencies.
18+
* **Persistence:** The data is stored as an asset in your project, which means it persists between play sessions in the editor and is included in your build.
19+
* **Automatic Instantiation:** The asset is created automatically if it doesn't exist, simplifying the setup process.
20+
21+
This tool is ideal for managing things like:
22+
* Game settings (e.g., audio volume, difficulty)
23+
* Player progression data
24+
* Theme and UI color palettes
25+
* Game balancing values
26+
* References to prefabs or other assets
27+
28+
In essence, the Scriptable Data Asset is a clean, efficient, and Unity-friendly way to handle shared data in your projects.

0 commit comments

Comments
 (0)