Author Topic: Scroll View with prefab items are resetting back to original position  (Read 4314 times)

miyudreams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
I have created a UIPanel with clipping set to SoftClip. I was following the Scroll View (Clipped Panel) tutorial, http://www.tasharen.com/?page_id=4444

In my UIGrid, I added prefabs. When I moved my prefabs, and press Play, the prefabs go back to the original position. Anyone know what I have done wrong?

Here is a screenshot of my moved prefab, so one of them is not more right aligned on the screen.


When I play the game, the prefab moves back to the left side.


Here are the properties in my Clipped Panel:


Here is the Outline containing the UIDragPanelContents and the attached Collider:


I tried moving the Items in the provided example scene, "Example 7 - Scroll View (Panel), hit Play, and those Items stayed in the new positions. I decided to "Break Prefab Instance", attached a collider, and added a UI Drag Panel Contents, but still no luck in keeping the changed position.



Thanks for any help.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Your Grid component forcefully resets all children positions each time it's started.

miyudreams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Your Grid component forcefully resets all children positions each time it's started.

How do I stop the Grid component from forcefully resetting children positions? Is there some property I need to set?

Thank you

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Disable it.