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.
Unity3D Managers vs Controllers:
Files are available here:
Download this project:
Any questions/comments? Join us on discord:
Posted using eSteem Surfer