Search Unity

Unity deforms every prefab that I create

Discussion in 'Prefabs' started by Codoet, Jun 22, 2019.

  1. Codoet

    Codoet

    Joined:
    Jun 22, 2019
    Posts:
    1
    I have problem with Unity prefabs. Every time I create a nice looking UI in main scene and I want to store it as prefab for later usage if I open this prefab it's deformed(random cliping, moved UI elements in different directions, ... such a mess). If I try to fix this prefab in prefab editor to make it nice looking like before and then if I insert this back to scene it's totally unusable. It creates bigger mess than before in prefab editor... I don't know what to do. Editor throws no errors btw.

    In first image is nice looking UI(example already created). In 2nd image is prefab editor. Text is totally out of panel and 3rd is from back in scene (means removed old one UI and place stored prefab from folder) the panel is gone.

    Imgur - images are orded by scene to prefab editor and back to scene

    On those images you can see a 3 elements... but if I make more complex UI, it's clipping through each other in prefab editor and also back in scene.

    Unity version: 2019.1.7f1
     
  2. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,305
    Try selecting the prefab in the scene, and in the top-right corner of inspector, choose Overrides > Revert All.

    The width and height of prefabs are not stored, because you might need different sizes in the scene. So, in the prefab editor, you are only seeing a temporary default size.
     
  3. runevision

    runevision

    Unity Technologies

    Joined:
    Nov 28, 2007
    Posts:
    1,598
    Can't really say what's going wrong based on these images. A video showing things from start to finish, with both Scene view, Hierarchy and Inspector visible might give more of a clue.