#unitytips Did you know that Camera.main calls Object.FindObjectWithTag(„MainCamera“) ? And will do every time you use Camera.main!
Better cache your Camera and avoid Camera.main. Or make a public variable ( Camera cam ) to use in your scripts!#optimization #gamedev #indiedev pic.twitter.com/gLhYTuo4u0
— Binary Impact (@BinaryImpactG) January 12, 2021