A collection of template functions providing a set of utilities for accessing and managing nodes and variables within the engine, including node retrieval, node searching, global pointer management and global variable access.
◆ GetSelf()
template<typename T>
| T * GetSelf |
( |
Caller * | caller | ) |
|
Returns a pointer to the current Node instance the C++ script is executing from.
- Template Parameters
-
| T | The type of the Node class. |
- Parameters
-
| caller | A pointer to the caller instance. |
- Returns
- A casted pointer to the current
Node instance.
◆ GetNode()
Returns a pointer to a node by its path. Wrapper for GetNodeByPath().
- Template Parameters
-
- Parameters
-
| nodePath | The path to the node. |
- Returns
- A casted pointer to the node, or
nullptr if not found.
◆ FindNode()
Finds a node by its name in a given parent node. Wrapper for FindNodeByName().
- Template Parameters
-
- Parameters
-
| parent | The parent node to search in. |
| nodeName | The name of the node to find. |
- Returns
- A casted pointer to the node, or
nullptr if not found.
◆ GlobalPointer()
Returns a global pointer. Wrapper for GetGlobalPointer().
- Template Parameters
-
| T | The type of the global pointer. |
- Parameters
-
| id | The Unique ID of the global pointer. |
- Returns
- A casted pointer to the global memory, or
nullptr if not found.
◆ GlobalGet()
Returns the value of a global pointer.
- Template Parameters
-
| T | The type of the global pointer. |
- Parameters
-
| id | The Unique ID of the global pointer. |
- Returns
- The casted value of the global pointer.
◆ GlobalSet()
template<typename T>
| void GlobalSet |
( |
MemoryID | id, |
|
|
const T & | newValue ) |
Sets the value of a global pointer.
- Template Parameters
-
| T | The type of the global pointer. |
- Parameters
-
| id | The Unique ID of the global pointer. |
| newValue | The new value to set. |
◆ GlobalVariable()
Returns the value of a global variable. Wrapper for GetGlobalVariable().
- Template Parameters
-
| T | The type of the variable. |
- Parameters
-
| id | The Unique ID of the variable. |
- Returns
- The casted value of the variable.
◆ GetObjectFromIntPtr() [1/2]
template<typename T>
| T * GetObjectFromIntPtr |
( |
IntPtr | ptr | ) |
|
Returns a pointer to an object from an IntPtr.
- Template Parameters
-
- Parameters
-
- Returns
- A casted pointer to the object, or
nullptr if not found.
◆ GetObjectFromIntPtr() [2/2]
Returns a pointer to an object from a Variant IntPtr.
- Template Parameters
-
- Parameters
-
| variantPtr | The Variant containing pointer to the object. |
- Returns
- A casted pointer to the object, or
nullptr if not found.