Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches

A picked "field of a component on an object". More...

#include <PropertyRef.h>

Public Member Functions

void Rehash ()
bool IsSet () const

Public Attributes

std::string object
std::string component
std::string field
uint32_t componentTypeId = 0
uint32_t fieldHash = 0

Detailed Description

A picked "field of a component on an object".

The editor authors one of these with three cascading dropdowns (object -> component -> field), so an invalid reference cannot be authored at all. What gets stored is ids, not prose: the component is identified by the same type GUID scenes use, the field by its name. Both are hashed ONCE at load (Rehash), after which resolving costs a small linear scan and never touches a string again.

The object stays a NAME on purpose. Object ids are per-scene, and a graph asset is shared across every scene that uses it, so a name is the only identity that survives. "" means "the object this component is on".

Resolve once (Awake, state entry) into a PropertyBinding and reuse it; do not resolve per frame.

Member Function Documentation

◆ Rehash()

void PropertyRef::Rehash ( )

◆ IsSet()

bool PropertyRef::IsSet ( ) const
inline

Member Data Documentation

◆ object

std::string PropertyRef::object

◆ component

std::string PropertyRef::component

◆ field

std::string PropertyRef::field

◆ componentTypeId

uint32_t PropertyRef::componentTypeId = 0

◆ fieldHash

uint32_t PropertyRef::fieldHash = 0

The documentation for this struct was generated from the following file: