Force UI update

Hi. I’ve been playing around with the new 4.6 UI system. At the moment I’m adding a bunch of cells I want in a grid. The Grid Layout Group works well but I need to force it to update by toggling it in the editor. Is there a way to force it to update in code?

Use ExecuteInEditMode

I was stuck on the same thing. Eventually I checked out the code for Text.cs and found this:

    // this is a bit hacky, but it is currently the
    // cleanest solution....
    // if we detect the font texture has changed and are in a rebuild loop
    // we just regenerate the verts for the new UV's
    if (CanvasUpdateRegistry.IsRebuildingGraphics() || CanvasUpdateRegistry.IsRebuildingLayout())
        UpdateGeometry();