| 607 | } |
| 608 | |
| 609 | void* EntityWorld::GetRawComponent(EntityHandle entityHandle, ComponentTypeIndex type, std::size_t componentSize, bool isProxy) |
| 610 | { |
| 611 | auto storage = GetEntityStorage(entityHandle); |
| 612 | if (IsOneFrame(type)) { |
| 613 | if (storage != nullptr) { |
| 614 | return storage->GetOneFrameComponent(entityHandle, type); |
| 615 | } |
| 616 | } else { |
| 617 | if (storage != nullptr) { |
| 618 | auto component = storage->GetComponent(entityHandle, type, componentSize, isProxy); |
| 619 | if (component != nullptr) { |
| 620 | return component; |
| 621 | } |
| 622 | } |
| 623 | |
| 624 | auto change = Cache->WriteChanges.GetChange(entityHandle, type); |
| 625 | if (change != nullptr) { |
| 626 | return change; |
| 627 | } |
| 628 | |
| 629 | change = Cache->ReadChanges.GetChange(entityHandle, type); |
| 630 | if (change != nullptr) { |
| 631 | return change; |
| 632 | } |
| 633 | } |
| 634 | |
| 635 | return nullptr; |
| 636 | } |
| 637 | |
| 638 | bool EntityWorld::MarkComponentAsChanged(EntityHandle entity, ComponentTypeIndex component) |
| 639 | { |
no test coverage detected