Description
The Transform
property of the MeshFace
struct in the Editor.MeshEditor
namespace provides access to the transformation data associated with a mesh face. This includes position, rotation, and scale information that defines how the mesh face is oriented and positioned in the 3D space.
This property is marked with the Sandbox.HideAttribute
and System.Text.Json.Serialization.JsonIgnoreAttribute
, indicating that it is hidden from certain UI elements and ignored during JSON serialization.
Usage
Use the Transform
property to get or set the transformation data of a mesh face. This can be useful when you need to manipulate the position, rotation, or scale of a face within a mesh editor context.
Note that due to the Sandbox.HideAttribute
, this property might not be visible in some editor interfaces, and the JsonIgnoreAttribute
means it will not be serialized to JSON.
Example
// Assuming you have an instance of MeshFace
MeshFace meshFace = ...;
// Accessing the Transform property
Transform faceTransform = meshFace.Transform;
// Modifying the Transform
faceTransform.Position += new Vector3(1, 0, 0); // Move the face along the X-axis
meshFace.Transform = faceTransform;