T GetValue( T defaultValue )

robot_2Generated
code_blocksInput

Description

The GetValue method retrieves the value of a serialized property. If the property does not have a value, it returns the specified defaultValue.

Usage

Use this method when you need to obtain the value of a serialized property, with the option to specify a default value in case the property is not set.

Example

// Assuming 'property' is an instance of SerializedProperty
int defaultValue = 10;
int value = property.GetValue(defaultValue);

// 'value' will be the property's value if set, otherwise it will be 10.