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

Function GetPropertyAsBool

engine/gameobject/src/gameobject/gameobject.cpp:3755–3772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3753 }
3754
3755 PropertyResult GetPropertyAsBool(HInstance instance, dmhash_t component_id, dmhash_t property_id, bool* out_value)
3756 {
3757 PropertyOptions options;
3758 PropertyDesc out_prop;
3759 PropertyResult result = GetProperty(instance, component_id, property_id, options, out_prop);
3760 if (result == PROPERTY_RESULT_OK)
3761 {
3762 if (PROPERTY_TYPE_BOOLEAN == out_prop.m_Variant.m_Type)
3763 {
3764 *out_value = out_prop.m_Variant.m_Bool;
3765 }
3766 else
3767 {
3768 result = PROPERTY_RESULT_TYPE_MISMATCH;
3769 }
3770 }
3771 return result;
3772 }
3773
3774 PropertyResult GetPropertyAsURL(HInstance instance, dmhash_t component_id, dmhash_t property_id, dmMessage::URL* out_value)
3775 {

Callers 1

TEST_FFunction · 0.85

Calls 1

GetPropertyFunction · 0.70

Tested by 1

TEST_FFunction · 0.68