Search Unity

case 1082304 - Prefab variant not overrides root RectTransform settings

Discussion in 'Prefabs' started by iperov, Sep 18, 2018.

  1. iperov

    iperov

    Joined:
    Dec 13, 2015
    Posts:
    36
    - open project
    - select "UIWindowBase Variant" in inspector and enter to it prefab mode
    - in RectTransform, change "middle-center" anchors to "stretch-stretch" anchors
    - we can see no RectTransform overrides in "Overrides" menu
    - exit from prefab mode to scene
    - we can see no applied "stretch-stretch" anchors in "UIWindowBase Variant" instance.

    This is very important bug, because I cannot create my new UI system based on nested prefabs.
    Please fix it.


    vid: https://i.imgur.com/onOwBAL.mp4
     

    Attached Files:

  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
  3. iperov

    iperov

    Joined:
    Dec 13, 2015
    Posts:
    36
    why not to improve it?
    This is very important in order to create flexible ui based on new prefab system
    For example
    UIWindowBase -> UICaptionWindow -> UILoginWindow (or hundreds of windows derived from UICaptionWindow)
    each has its own prefab and independent content.
    If I want change something in UICaptionWindow (base of hundreds windows) in future, I just change its prefab.
    But base prefabs UIWindowBase and UICaptionWindow has default RectTransform settings,
    and derived windows such as UILoginWindow has its own specific settings.
     
  4. iperov

    iperov

    Joined:
    Dec 13, 2015
    Posts:
    36
    I found way to fix it.

    As you can see, derived window RectTransform has different width/height.
    Unity_2018-09-18_20-30-00.jpg Unity_2018-09-18_20-30-17.jpg

    drawback: this settings saved only once when creating prefab variant and cannot be changed in prefab mode.
     
    Last edited: Sep 18, 2018
    LeonhardP likes this.
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    This is not a limitation of the new system specifically. The same thing was there in the old system. The team is aware of this and has noted it down as something to look into for later releases. It won't be a trivial change so it's not something that can be implemented during this beta cycle.
     
    optimise likes this.