Search Unity

Can't rearrange array elements in a custom inspector.

Discussion in 'Immediate Mode GUI (IMGUI)' started by Drazil, Aug 20, 2014.

  1. Drazil

    Drazil

    Joined:
    Sep 9, 2013
    Posts:
    22
    I am currently working with a friend on a script that generates a gradient into a skybox (example). The interface for it is messy and i wanted to try drawing a custom inspector that could display it cleaner and add functions I couldn't have before. What I currently have is a array of a class that contains a color a curve and a stop point. What I want to do is whenever I adjust one of the stop points to before another have it sort the array automaticly. Now I actually can get it to sort the array but it doesn't display the changes unless I close the foldout and reopen it.

    Is there a ray to get it to refresh the interface?
     
  2. joa-baur

    joa-baur

    Joined:
    May 14, 2013
    Posts:
    24