Search Unity

Reuse UI in LOD Widget

Discussion in 'Immediate Mode GUI (IMGUI)' started by mat_muze, Mar 21, 2015.

  1. mat_muze

    mat_muze

    Joined:
    Mar 17, 2015
    Posts:
    31
    Hi there,

    I found out today that Unity has a nice widget for arragning the different LOD levels in the widget "LOD Group".

    Do you guys know if it is possible to reuse the UI code of this widget for other purposes ?

    In advance, thank you.
    Mat.
     

    Attached Files:

  2. BMayne

    BMayne

    Joined:
    Aug 4, 2014
    Posts:
    186
    Hey there,

    The class that draws that Editor is LODGroupEditor and is an internal class in the UnityEditor namespace. You are not able to get access to it (unless you use reflection, but that's a bad idea). It's also specifically designed to only work with LODGroup so it would not be much use to you.
     
  3. mat_muze

    mat_muze

    Joined:
    Mar 17, 2015
    Posts:
    31
    I meant to reuse the only part that allows you to add new levels and also resize the importance of each level graphically.

    That only part only, I would like to reuse. And since I have seen it in other places in the editor I thought maybe there is a way to get my hands on that nice little UI widget that could be very useful for other purposes too.