Electro/src/Scripting/ScriptEngine.cpp
// Called when a ScriptComponent is removed
Called when a ScriptComponent is removed
Called when a ScriptComponent is removed
void ScriptEngine::ShutdownScriptEntity(Entity entity, const String& moduleName)
    {
        EntityInstanceData& entityInstanceData = GetEntityInstanceData(entity.GetSceneUUID(), entity.GetUUID());
        ScriptModuleFieldMap& moduleFieldMap = entityInstanceData.ModuleFieldMap;
        if (moduleFieldMap.find(moduleName) != moduleFieldMap.end())
            moduleFieldMap.erase(moduleName);
    }
void ScriptEngine :: ShutdownScriptEntity ( Entity entity , const String & moduleName ) { EntityInstanceData & entityInstanceData = GetEntityInstanceData ( entity . GetSceneUUID ( ) , entity . GetUUID ( ) ) ; ScriptModuleFieldMap & moduleFieldMap = entityInstanceData . ModuleFieldMap ; if ( moduleFieldMap . find ( moduleName ) != moduleFieldMap . end ( ) ) moduleFieldMap . erase ( moduleName ) ; }
Called when a ScriptComponent is removed
Called when a ScriptComponent is removed