Description
The Transform
property of the MeshEdge
struct in the Editor.MeshEditor
namespace provides access to the transformation data associated with a specific mesh edge. This property is crucial for understanding the spatial orientation and position of the edge within the mesh.
Note that this property is decorated with the Sandbox.HideAttribute
and System.Text.Json.Serialization.JsonIgnoreAttribute
, indicating that it is hidden from the editor and ignored during JSON serialization.
Usage
To access the Transform
property, you must have an instance of the MeshEdge
struct. This property is read-only and provides the transformation matrix that can be used to manipulate or query the position and orientation of the mesh edge.
Since the property is hidden and ignored in JSON serialization, it is primarily intended for internal use within the mesh editing context and should be accessed programmatically when necessary.
Example
// Assuming 'meshEdge' is an instance of MeshEdge
Transform edgeTransform = meshEdge.Transform;
// Use the Transform to get position, rotation, or scale
Vector3 position = edgeTransform.Position;
Quaternion rotation = edgeTransform.Rotation;
Vector3 scale = edgeTransform.Scale;
// Example of using the Transform to modify the edge
edgeTransform.Position += new Vector3(1, 0, 0); // Move the edge along the X-axis
// Note: Direct modification of Transform may not be supported if the property is read-only.