Render Texture - Team-Innis/UtH-Engine GitHub Wiki
RenderTexture is a class used to enable off-screen drawing. When rendering your scene, you can use this class as a render target to render into a texture. After drawing is complete, you can access the texture to be used with a Sprite.
Basic usage
- Construct the
RenderTexture. - Call its
Initializemethod. You'll need to pass in the desired size and whether or not you want a depth buffer. - Pass the
RenderTextureas the target into a game object's/component'sDrawmethod. The object will then be drawn onto the texture. - Fetch the texture reference with
GetTextureand use it with aSpriteor anything else that can use it. - Draw the object into which the texture is bound.