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

RenderTexture on RawImage

Discussion in 'Getting Started' started by z_bulon, Oct 19, 2018.

  1. z_bulon

    z_bulon

    Joined:
    Oct 7, 2018
    Posts:
    9
    Hi,

    I'd like to show a RenderTexture in a RawImage. In the preview window of RawImage (Bottom Right) there is a green cross rendered, but in the Game view on the Canvas it is just displayed as a black box.
    What can be wrong?

    upload_2018-10-19_9-58-45.png
     
  2. z_bulon

    z_bulon

    Joined:
    Oct 7, 2018
    Posts:
    9
    This issue is solved by using a material with the Unlit/Texture shader for the RawImage.
    Now I cannot achieve transparent texture background. I played with the alpha of RawImage's color and the texture renderer camera's solid background color, but it didn't help.
     
  3. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    565
    Shouldn't your texture color be set to white?
     
    Joe-Censored likes this.
  4. danish115

    danish115

    Joined:
    Aug 28, 2014
    Posts:
    47
    set camera to solid colour and set value of alpha zero of camera's colour.