Search Unity

Question Best performance for UI Grid, need help/ideas

Discussion in 'UGUI & TextMesh Pro' started by Neoletum, Mar 29, 2023.

  1. Neoletum

    Neoletum

    Joined:
    Aug 19, 2017
    Posts:
    6
    Hey, I wanted to create a grid with tiles in it, easiest solution:
    Gameobject with Grid Layout Group and put empty images in it, but this is quite expensive, or?
    Having like 100x100 empty images in a grid.
    Next step is I want to draw a line into the canvas of the grid, so the tile in the grid that is touched by the line changes color to red (I know how to do it I guess, just wanted to show what I need the grid for).

    I hope someone can help with a good UI Grid idea!

    example.png
     
  2. AndyBarnard

    AndyBarnard

    Unity Technologies

    Joined:
    Nov 12, 2019
    Posts:
    14
    I'd advise to try what you identified as the easiest solution first. If you discover it is not sufficient for your performance requirements (don't forget to always test on your target hardware :)) then you can try alternate approaches, like using a single quad and shading intersected regions for example.