Merged ctrl+g fixes from MultiplayerEditorFixes

Signed-off-by: pereslav <pereslav@amazon.com>
This commit is contained in:
pereslav
2021-06-30 13:20:07 +01:00
parent c4a20405e2
commit 1100e20e26
2 changed files with 13 additions and 2 deletions
@@ -113,6 +113,12 @@ namespace Multiplayer
{
console->PerformCommand("disconnect");
}
AZ::Interface<INetworkEntityManager>::Get()->ClearAllEntities();
// Rebuild the library to clear temporary in-memory spawnable assets
AZ::Interface<INetworkSpawnableLibrary>::Get()->BuildSpawnablesList();
break;
}
}
@@ -235,7 +241,5 @@ namespace Multiplayer
void MultiplayerEditorSystemComponent::OnGameEntitiesReset()
{
// Rebuild the library to clear temporary in-memory spawnable assets
AZ::Interface<INetworkSpawnableLibrary>::Get()->BuildSpawnablesList();
}
}