Fixed entities not being deselected when entering game mode in editor.
added protections around physx AZ::Events handlers that are connected/disconnected on selection events. jira: LYN-2998
This commit is contained in:
@@ -686,8 +686,14 @@ namespace PhysX
|
||||
{
|
||||
if (auto* physXSystem = GetPhysXSystem())
|
||||
{
|
||||
physXSystem->RegisterSystemConfigurationChangedEvent(m_physXConfigChangedHandler);
|
||||
physXSystem->RegisterOnDefaultMaterialLibraryChangedEventHandler(m_onDefaultMaterialLibraryChangedEventHandler);
|
||||
if (!m_physXConfigChangedHandler.IsConnected())
|
||||
{
|
||||
physXSystem->RegisterSystemConfigurationChangedEvent(m_physXConfigChangedHandler);
|
||||
}
|
||||
if (!m_onDefaultMaterialLibraryChangedEventHandler.IsConnected())
|
||||
{
|
||||
physXSystem->RegisterOnDefaultMaterialLibraryChangedEventHandler(m_onDefaultMaterialLibraryChangedEventHandler);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user