Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Show model above UI Elements

Discussion in 'UGUI & TextMesh Pro' started by siddharth3322, Oct 4, 2015.

  1. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    I want to show my model above UI Image element. At present I am getting this, following image gives you more idea about my problem.

    Screen Shot 2015-10-04 at 8.40.10 pm.png


    What to do in this situation?
     
  2. NeilM0

    NeilM0

    Joined:
    Mar 31, 2009
    Posts:
    135
    If you want your UI to show above your 3D models, your canvas needs to be set to Screen Space Camera. Then you can adjust how it layers.
     
  3. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,042
    I want my 3D layer show above UI layer. Any suggestion?
     
  4. NeilM0

    NeilM0

    Joined:
    Mar 31, 2009
    Posts:
    135
    Either set the canvas to be in the world, then you can just place it in your scene.

    Or if you want to have your UI use Screen Space Camera you're going to have to render the background in one camera, then the UI in "Screen Space Camera". And finally have another camera that renders the car, and doesn't clear the back buffer, so that the other two layers show through. Put the Car on a custom Car layer, and the background in Default. Then set the foreground camera's culling options to only render the Car layer.

    Background - Default Layer - Camera Main Culling Everything except Car and UI
    UI
    Foreground 3D models - Car layer - Camera 2 Culling Only Car