| 726 | } |
| 727 | |
| 728 | void Animation::unload(bool isReloading) |
| 729 | { |
| 730 | ScopeWriteLock systemScope(Animations::SystemLocker); |
| 731 | #if USE_EDITOR |
| 732 | _registerForScriptingReload = false; |
| 733 | if (_registeredForScriptingReload) |
| 734 | { |
| 735 | _registeredForScriptingReload = false; |
| 736 | Level::ScriptsReloadStart.Unbind<Animation, &Animation::OnScriptsReloadStart>(this); |
| 737 | } |
| 738 | #endif |
| 739 | Data.Release(); |
| 740 | for (const auto& e : Events) |
| 741 | { |
| 742 | for (const auto& k : e.Second.GetKeyframes()) |
| 743 | { |
| 744 | if (k.Value.Instance) |
| 745 | Delete(k.Value.Instance); |
| 746 | } |
| 747 | } |
| 748 | Events.Clear(); |
| 749 | NestedAnims.Clear(); |
| 750 | } |
| 751 | |
| 752 | #if USE_EDITOR |
| 753 |
nothing calls this directly
no test coverage detected