DebugOverlaySystem DebugOverlay { get; set; }

robot_2Generated
code_blocksInput

Description

The DebugOverlay property of a GameObject provides access to the DebugOverlaySystem, which allows for the drawing of temporary debug shapes and text within the scene. This can be useful for visualizing data or debugging the spatial relationships of objects in the game world.

Usage

To use the DebugOverlay property, you can access it directly from a GameObject instance. This property is not static, so it must be accessed through an instance of GameObject. Once accessed, you can use the methods provided by the DebugOverlaySystem to draw shapes or text for debugging purposes.

Example

// Example of using DebugOverlay to draw a line in the scene
GameObject myObject = new GameObject();
myObject.DebugOverlay.DrawLine(Vector3.Zero, new Vector3(10, 0, 0), Color.Red, 0.1f);