Removing some more ebus dependencies within the vis system

This commit is contained in:
karlberg
2021-05-03 21:20:40 -07:00
parent 822368ef01
commit d5ad5d9596
7 changed files with 23 additions and 22 deletions
@@ -14,6 +14,7 @@
#include <AzCore/Component/Entity.h>
#include <AzCore/Component/ComponentApplicationBus.h>
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Interface/Interface.h>
#include <AzCore/Math/Sfmt.h>
#include <AzCore/Math/Crc.h>
@@ -173,7 +174,7 @@ namespace AZ
//=========================================================================
void ComponentDescriptor::ReleaseDescriptor()
{
EBUS_EVENT(ComponentApplicationBus, UnregisterComponentDescriptor, this);
AZ::Interface<AZ::ComponentApplicationRequests>::Get()->UnregisterComponentDescriptor(this);
delete this;
}
} // namespace AZ
@@ -112,7 +112,7 @@ namespace AZ
{
EBUS_EVENT(EntitySystemBus, OnEntityDestruction, m_id);
EBUS_EVENT_ID(m_id, EntityBus, OnEntityDestruction, m_id);
EBUS_EVENT(ComponentApplicationBus, RemoveEntity, this);
AZ::Interface<AZ::ComponentApplicationRequests>::Get()->RemoveEntity(this);
m_stateEvent.Signal(State::Init, State::Destroying);
}