Search Unity

Unity UI How to make scrollbar remain bottom after children list poped up?

Discussion in 'UGUI & TextMesh Pro' started by leegod, May 23, 2017.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    So I made text message record UI, using scrollrect and generate text prefab when new text appears.

    Now I want to its scrollbar remains at bottom when last message generated, so I set like,

    MsgScrollBar.value = 0;

    after msg instantiating.

    But this result in scrollbar's y position slightly up like 0.04, not exact 0, so the last generated text is not shown, I need to forcibly scroll down 1 line.

    How to make it always show bottom last generated children text?