Search Unity

Pixel perfect UI elements without game objects

Discussion in 'Editor & General Support' started by Rob4, Sep 8, 2021.

  1. Rob4

    Rob4

    Joined:
    Aug 4, 2017
    Posts:
    8
    I am building an RTS game and am trying to implement some method for drawing circles for selected units on the UI.
    At the moment i am using the OnGUI() function and the GUI.DrawTexture() function and it works.
    However, i want it to be pixel perfect and really don't know where to start. I didn't really find something usefull with google.
    I also tried using Graphics.DrawMesh() but i really didn't understand how you scale the texture and mesh properly.
    The criteria are just that it's leightweight, pixel perfect, and if possible to avoid the DOTS... although maybe that really would be the best solution? i don't know.
     
unityunity