Page 1 of 1

Button click events when rendering GUI to RenderTexture

Posted: 13 Dec 2017, 00:47
by XaeroDegreaz
Hello,

I have a simple UI that works when drawing to screen, but when I create a Quad, and add the RenderTexture to it and have the NoesisView Camera draw there, my buttons no longer work.

Is there a trick that I need to do to get this to work?

Re: Button click events when rendering GUI to RenderTexture

Posted: 13 Dec 2017, 01:14
by jsantos
Yes, from the Unity Tutorial:

If you want to interact with the GUI rendered in the texture, your GameObject must have a MeshCollider component so texture coordinates can be obtained when doing the hit testing projection.