Texture Texture { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Texture property of the VROverlay class represents the texture that is rendered on the overlay quad. This property allows you to specify a Sandbox.Texture that will be displayed on the overlay, providing a visual element that can be used for various purposes such as HUDs or menus in a VR environment.

Usage

To use the Texture property, you need to assign a Sandbox.Texture object to it. This texture will then be rendered on the overlay quad. Ensure that the texture is properly initialized and loaded before assigning it to the property.

Example

// Example of setting a texture to a VROverlay
VROverlay overlay = new VROverlay();
Sandbox.Texture myTexture = new Sandbox.Texture();
// Initialize and load your texture here
overlay.Texture = myTexture;