Method GetPayload
GetPayload<T>(int)
Retrieves a reference to a payload stored in the runtime asset.
Declaration
public ref T GetPayload<T>(int payload) where T : struct
Parameters
Type | Name | Description |
---|---|---|
int | payload | Identifies the payload that should be retrieved. |
Returns
Type | Description |
---|---|
T | Reference to the payload that corresponds to the index passed as argument. |
Type Parameters
Name | Description |
---|---|
T |
GetPayload<T>(TraitIndex)
Retrieves the associated payload (i.e. the instance of the user-defined value) for a given trait index.
Declaration
public ref T GetPayload<T>(Binary.TraitIndex traitIndex) where T : struct
Parameters
Type | Name | Description |
---|---|---|
Binary.TraitIndex | traitIndex | The trait index for which the corresponding payload is to be retrieved. |
Returns
Type | Description |
---|---|
T | Reference to the user-defined value that corresponds to the trait index passed as argument. |
Type Parameters
Name | Description |
---|---|
T |