| 580 | } |
| 581 | |
| 582 | void Animation::OnScriptingDispose() |
| 583 | { |
| 584 | // Dispose any events to prevent crashes (scripting is released before content) |
| 585 | for (auto& e : Events) |
| 586 | { |
| 587 | for (auto& k : e.Second.GetKeyframes()) |
| 588 | { |
| 589 | if (k.Value.Instance) |
| 590 | { |
| 591 | Delete(k.Value.Instance); |
| 592 | k.Value.Instance = nullptr; |
| 593 | } |
| 594 | } |
| 595 | } |
| 596 | |
| 597 | BinaryAsset::OnScriptingDispose(); |
| 598 | } |
| 599 | |
| 600 | Asset::LoadResult Animation::load() |
| 601 | { |
nothing calls this directly
no test coverage detected