Search Unity

RenderTexture on RawImage

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

  1. z_bulon

    z_bulon

    Joined:
    Oct 7, 2018
    Posts:
    8
    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:
    8
    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.
     
    tigerss and DerrickMoore like this.
  3. LilGames

    LilGames

    Joined:
    Mar 30, 2015
    Posts:
    189
    Shouldn't your texture color be set to white?