Next: GetBuiltinVariableIndex - AurieFramework/YYToolkit GitHub Wiki
Retrieves the index for an instance built-in or global built-in variable.
Syntax
AurieStatus GetBuiltinVariableIndex(
[in] std::string_view Name,
[out] size_t& Index
);
Parameters
Name
The name of the built-in to look up.
[!IMPORTANT] Using this function, you can get the index of either a local built-in (such as
id
,image_index
, etc.), or a global built-in (such asroom
,instance_count
, etc.).A global built-in variable IS NOT the same as a regular global variable, and cannot be treated as such - to look up a global variable, use the
variable_global_get
built-in function, or the GetInstanceMember function together with the global instance obtained from GetGlobalInstance.
Index
A reference to a buffer, into which the index of the variable is written. This buffer is guaranteed to remain unchanged if the function fails. To access built-in variables via this index, use the GetBuiltinVariableInformation function.
[!NOTE] Accessing built-ins via an index is not faster than using GetBuiltin, due to YYTK's caching system.
Return Value
Value | Description |
---|---|
AURIE_SUCCESS |
The built-in was found, and its index was written into the buffer. |
AURIE_MODULE_INTERNAL_ERROR |
The internal function needed is unavailable. |
AURIE_OBJECT_NOT_FOUND |
The function Name does not exist. |
Requirements
Criterium | Value |
---|---|
Minimum YYTK Version | 3.0.3 |
Context | Any |