Search Unity

Handles (specifically lines) without the IMGUIContainer?

Discussion in 'UIElements' started by MartinIsla, Dec 19, 2018.

  1. MartinIsla

    MartinIsla

    Joined:
    Sep 18, 2013
    Posts:
    64
    Good morning!

    I wanted to know if there was a way to use Handles.DrawLine (or something similar) without using an IMGUIContainer.

    Thanks!
     
    joshcamas likes this.
  2. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    788
    This is something really important in my opinion! :))
     
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    226
    We don't yet have Handles support native to UIElements. However, you can draw arbitrary meshes using the ImmediateModeElement and its DoRepaint() override. This is using raw GL calls. It's how GraphView implements its node edges, for example.