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

Question How to make screen pitch black while the character still moves around normally?

Discussion in 'Scripting' started by lysheamus193, Oct 23, 2022.

  1. lysheamus193

    lysheamus193

    Joined:
    Jan 27, 2022
    Posts:
    2
    I am building a first person game with the main character is blind, is there any way I can make the camera display nothing but black screen while the character is still able to move around in the environment and interact with things?

    tutorial or hints stuff should be display on the black screen normally tho. Thanks in advance.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,456
    Most performant:
    Have an unlit shader with alpha clipping so all objects simply are enabled.

    Simple:
    Have a black canvas covering the screen
     
    orionsyndrome likes this.
  3. orionsyndrome

    orionsyndrome

    Joined:
    May 4, 2014
    Posts:
    3,043
    Basically just a quad with a transparent black shader is all that's needed.
     
    DevDunk likes this.
  4. karliss_coldwild

    karliss_coldwild

    Joined:
    Oct 1, 2020
    Posts:
    530
    Even simpler and better performance solution -> disable the camera or configure the layers in camera "Culling mask" to only render the layers you want to be rendered. Or disable the mesh rendering components if you don't want stuff to be rendered.

    Overlay canvas should still work even with no cameras.
     
    DevDunk likes this.
  5. lysheamus193

    lysheamus193

    Joined:
    Jan 27, 2022
    Posts:
    2
    Thanks guys, will give your suggestions a shot