Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on Thursday, June 8, for a Q&A with Unity's Content Pipeline group here on the forum, and on the Unity Discord, and discuss topics around Content Build, Import Workflows, Asset Database, and Addressables!
    Dismiss Notice

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:
    13
    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.