Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 588 Bytes

README.md

File metadata and controls

18 lines (13 loc) · 588 Bytes

SmallTail.Preload

Makes preloading singletons in Unity as easy as marking a class with an attribute

Instalation

Via Unity Package Manager add from git url

https://github.com/SmallTailTeam/Unity-Preload.git

Usage

[Preloaded("Optional name")]
public class ASingletonObject : MonoBehaviour
...

And that's it, an empty object with this MonoBehaviour attached to it will be instantiated and DontDestroyOnLoaded as soon as the game starts.

Though be aware that this thing is not well tested yet, and perhaps will be extended in future to support multiple use cases.