| 1467 | } |
| 1468 | |
| 1469 | MProperty* 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 | |
| 1490 | class PhysicsColliderActorInternal |
| 1491 | { |