Search Unity

Forcing refresh of auto navigation?

Discussion in 'UGUI & TextMesh Pro' started by Foxxis, May 11, 2015.

  1. Foxxis

    Foxxis

    Joined:
    Jun 27, 2006
    Posts:
    1,108
    Hi,

    We populate large parts of the UI via code, and it seems as if the Auto Navigation for new elements is not being reset properly when UI parts are being deactivated or moved around. This occurs specifically when no layout groups are present and the canvas is a world space canvas.

    Is there any way to force navigation elements to update their automatic navigation? If not we are forced to set the navigation directions manually, which will be tedious.

    Many thanks in advance!
     
  2. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Unity auto navigation is poor, did u ever find any better way?
     
  3. viesc123

    viesc123

    Joined:
    Dec 17, 2016
    Posts:
    12
    Ok, this post is really old, but maybe this might help others:

    Have you tried
    Code (CSharp):
    1. LayoutRebuilder.ForceRebuildLayoutImmediate(rootRectTransform);
     
    radiantboy likes this.