Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020.2 has been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Stop ScrollView Content rect from overriding prefab?

Discussion in 'UGUI & TextMesh Pro' started by Zarkow, Jan 7, 2019.

  1. Zarkow


    Jul 27, 2015
    I have a UI defined and made into a Prefab.

    As part of this overlay UI with character and game-info I have a pretty standard 'Scroll View' area, where I show basically the log of activities (as many RPG's do) of the characters.

    I have not changed the hierarchy one get from doing RMB->UI->Scroll View, all very standard.

    I then use the UI prefab in a scene.

    On the first run the content of the area (pre-populated by default value and/or test-values at startup) and showing the last line (i.e. scrolled all the way down) just like I want it.
    When I exit the Player in the editor, the third hierarchy-item 'Content' has its Y-value changed from defined -100, to -340 (scrolled all the way up). This value is overriding the prefab value. It is then kept when I launch the game in the Player in the Editor again. This is *not* the expected behavior.

    Is there any I can prevent these basic components from setting new values on their own, i.e. when exiting the Play mode, and thereby overriding the Prefab and ignoring it for any future runs?

    Edit: using 2018.3.0f2 (Plus user)
    Last edited: Jan 7, 2019