Search Unity

Stop ScrollView Content rect from overriding prefab?

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

  1. Zarkow

    Zarkow

    Joined:
    Jul 27, 2015
    Posts:
    92
    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
  2. Simpowitch

    Simpowitch

    Joined:
    Nov 13, 2018
    Posts:
    14
    Jesus, still no answer. I run into this almost daily trying to work with Unity UI. Don't have any solution, but will gladly push this post up, maybe someone else has any ideas.