Deleting touchpoints with the legacy cry renderer in an attempt to fix a failing test

This commit is contained in:
karlberg
2021-04-27 16:26:26 -07:00
parent 2fc710d73b
commit 618d80e738
@@ -190,50 +190,10 @@ namespace LmbrCentral
void EditorDecalComponent::Activate()
{
Base::Activate();
AZ::EntityId entityId = GetEntityId();
IEditor* editor = nullptr;
EBUS_EVENT_RESULT(editor, AzToolsFramework::EditorRequests::Bus, GetEditor);
m_configuration.m_editorEntityId = entityId;
m_decalRenderNode = static_cast<IDecalRenderNode*>(editor->Get3DEngine()->CreateRenderNode(eERType_Decal));
RefreshDecal();
MaterialOwnerRequestBus::Handler::BusConnect(entityId);
AZ::TransformNotificationBus::Handler::BusConnect(entityId);
DecalComponentEditorRequests::Bus::Handler::BusConnect(entityId);
RenderNodeRequestBus::Handler::BusConnect(entityId);
AzFramework::EntityDebugDisplayEventBus::Handler::BusConnect(entityId);
AzToolsFramework::EditorVisibilityNotificationBus::Handler::BusConnect(entityId);
AzToolsFramework::EditorEvents::Bus::Handler::BusConnect();
AzToolsFramework::EditorComponentSelectionRequestsBus::Handler::BusConnect(entityId);
AzFramework::BoundsRequestBus::Handler::BusConnect(entityId);
}
void EditorDecalComponent::Deactivate()
{
MaterialOwnerRequestBus::Handler::BusDisconnect();
DecalComponentEditorRequests::Bus::Handler::BusDisconnect();
RenderNodeRequestBus::Handler::BusDisconnect();
AZ::TransformNotificationBus::Handler::BusDisconnect();
AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect();
AzToolsFramework::EditorVisibilityNotificationBus::Handler::BusDisconnect();
AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect();
AzToolsFramework::EditorComponentSelectionRequestsBus::Handler::BusDisconnect();
AzFramework::BoundsRequestBus::Handler::BusDisconnect();
m_configuration.m_editorEntityId.SetInvalid();
if (m_decalRenderNode)
{
IEditor* editor = nullptr;
EBUS_EVENT_RESULT(editor, AzToolsFramework::EditorRequests::Bus, GetEditor);
editor->Get3DEngine()->DeleteRenderNode(m_decalRenderNode);
m_decalRenderNode = nullptr;
}
Base::Deactivate();
}