View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.2.0
- Last updated
- First released
- Unity version
- 6000.0.76 or later
- Package size
- 1.0 MB
- Files
- 65
- Favorites
- 10
- Views in the past week
- 7
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- Free on
Keywords
Auto Singleton
- Price drop
The simplest singleton tool on the Asset Store. Add the [Singleton] attribute to any class and the asset handles everything: automatic asset generation, cleanup, and polymorphic access at runtime.
Discount -100%
Previous price
$19.99
Price Free
Get it free on Asset Store (opens in new tab)
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 6
Auto Singleton screenshot 1
About this asset
[Website] [Documentation] [Public API]
The simplest singleton tool on the Asset Store. Add the [Singleton] attribute to any class and the asset handles everything: automatic asset generation, cleanup, and polymorphic access at runtime.
Features
- Attribute-based setup: decorate any MonoBehaviour or ScriptableObject with [Singleton]: no base classes, no boilerplate; optional inherited, displayName, and folderPath arguments for fine-grained control
- Automatic asset management: the editor creates and maintains prefabs (MonoBehaviour) or ScriptableObject assets after each compilation; deleting a singleton class also deletes its asset
- Polymorphic access: retrieve all singletons assignable to a type via Singleton<T>.Instances; T can be a base class or an interface
- Instance selection: designate which instance Singleton<T>.Instance returns using SelectInstance: by predicate, priority function, runtime type, direct reference, or no-arg when only one is registered
- Safe access helpers: HasInstance and TryGetInstance let you check availability without catching exceptions; Find returns all instances matching a predicate
- Manual registration: use Singleton.Add and Singleton.Remove at runtime to manage singletons of any reference type, not just Unity objects
- No reload on play mode: works seamlessly with Unity’s no-domain-reload setting
- Editor tooling: Top Bar menu with force-refresh, automatic refresh, change logging, and project icon toggles; singleton list inspector to view and enable/disable each singleton individually
Content
- Singleton attribute: SingletonAttribute for automatic asset management, with inherited, displayName, and folderPath options
- Runtime access classes: Singleton (manual Add / Remove) and Singleton<T> (Instance, Instances, HasInstance, TryGetInstance, Find, SelectInstance)
- Editor tooling: automatic refresh system, singleton list inspector, project icons
- Demo: a Tic Tac Toe game built with MVC, demonstrating 5 singletons across MonoBehaviour, ScriptableObject, and plain class types
Requirements
Unity 6.0 or later
From the publisher's Asset Store listing.
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 6000.0.76f1 | Compatible | Compatible | Compatible | Compatible |
As listed on the Asset Store.