|
Deki 0.40.1
Modular C++ engine with a visual editor, for 2D and 3D
|
An object reference the user assigns in the editor. More...
#include <deki/reflection/ObjectRef.h>
Inherits Deki::ObjectRefBase.
Public Member Functions | |
| T * | Get () const |
| Object * | GetObject () const |
| operator bool () const | |
| operator uint32_t () const | |
| bool | operator!= (const ObjectRef &other) const |
| T * | operator-> () const |
| ObjectRef & | operator= (uint32_t newId) |
| bool | operator== (const ObjectRef &other) const |
| Public Member Functions inherited from Deki::ObjectRefBase | |
| bool | IsResolved () const |
| bool | IsValid () const |
| void | Set (Object *obj) |
| Points the reference at obj at runtime. nullptr clears it. | |
| void | Set (Object *obj, uint32_t typeId) |
| Points the reference at the component of type typeId on obj. | |
Additional Inherited Members | |
| Public Attributes inherited from Deki::ObjectRefBase | |
| uint32_t | componentTypeId = 0 |
| uint32_t | id = 0 |
| Object * | resolved = nullptr |
An object reference the user assigns in the editor.
The property generator recognizes ObjectRef<T>, and the inspector draws an object picker filtered to objects with component T. The engine resolves the reference before Start(), so Get() returns the component directly.
When componentTypeId is set, Get() returns the component with that type id. When it is 0, Get() returns the first component of type T.
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |