Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug content size filter+layout group = size set to 0

Discussion in 'UGUI & TextMesh Pro' started by zabivaka1, May 20, 2024.

  1. zabivaka1

    zabivaka1

    Joined:
    Jun 23, 2020
    Posts:
    2
    my unity version is 2022.3.20, and I have found that this issue also occurs in 2022 3.29.

    upload_2024-5-21_5-12-1.png
    the editor view
    upload_2024-5-21_5-18-32.png
    the game view

    By the way, I made a minimal project attachment to verify the issue. According to the verification, the problem lies in having these two components present on the same game object simultaneously.
     

    Attached Files:

  2. zabivaka1

    zabivaka1

    Joined:
    Jun 23, 2020
    Posts:
    2
    found a resolution:
    LayoutRebuilder.ForceRebuildLayoutImmediate( parentGameObject.GetComponent<RectTransform>());
    well, it's not perfect , but that's all I can do