|
|
|
|
@ -207,12 +207,6 @@ namespace AZ
|
|
|
|
|
ActivateComponent(**it);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Cache the transform interface to the transform interface
|
|
|
|
|
// Generally this pattern is not recommended unless for component event buses
|
|
|
|
|
// As we have a guarantee (by design) that components can't change during active state)
|
|
|
|
|
// Even though technically they can connect disconnect from the bus.
|
|
|
|
|
m_transform = TransformBus::FindFirstHandler(m_id);
|
|
|
|
|
|
|
|
|
|
SetState(State::Active);
|
|
|
|
|
|
|
|
|
|
EBUS_EVENT_ID(m_id, EntityBus, OnEntityActivated, m_id);
|
|
|
|
|
@ -1320,6 +1314,19 @@ namespace AZ
|
|
|
|
|
return *processSignature;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AZ::TransformInterface* Entity::GetTransform() const
|
|
|
|
|
{
|
|
|
|
|
// Lazy evaluation of the cached entity transform.
|
|
|
|
|
if(!m_transform)
|
|
|
|
|
{
|
|
|
|
|
// Generally this pattern is not recommended unless for component event buses
|
|
|
|
|
// As we have a guarantee (by design) that components can't change during active state)
|
|
|
|
|
// Even though technically they can connect disconnect from the bus.
|
|
|
|
|
m_transform = TransformBus::FindFirstHandler(m_id);
|
|
|
|
|
}
|
|
|
|
|
return m_transform;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//=========================================================================
|
|
|
|
|
// MakeId
|
|
|
|
|
// Ids must be unique across a project at authoring time. Runtime doesn't matter
|
|
|
|
|
|