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

2018 Prefab mode & 9-Sliced UI Images not working?

Discussion in 'Prefabs' started by HereIAmItsMe, Feb 7, 2019.

  1. HereIAmItsMe

    HereIAmItsMe

    Joined:
    Jul 16, 2012
    Posts:
    11
    Trying to edit a prefab that contains a 9-sliced UI image and it does not seem to be displaying correctly in the Scene view when I'm in "Prefab Mode" (new prefab workflow under 2018). Editor version is 2018.3.4f1.

    Is this a known issue or is there something I have wrong in settings?

    Scene view, when in prefab edit mode:


    Game view, which shows 9-slicing correctly:
     
    Deleted User likes this.
  2. Deleted User

    Deleted User

    Guest

    I came here hoping for an answer to the same question
     
  3. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
  4. vexe

    vexe

    Joined:
    May 18, 2013
    Posts:
    644
    After playing around with it a bit, it seems that it works if you set the UI Environment option (under Edit/Project Settings/Editor) to a custom scene that has the correct UICanvas/CanvasScaler/pixels per unit setup etc. If you double click a UI prefab now it should show 9-sliced elements correctly.
     
    Munghard, HereIAmItsMe and lewisjiang like this.
  5. lewisjiang

    lewisjiang

    Joined:
    Sep 18, 2019
    Posts:
    4
    It works!Thank you!