0

I'm making a UI for my Unity3D game and am activating/deactivating UI components in order to display or hide them, which works but is slow. The first time a UI component is activated, it is particularly slower than thereafter. Is there a best practice as to how UI should be hidden/displayed?

daniel metlitski
  • 747
  • 3
  • 11
  • 23

2 Answers2

3

Try disabling canvas renderer. It should be a lot less stressing on the CPU than using GameObject.SetActive() if you have nested panels and what not.

Augure
  • 360
  • 3
  • 13
0

You can use the Sprite Mask. Although the areas of use of the Sprite Mask are wide, it is generally used to hide unwanted parts of an image.