Hi,
I have simple scene: a small script (see below), a cube, a plan, two cameras and a rendering texture.
UPDATE: Here you can download a small test scene.
In that scene I use the plan as an ingame screen by setting the rendering texture as the target texture of the second camera and using a material with the rendering texture as the plan material.
Then I add my script to the cube.
The script includes only this function:
void OnMouseDown()
{
Debug.Log(gameObject.name);
}
When I start the scene everything looks good. But when I click on the cube, nothing happend. When I deactivate the second camera everything works.
My current camera settings:
Main Camera: tag maincamere, depth -1
second camera: tag untagged, depth 1
When I use the second camera as a normal camera (for displaying other layers etc.), my script works. But when I use a rendering texture as a target texture it doesn’t…
Any ideas?