0

I am trying to create a chat and it works ok except when there are more posts than can fit in the view. So when I open the scrollview it always start at the top, but the latest chat is at the bottom and I should be starting there. I have the same problem when I add an post it instantiates below my viewport?!? How do I solve this?

I am trying to do so with a SpringPanel but am having a hard time figuring out what to put into it?

SpringPanel mySpringPanel.Begin(GameObject go, Vector3 pos, float strength)

I know the strength and the Vector3 should be something like(0,MyLatsObject,0) but what is the gameobject and again... How do I figure out the Vector3?

Hope this makes sense and any help is appreciated.

Thanks in advance :-)

Mansa
  • 2,277
  • 10
  • 37
  • 67

1 Answers1

0

You need to use the CentreOnChild script. With it you can call UICenterOnChild.CenterOn(Transform target) to centre the scrollview on the gameObject you want.

Dover8
  • 607
  • 3
  • 17