struct MAGES::Utilities::GizmoUtilities::GizmoDrawingScope¶
Overview¶
An automatically disposed gizmo drawing scope. More…
struct GizmoDrawingScope: public IDisposable { // properties Color OriginalColor; Matrix4x4 OriginalMatrix; // methods GizmoDrawingScope(Color color); GizmoDrawingScope(Matrix4x4 matrix); GizmoDrawingScope(Color color, Matrix4x4 matrix); void Dispose(); };
Detailed Documentation¶
An automatically disposed gizmo drawing scope.
Properties¶
Color OriginalColor
Gets the value of Gizmos.color at the time this DrawingScope was created.
Matrix4x4 OriginalMatrix
Gets the matrix of Gizmos.matrix at the time this DrawingScope was created.
Methods¶
GizmoDrawingScope(Color color)
Initializes a new instance of the GizmoDrawingScope struct and set Gizmos.color to the specified value.
Parameters:
color |
The color to use for displaying Gizmos inside the scope block. |
GizmoDrawingScope(Matrix4x4 matrix)
Initializes a new instance of the GizmoDrawingScope struct and set Gizmos.matrix to the specified value.
Parameters:
matrix |
The matrix to use for displaying Gizmos inside the scope block. |
GizmoDrawingScope(Color color, Matrix4x4 matrix)
Initializes a new instance of the GizmoDrawingScope struct and set Gizmos.color and Gizmos.matrix to the specified values.
Parameters:
color |
The color to use for displaying Gizmos inside the scope block. |
matrix |
The matrix to use for displaying Gizmos inside the scope block. |
void Dispose()
Automatically reverts Gizmos.color and Gizmos.matrix to their values prior to entering the scope, when the scope is exited. You do not need to call this method manually.