Every Tuesday we collect the best #unitytips from twitter for you!
(Cover image is from our POLYBeach asset)
#unitytips So UnityEvent<T> can bind to methods of course. But it's a complete surprise to me that it can bind to properties finally! At least in Unity2019.1 it can. #gamedev #unity3d pic.twitter.com/MSHhWiRclJ
— Shane Celis (@shanecelis) July 29, 2019
Sometimes when you want to change a gameobject's layer via script to the value you set in the editor, can get a bit confusing. This does it:
— Aidin 🎮🕹 (@AidinZolghadr) July 28, 2019
LayerMask mask = LayerMask.NameToLayer("MyMask");
object.layer = Mathf.RoundToInt(Mathf.Log(mask.value, 2);#unitytips
At first, we tried to disolve each material of the scene (about 400 instances). It wasn't optimized at all, so we decided to render the scene on a plane and disolve it (1 instance). #unitytips #MadeWithUnity #Optimization. Art by @Pilou_Mabire @Gerickos @FrostGunn pic.twitter.com/h5fARcqKDS
— Lucas Ferrantelli (@LucasFerrantell) July 28, 2019
Expand the all parents/children trees in hierarchy panel #unity #unitytips #gamedev #indiedev #unity3d pic.twitter.com/6P66rJbpZb
— Levent EREN (@leventeren) July 27, 2019
Unity supports C# 7, So you can return multiple values from a function with tuple and tuple literals. #unitytips pic.twitter.com/Hrw3IiEkCy
— Mohamad Iraji (@M_Iraji) July 27, 2019