Singletons & Managers - Unity Tutorial by Roundbeargames

26일 전


Singletons Explained
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.


Static variables:

Unity3D Managers vs Controllers:

C# Generics:

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  trending

Thanks for using eSteem!
Your post has been voted as a part of eSteem encouragement program. Keep up the good work! Install Android, iOS Mobile app or Windows, Mac, Linux Surfer app, if you haven't already!
Learn more:
Join our discord:

This post has received a 3.13 % upvote from @drotto thanks to: @sbi-booster.


Posted using Partiko Android


오오오오오 드디어 비어토큰 다시 정상영업 ㅋㅋ

Posted using Partiko Android

!shop 💙

Posted using Partiko Android

Hey @roundbeargames, here is a little bit of BEER from @bluengel for you. Enjoy it!

Hi~ roundbeargames!
@bluengel has gifted you 1 SHOP!

Currently you have: 7 SHOP

View or Exchange SHOP Please go to

Are you bored? Play Rock,Paper,Scissors game with me!


Posted using Partiko Android


You win!!!! 你赢了! 给你1枚SHOP币!

항상 행복한 💙 오늘 보내셔용~^^

Posted using Partiko Android


엔젤님 오늘도 고생많으십니다 😃
요즘 쌀쌀한데 건강 잘 챙기셔요~ ^ㅅ^