bool Selected

robot_2Generated
code_blocksInput

Description

The Selected field is a public instance field of type System.Boolean within the Editor.VirtualWidget class. It indicates whether the virtual widget is currently selected.

Usage

Use the Selected field to check if a VirtualWidget instance is selected or to set its selection state. This can be useful for UI interactions where selection state needs to be tracked or modified.

Example

// Example of using the Selected field

// Create an instance of VirtualWidget
VirtualWidget widget = new VirtualWidget();

// Check if the widget is selected
if (widget.Selected)
{
    // Perform actions when the widget is selected
    // e.g., highlight the widget
}

// Set the widget as selected
widget.Selected = true;

// Later, you can deselect the widget
widget.Selected = false;