Vector2 TextureOffset { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The TextureOffset property of the MeshFace class in the Editor.MeshEditor namespace represents the offset of the texture applied to a mesh face. This property is of type Vector2, which means it contains two floating-point values that define the horizontal and vertical shift of the texture.

This property is part of the "Texture State" group and is labeled as "Shift" for better understanding in the context of texture manipulation. The TextureOffset is useful for adjusting the position of the texture on the mesh face, allowing for precise control over how the texture is displayed.

Note that this property is marked with the JsonIgnore attribute, indicating that it will not be serialized when converting the object to JSON format.

Usage

To use the TextureOffset property, you can directly get or set its value on an instance of MeshFace. This allows you to adjust the texture's position on the mesh face.

Example usage:

MeshFace face = new MeshFace();
face.TextureOffset = new Vector2(0.5f, 0.5f); // Shift the texture by 0.5 units horizontally and vertically
Vector2 currentOffset = face.TextureOffset; // Retrieve the current texture offset

Example

MeshFace face = new MeshFace();
face.TextureOffset = new Vector2(0.5f, 0.5f); // Shift the texture by 0.5 units horizontally and vertically
Vector2 currentOffset = face.TextureOffset; // Retrieve the current texture offset