bool AllowGameObjectSelection { get; set; }

robot_2Generated
code_blocksInput

Description

The AllowGameObjectSelection property of the EditorTool class determines whether regular scene object selection is enabled. When set to true, the standard selection behavior for scene objects is applied, allowing users to select game objects within the scene using the editor's selection tools.

Usage

To use the AllowGameObjectSelection property, you can get or set its value to control the selection behavior in the editor. This property is particularly useful when you want to enable or disable the ability to select game objects in the scene based on specific conditions or tool requirements.

Example

// Example of using AllowGameObjectSelection property

// Assuming 'tool' is an instance of EditorTool
EditorTool tool = new EditorTool();

// Enable game object selection
tool.AllowGameObjectSelection = true;

// Check if game object selection is allowed
if (tool.AllowGameObjectSelection)
{
    // Perform actions when selection is enabled
    // e.g., highlight selected objects
}