[email protected]
Topic Author
Posts: 19
Joined: 16 Jan 2019, 23:16

GUI RenderTexture

03 Jul 2021, 02:33

Hello there

I previously asked about Render Texture in the Widget 3D example. For me the difference between this way and the standard way, is that it doesn't take up the entire view of camera and can be put on places, like a wall in this example.

Let's say I want to use it as GUI in a game 1. person game and display the healthbar at some part of the screen. Using the Widget3D example I was thinking just to move the Screen gameobject and attach it to the FPSController object so it moves along with it. It kinda works, but when I move around it doesn't follow the way I intended. I think this is a pretty normal thing to do with Noesis and I have a feeling that this is not the normal way to do it.

What I want to accomplish just the same as in this video you have on youtube: from 33 secs and forward.
In-game GUI attached to the bottom of the screen. I just didn't find any examples of it the code samples. The inventory example just has a normal background picture. I need real Unity 3D stuff as well.

I hope it makes sense :)
 
User avatar
sfernandez
Site Admin
Posts: 2983
Joined: 22 Dec 2011, 19:20

Re: GUI RenderTexture

05 Jul 2021, 10:41

NoesisView component can be used to render in two ways.
  • Render to screen: when you add the component to a camera it renders on top of the screen, it will look attached to the camera. If your UI doesn't have a background you will be able to see your 3D scene rendered by Unity behind.
  • Render to texture: the UI is rendered to a texture you can then use in any 3D object of your scene. This is typically used to show UI in 3D monitors or similar.
Let's say I want to use it as GUI in a game 1. person game and display the healthbar at some part of the screen.
In this case I think you want to attach the NoesisView to a camera and render the UI to the screen, not to texture.
 
[email protected]
Topic Author
Posts: 19
Joined: 16 Jan 2019, 23:16

Re: GUI RenderTexture

06 Jul 2021, 22:09

Thank you :)

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 16 guests