Marked Singleton<T> obsolete

This pattern is discouraged.

... I regret adding it.
This commit is contained in:
Oliver Booth 2022-05-31 11:52:59 +01:00
parent c600825f55
commit 5d63560146
No known key found for this signature in database
GPG Key ID: 32A00B35503AF634
2 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,9 @@
- X10D.Unity: Added `Vector3Int.WithZ()`
- X10D.Unity: Added `Vector4.Deconstruct()`
### Changed
- X10D.Unity: Obsolesced `Singleton<T>`
## [3.1.0]
### Added
- Reintroduced Unity support

View File

@ -7,6 +7,8 @@ namespace X10D.Unity;
/// thread-safe.
/// </summary>
/// <typeparam name="T">The type of the singleton.</typeparam>
[Obsolete("This implementation of the singleton pattern is discouraged, and this class will be removed in future. " +
"DO NOT USE THIS TYPE IN PRODUCTION.")]
public abstract class Singleton<T> : MonoBehaviour
where T : Singleton<T>
{