MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetProperty

Method GetProperty

Source/Engine/Scripting/Runtime/Mono.cpp:1469–1488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1467}
1468
1469MProperty* MClass::GetProperty(const char* name) const
1470{
1471 // Lookup for cached property
1472 for (int32 i = 0; i < _properties.Count(); i++)
1473 {
1474 if (_properties[i]->GetName() == name)
1475 return _properties[i];
1476 }
1477
1478 // Find mono property
1479 MonoProperty* monoProperty = mono_class_get_property_from_name(_monoClass, name);
1480 if (monoProperty == nullptr)
1481 return nullptr;
1482
1483 // Create method
1484 auto mproperty = New<MProperty>(monoProperty, name, (MClass*)this);
1485 _properties.Add(mproperty);
1486
1487 return mproperty;
1488}
1489
1490class PhysicsColliderActorInternal
1491{

Callers 4

AccessVariantFunction · 0.45
ToNativeMethod · 0.45
TickMethod · 0.45
FindFieldMethod · 0.45

Calls 3

CountMethod · 0.45
GetNameMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected