Log in or register to post comments

Custom Render Texture error

August 24, 2020 - 5:27am #1

I'm trying to set the texture of my Custom Render Texture (called renderTextureDebug) to my RenderCamera.targetTexture, which is one of the cameras I have active on my project, and show it on a GUI image.

It works fine on my computer when I run aol login on the Unity Editor, but the moment I run it on my Android device the texture appears to be black. Any Ideas about why this is happening?

CustomRenderTexture renderTextureDebug;

void Start ()

{

    renderTextureDebug = (CustomRenderTexture) debugObject.GetComponent<RawImage>().texture;

}

.

.

.

//Function that is not working

public void UpdateVideoTextureDebug()

{

    renderTextureDebug.material.SetTexture("_Tex", RenderCamera.targetTexture);

    renderTextureDebug.Update();

}

Log in or register to post comments