|
Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
|
Object reference wrapper for editor-assignable object IDs. More...
#include <ObjectRef.h>
Inherits ObjectRefBase.
Public Member Functions | |
| T * | Get () const |
| DekiObject * | GetObject () const |
| operator uint32_t () const | |
| ObjectRef & | operator= (uint32_t newId) |
| bool | operator== (const ObjectRef &other) const |
| bool | operator!= (const ObjectRef &other) const |
| T * | operator-> () const |
| operator bool () const | |
| Public Member Functions inherited from ObjectRefBase | |
| bool | IsValid () const |
| bool | IsResolved () const |
| void | Set (DekiObject *obj) |
| Set the reference to an object (runtime assignment). | |
| void | Set (DekiObject *obj, uint32_t typeId) |
| Set the reference to a specific component on an object. | |
Additional Inherited Members | |
| Public Attributes inherited from ObjectRefBase | |
| uint32_t | id = 0 |
| uint32_t | componentTypeId = 0 |
| DekiObject * | resolved = nullptr |
Object reference wrapper for editor-assignable object IDs.
ObjectRef<T> provides a uint32_t object ID that the property generator recognizes as an ObjectRef type, causing the inspector to draw an object picker dropdown filtered by component type T.
The engine automatically resolves ObjectRef references before Start() is called, so you can use Get() to retrieve the component directly.
When componentTypeId is set, Get() returns the specific component matching that type ID. When componentTypeId is 0, Get() returns the first component matching template type T (backward compatible behavior).
| T | The component type to filter by in the object picker |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineexplicit |