Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Should each button in a Unity VerticalLayoutGroup be its own canvas?

I think in unity if something like text in a canvas changes the entire canvas is forced to update to recalculate how to display things.

In an idle game a vertical layout group of button upgrades could be changing constantly as currency changes with a MAX purchase upgrade thing enabled. Which is why I am wondering what other unity developers have done in this situation.

If you give every button group its own canvas that would fix the problem of updating an entire group of buttons when only one needs changing but I did a quick extreme test with lots and lots of canvases and eventually there seems to be a point where too many canvases actually slows things down.

Before I've been doing one canvas per upgrade group with only a couple in the list but I am about to implement a group of 28 button upgrades which means 100s of things will need to be updated constantly.

People always say don't worry about performance until a problem exists but I am sure my computer's performance is far superior to some who will play my game like on a mobile browser.

x-posted from /r/incremental_games by /u/gamemaker22

  • All
  • Subscribed
  • Moderated
  • Favorites
  • incremental_games
  • meta
  • All magazines