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. Dismiss Notice

Bug Camera for UI

Discussion in 'Scripting' started by dytrychrafal, Jan 8, 2021.

  1. dytrychrafal

    dytrychrafal

    Joined:
    Sep 6, 2020
    Posts:
    32
    Hello,
    I got camera setted up for 1 layer mask >> "InGameUI" and the problem i got is i can't see my in game ui (with is simple nick/ hp bar) till i change something in inspector like ortographic size for another number and than back to old number or projection type to perspective and back to ortographic and if i change it via script and coroutine after 1 second it doesn't fix my problem - cannot see those in game ui's. What am i doing wrong?

     
  2. payalzariya07

    payalzariya07

    Joined:
    Oct 5, 2018
    Posts:
    85
    Are you set layer mask in canvas?
     
  3. dytrychrafal

    dytrychrafal

    Joined:
    Sep 6, 2020
    Posts:
    32
    Yes i did.
     
  4. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    Did you use multicamera? (One to render 3D and one to render UI)
     
  5. dytrychrafal

    dytrychrafal

    Joined:
    Sep 6, 2020
    Posts:
    32
    It's first time when i'm using another camera to render UI.
     
  6. dytrychrafal

    dytrychrafal

    Joined:
    Sep 6, 2020
    Posts:
    32
    Ok i fixed. Just had to add my camera to MainCamera Stack.
     
    Alexis-Dev likes this.
  7. Alexis-Dev

    Alexis-Dev

    Joined:
    Apr 16, 2019
    Posts:
    121
    It's was the solution I will suggest.

    Great! ;)