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

Method EndPlay

Source/Engine/Level/Actor.cpp:1057–1078  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1055}
1056
1057void Actor::EndPlay()
1058{
1059 CHECK_DEBUG(IsDuringPlay());
1060
1061 // Fire event for scripting
1062 if (IsActiveInHierarchy() && GetScene())
1063 {
1064 ASSERT(GetScene());
1065 OnDisable();
1066 }
1067
1068 for (auto* script : Scripts)
1069 {
1070 if (script->_wasAwakeCalled)
1071 {
1072 script->_wasAwakeCalled = false;
1073 CHECK_EXECUTE_IN_EDITOR
1074 {
1075 script->OnDestroy();
1076 }
1077 }
1078 }
1079
1080 OnEndPlay();
1081

Callers 2

Actor.cppFile · 0.45
unloadSceneMethod · 0.45

Calls 4

IsActiveInHierarchyFunction · 0.85
GetSceneFunction · 0.85
OnDisableFunction · 0.50
OnDestroyMethod · 0.45

Tested by

no test coverage detected