string Icon { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Icon property of the InspectorHeader class in the Editor namespace is a public instance property that holds the icon representation for the inspector header. This property is of type System.String, which typically represents the path or identifier of the icon image to be displayed in the inspector header.

Usage

To use the Icon property, you can get or set its value to specify the icon that should appear in the inspector header. This can be useful for visually distinguishing different sections or types of data within the editor interface.

Example usage:

var inspectorHeader = new InspectorHeader();
inspectorHeader.Icon = "path/to/icon.png"; // Set the icon
string currentIcon = inspectorHeader.Icon; // Get the current icon path

Example

// Create an instance of InspectorHeader
InspectorHeader inspectorHeader = new InspectorHeader();

// Set the icon for the inspector header
inspectorHeader.Icon = "assets/icons/my_icon.png";

// Retrieve the current icon path
string iconPath = inspectorHeader.Icon;

// Output the icon path
// Note: Avoid using Console.WriteLine in Sandbox
// Instead, use appropriate logging or UI display methods
// Log.Info($"Current Icon Path: {iconPath}");