diff --git a/README.md b/README.md index 0ca446a..a20b2d8 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,28 @@ -# Introduction -TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project. - -# Getting Started -TODO: Guide users through getting your code up and running on their own system. In this section you can talk about: -1. Installation process -2. Software dependencies -3. Latest releases -4. API references - -# Build and Test -TODO: Describe and show how to build your code and run the tests. - -# Contribute -TODO: Explain how other users and developers can contribute to make your code better. - -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: -- [ASP.NET Core](https://github.com/aspnet/Home) -- [Visual Studio Code](https://github.com/Microsoft/vscode) -- [Chakra Core](https://github.com/Microsoft/ChakraCore) \ No newline at end of file +# Scriptable Data Asset for Unity + +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. + +## What is a Scriptable Data Asset? + +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. + +This utility provides a generic base class, `ScriptableDataAsset`, 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. + +## Why use it? + +Managing game data, especially settings that need to be accessed by various systems, can be challenging. This Scriptable Data Asset pattern offers several advantages: + +* **Centralized Data:** It provides a single source of truth for your data, making it easier to manage and modify. +* **Easy Access:** Data can be accessed from any script, at any time, without needing a direct reference to an object in a scene. +* **Decoupling:** It helps to decouple your systems. Instead of scripts communicating directly with each other, they can refer to the data asset, reducing dependencies. +* **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. +* **Automatic Instantiation:** The asset is created automatically if it doesn't exist, simplifying the setup process. + +This tool is ideal for managing things like: +* Game settings (e.g., audio volume, difficulty) +* Player progression data +* Theme and UI color palettes +* Game balancing values +* References to prefabs or other assets + +In essence, the Scriptable Data Asset is a clean, efficient, and Unity-friendly way to handle shared data in your projects.