Improved logged to print entity name if improperly deleted; helps when debugging to find the problem entity

Signed-off-by: Gene Walters <genewalt@amazon.com>
monroegm-disable-blank-issue-2
Gene Walters 4 years ago
parent c3fdbfb926
commit 4f9d4b7045

@ -167,7 +167,14 @@ namespace Multiplayer
void NetBindComponent::Deactivate()
{
AZ_Assert(m_needsToBeStopped == false, "Entity appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity.");
if (m_needsToBeStopped)
{
AZ_Assert(
false,
"Entity (%s) appears to have been improperly deleted. Use MarkForRemoval to correctly clean up a networked entity.",
GetEntity()->GetName().c_str());
}
m_handleLocalServerRpcMessageEventHandle.Disconnect();
if (NetworkRoleHasController(m_netEntityRole))
{

Loading…
Cancel
Save