- Home /
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?
               Comment
              
 
               
              Answer by Kiwasi · Nov 30, 2014 at 07:03 AM
This all happens at run time. It works fine in editor but adding them programmatically at run time doesn't work
Answer by zge · Aug 31, 2015 at 04:35 AM
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();
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                