Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

The best way to implement singleton pattern in Unity.

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
NotificationsYou must be signed in to change notification settings

UnityCommunity/UnitySingleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting StartedFeaturesLicenseResourcesDownload

The best way to implement singleton pattern in Unity. By using this pattern you will be able to define Global variables and classes and use their methods and properties in Global. This pattern is a must have for most of the games that made using Unity engine.

📖Learn More about Singleton pattern

Features

  • Works in both Development and Production
  • Instantiates Singleton objects if they aren't available by Lazy Load
  • You can configure fields in the inspector for singleton objects in the preload scene

Getting Started

Usage

Addusing UnityCommunity.UnitySingleton; for using the classes.

  • UseSingleton<T> for plain C# classes.
  • UseMonoSingleton<T> if you want a Scene-based singleton which is not persistent across scenes.
  • UsePersistentMonoSingleton<T> if you want a Global and persistent singleton across scenes.

Download

Run the following command in terminal or command prompt to clone the repository:

git clone https://github.com/UnityCommunity/UnitySingleton.git

Or🔥 Download the master branch as zip.

Resources

License

MIT @Unity Community

Made with ❤️ byUnity Community

Releases

No releases published

Packages

No packages published

Contributors9

Languages


[8]ページ先頭

©2009-2025 Movatter.jp