Property functions.
Namespace: | dmGameSystem |
Include: | #include <dmsdk/gamesys/property.h> |
STRUCTS | |
---|---|
struct PropVector3 | |
struct PropVector4 |
FUNCTIONS | |
---|---|
dmGameObject::PropertyResult GetResourceProperty(const PropVector4& property, void* resource, dmGameObject::PropertyDesc& out_value) | Gets the resource path hash |
bool IsReferencingProperty(const PropVector3& property, dmhash_t query) | Checks if the name matches any field in the proper... |
bool IsReferencingProperty(const PropVector4& property, dmhash_t query) | Checks if the name matches any field in the proper... |
dmGameObject::PropertyResult SetResourceProperty(dmGameObject::HFactory factory, const dmGameObject::PropertyVar& value, dmhash_t ext, void** out_resource) | Updates the reference count of the resources, and ... |
dmGameObject::PropertyResult GetResourceProperty(const PropVector4& property, void* resource, dmGameObject::PropertyDesc& out_value)
Gets the resource path hash
PARAMETERS
const PropVector4& |
property |
the property |
void* |
resource |
the resource to get the |
dmGameObject::PropertyDesc& |
out_value |
the out property |
RETURNS
dmGameObject::PropertyResult |
RESULT_OK if successful |
bool IsReferencingProperty(const PropVector3& property, dmhash_t query)
Checks if the name matches any field in the property
PARAMETERS
const PropVector3& |
property |
the property |
dmhash_t |
query |
the name to look for (e.g. hash("pos.x")) |
RETURNS
bool |
true if the property contains the name |
bool IsReferencingProperty(const PropVector4& property, dmhash_t query)
Checks if the name matches any field in the property
PARAMETERS
const PropVector4& |
property |
the property |
dmhash_t |
query |
the name to look for (e.g. hash("pos.x")) |
RETURNS
bool |
true if the property contains the name |
dmGameObject::PropertyResult SetResourceProperty(dmGameObject::HFactory factory, const dmGameObject::PropertyVar& value, dmhash_t ext, void** out_resource)
Updates the reference count of the resources, and returns the new resource.
PARAMETERS
dmGameObject::HFactory |
factory |
the factory |
const dmGameObject::PropertyVar& |
value |
the property containing the hash of the resources to get |
dmhash_t |
ext |
the hash of the resource file suffix (without the "."). E.g. hash("spritec") |
void** |
out_resource |
pointer to the current resource. Will also get the pointer to the new resource. |
RETURNS
dmGameObject::PropertyResult |
RESULT_OK if successful |
TYPE
struct PropVector3
TYPE
struct PropVector4