@Roundbeargames
  @Roundbeargames
Roundbeargames | Singletons & Managers in Unity - Tutorial by Roundbeargames @Roundbeargames | Uploaded November 2019 | Updated October 2024, 1 hour ago.
Singletons & Managers in Unity
Tutorial by Roundbeargames

Usually the use of singletons is not recommended, but for a simple indie game, it might be ok as long as you don't overdo it.

Personally, I like to use singletons to hold a list of a group of objects:
- Character Manager for example, has the list of all the characters in the scene
- Virtual Input Manager has all the public variables for possible presses like up, down, left, right, etc).

From any class, you can access the Character Manager by using "CharacterManager.Instance" or the Virtual Input Manager through "VirtualInputManager.Instance". You don't have to worry about instantiating a manager class. It's done automatically the first time you call the public method.

Singletons:
en.wikipedia.org/wiki/Singleton_pattern

Static variables:
en.wikipedia.org/wiki/Static_variable

Unity3D Managers vs Controllers:
youtu.be/T39tyyQjFSQ

C# Generics:
youtu.be/5ds30gSotPc

Files are available here:
drive.google.com/drive/folders/17Lfpa5r-3zeR1jaT0eJ4nqIR3pkU9ABE?usp=sharing

Download this project:
github.com/RoundBearChoi/2.5D_Platformer_Unity

Tutorial playlist:
youtube.com/playlist?list=PLWYGofN_jX5BupV2xLjU1HUvujl_yDIN6

Any questions/comments? Join us on discord:
discord.gg/hAFTgcA

Social
twitter: twitter.com/roundbeargames
facebook: facebook.com/roundbeargames17
hive: peakd.com/@roundbeargames/posts
reddit: reddit.com/user/roundbeargames
linkedin: linkedin.com/in/jangwon-choi-roundbeargames

Patreon:
patreon.com/roundbeargames

Channel Memberships:
youtube.com/roundbeargames/join

#gamedev #indiegame #unitytutorial #devlog
Singletons & Managers in Unity - Tutorial by RoundbeargamesFPS Devlog - Trying Out HDRPRoot Motion Explained - Unity Tutorial[C++ Tutorial #4] Structs and Functions - GameDevHow to Download My Project (Older Versions - #21 package)Roundbearsits - Code With Me #5[C++ Tutorial #9] While Loops, Input, Game Loop[C++ Tutorial #1] Thinking in 1s and 0s - Game DevelopmentRendering with Decals - Using olcPixelGameEngineCharacter Falling Through Issue - Unity TutorialSample Scene - Texture Packer for Unity[C++ Tutorial #12] Try Making Your First Game

Singletons & Managers in Unity - Tutorial by Roundbeargames @Roundbeargames

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER