Search Unity

Prefab with Canvas opens as a nested canvas in prefab edit mode

Discussion in 'Prefabs' started by hk1ll3r, May 3, 2021.

  1. hk1ll3r

    hk1ll3r

    Joined:
    Sep 13, 2018
    Posts:
    71
    I started with a panel and added canvas component to it later. The prefab opens as a nested object under the default scene canvas in prefab edit mode. (Unity 2019.4). How can I make the editor treat the prefab canvas as a root canvas?

    If I create the prefab from a gameobject that has canvas on it, Unity Editor opens the prefab correctly having its canvas as root rather than nesting it under a dummy one.
     
  2. hk1ll3r

    hk1ll3r

    Joined:
    Sep 13, 2018
    Posts:
    71
    I could work around it by unpacking the prefab and saving it as a new prefab. I had to go through my scenes and delete the old object and replace it with the new prefab.
     
unityunity