Description
The OnFrameTo
property in the SceneEditorSession
class is an event handler that allows you to define a custom action to be executed when the scene editor frames to a specific bounding box (BBox
). This property is of type System.Action<BBox>
, meaning it takes a BBox
as a parameter and returns no value.
Usage
To use the OnFrameTo
property, you can assign a delegate or lambda expression that matches the System.Action<BBox>
signature. This delegate will be invoked whenever the scene editor needs to frame to a specific bounding box.
For example, you might use this to perform additional operations or logging whenever the editor frames to a new area in the scene.
Example
// Example of setting the OnFrameTo property
SceneEditorSession session = new SceneEditorSession();
// Define a custom action to be executed when framing to a bounding box
session.OnFrameTo = (bbox) =>
{
// Custom logic here
// For example, log the bounding box dimensions
Log.Info($"Framing to BBox: {bbox}");
};
// Later in the code, when the editor frames to a bounding box, the above action will be executed.