Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: beermoney on August 11, 2014, 10:11:57 AM
-
Hi,
I have a scrollview that is ancorhed to the UI root. I find that the content origin is not updating when I change the screen width/height. Content origin only updates the transform of the scrollview when the user changes it in the editor.
See attached scene/project for example.
Thanks
-
Why don't you just Child the scroll view to an empty and write a simple script to move the parent emptys' transform around
when events happen?
Thats what I would do. Then just change scroll view's .localPosition(Vector3 pos) when you want to change its' origin.
-
May end up having to make a work around for this but it really is a bug in NGUI. If there's an option to set the contents origin then that should just work. Note that when playing, if the user drags the contents of the scrollview it then will set the contents origin to where it should be.
-
Anchors don't interact with the content origin. If you add a scroll bar there, it will reset it for you though.