Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.28 KB

README.md

File metadata and controls

50 lines (31 loc) · 1.28 KB

Unity C# Repository System

Status GitHub Issues License


Centralized data storage solution with full support for Unity's serialization and ScriptableObject's.

📝 Table of Contents

🏁 Getting Started

Installing

Simply import it in Unity with the Unity Package Manager using this URL:

https://github.com/DatLycan/Unity-RepositorySystem.git

🎈 Usage

 public class MyRepo : IRepository {
     public string MyString = "My String!";
 }
 public class MyClass : MonoBehaviour {
     private readonly Reference<MyRepo> reference = new();
 
     private void Start() => Debug.Log(reference.Repository.MyString);
 }

Note:

When Unity serializes Reference<T>, it displays a dropdown of classes that inherit from T, or T itself if it is not abstract.