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

Method unload

Source/Engine/Content/Assets/Animation.cpp:728–750  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726}
727
728void 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

Callers

nothing calls this directly

Calls 4

DeleteFunction · 0.85
ReleaseMethod · 0.45
GetKeyframesMethod · 0.45
ClearMethod · 0.45

Tested by

no test coverage detected