void OnUpdate()

book_4_sparkGenerated
code_blocksInput

Description

The OnUpdate method is a virtual method in the PositionTool class, which is part of the Editor.MeshEditor namespace. This method is responsible for handling updates to the position tool during the editor's update cycle. It is called every frame when the tool is active, allowing for real-time updates and interactions with the mesh elements being manipulated.

Usage

To use the OnUpdate method, ensure that the PositionTool is active within the editor. This method is automatically invoked as part of the editor's update loop, so no direct calls are necessary. You can override this method in a derived class to implement custom update logic for the position tool.

Example

public class CustomPositionTool : Editor.MeshEditor.PositionTool
{
    public override void OnUpdate()
    {
        // Custom update logic for the position tool
        // For example, implement custom snapping or movement constraints
    }
}