We are here again with our latest curated Unity Tips and Tricks from Twitter. Every Tuesday we collect five (or more) #unitytips post from Twitter. Feel free to check our previous posts too!
Before we start, click on the link below to follow us on Twitter!
If you want to set value for your healthbar and want to avoid singleton you can use ScriptableObjects #unitytips (view it in fullscreen :P). They are like middleman Player.cs > ScriptableObject > UIController, SoundController, Animations and more. Events are included too 🙂 pic.twitter.com/ro2wDWuCf0— MaZy (@bilosaurus) September 17, 2019
You want the GameObject to pop up in hierachy you have written a message for with Debug.Log, Debug.LogWarning or Debug.LogError?— Michael Huber (@Hubertsn) September 10, 2019
Use the second parameter like
Debug.LogError("Oh no I have broken the game! Time to hide", gameObject)#UnityTip pic.twitter.com/feJptsdTqG