MCPcopy Create free account
hub / github.com/defold/defold / GetPropertyAsHash

Function GetPropertyAsHash

engine/gameobject/src/gameobject/gameobject.cpp:3652–3669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3650 }
3651
3652 PropertyResult GetPropertyAsHash(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmhash_t* out_value)
3653 {
3654 PropertyOptions options;
3655 PropertyDesc out_prop;
3656 PropertyResult result = GetProperty(instance, component_id, property_id, options, out_prop);
3657 if (result == PROPERTY_RESULT_OK)
3658 {
3659 if (PROPERTY_TYPE_HASH == out_prop.m_Variant.m_Type)
3660 {
3661 *out_value = out_prop.m_Variant.m_Hash;
3662 }
3663 else
3664 {
3665 result = PROPERTY_RESULT_TYPE_MISMATCH;
3666 }
3667 }
3668 return result;
3669 }
3670
3671 PropertyResult GetPropertyAsFloat(HInstance instance, dmhash_t component_id, dmhash_t property_id, float* out_value)
3672 {

Callers 1

TEST_FFunction · 0.85

Calls 1

GetPropertyFunction · 0.70

Tested by 1

TEST_FFunction · 0.68