string Id { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The Id property of the PrefabVariable class represents a unique identifier for the variable. This identifier is used to reference the variable in code, ensuring that each variable can be distinctly identified and accessed programmatically.

Usage

The Id property is marked with the ReadOnly attribute, indicating that it is immutable after its initial assignment. This ensures the integrity of the variable's identity throughout its lifecycle.

To access the Id property, simply use the property accessor on an instance of PrefabVariable:

Example

PrefabVariable myVariable = new PrefabVariable();
string variableId = myVariable.Id;
// Use variableId as needed, e.g., logging or comparison