Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Prefab not grabbing correct Rect Transform Values (Not working)

Discussion in 'Prefabs' started by Timberghost, Mar 14, 2019.

  1. Timberghost

    Timberghost

    Joined:
    Jun 26, 2018
    Posts:
    10
    Hello everyone,

    So i'm stuck a bit on this one, currently i'm working on an inventory system that instantiates a prefab and I have a script set up that will take an objects Scripted objects and apply them to the prefab, and then set that prefab to be a child of the content in a scroll area UI element, the problem is when the object is instantiated the Scale and Rotation Rect Transform elements are not set to what it is in the prefab (over 1000 in the Y Scale)



    in the actual prefab all the values are set properly but these values are never being changed by the script or in any of the components such as Vertical layout or Content Size Filter


    Values of the prefab when instantiated into the UI


    At first it says values are driven by the Vertical Layout Group but i disabled both components on my Content Element and the problem still persists