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.
Singletons:
https://en.wikipedia.org/wiki/Singleton_pattern
Static variables:
https://en.wikipedia.org/wiki/Static_variable
Unity3D Managers vs Controllers:
C# Generics:
Files are available here:
https://drive.google.com/drive/folders/17Lfpa5r-3zeR1jaT0eJ4nqIR3pkU9ABE?usp=sharing
Download this project:
https://github.com/RoundBearChoi/2.5D_Platformer_Unity
Tutorial playlist:
https://www.youtube.com/playlist?list=PLWYGofN_jX5BupV2xLjU1HUvujl_yDIN6
Any questions/comments? Join us on discord:
https://discord.gg/RbxjBu3
Social
twitter: https://twitter.com/roundbeargames
facebook: https://facebook.com/roundbeargames17
steem: https://steemit.com/@roundbeargames
reddit: https://reddit.com/user/roundbeargames
linkedin: https://linkedin.com/in/roundbeargames-choi-15041a9a
Patreon:
https://patreon.com/roundbeargames
Posted using eSteem Surfer











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: https://esteem.app
Join our discord: https://discord.gg/8eHupPq
This post has received a 3.13 % upvote from @drotto thanks to: @sbi-booster.
!BEER
Posted using Partiko Android
오오오오오 드디어 비어토큰 다시 정상영업 ㅋㅋ
Posted using Partiko Android
!shop 💙
Posted using Partiko Android
View or trade
BEER.Hey @roundbeargames, here is a little bit of
BEERfrom @bluengel for you. Enjoy it!Hi~ roundbeargames!

@bluengel has gifted you 1 SHOP!
Currently you have: 7 SHOP
View or Exchange
Are you bored? Play Rock,Paper,Scissors game with me!SHOPPlease go to steem-engine.com.Rock
Posted using Partiko Android
You win!!!! 你赢了! 给你1枚SHOP币!
항상 행복한 💙 오늘 보내셔용~^^
Posted using Partiko Android
엔젤님 오늘도 고생많으십니다 😃
요즘 쌀쌀한데 건강 잘 챙기셔요~ ^ㅅ^