From ff684b42e5e183a5268ae7b5bb558e9622283305 Mon Sep 17 00:00:00 2001 From: Bryan Wong Date: Wed, 2 Sep 2020 11:54:01 +0100 Subject: [PATCH] UTY-2714: Incorrect entity added/removed callback registration (#1473) * Correct callback registration to entity removed --- CHANGELOG.md | 1 + .../Subscriptions/StandardSubscriptionManagers/WorldCommands.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77af69b33e..b3debbe1d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - Fixed an issue where authority changes returned by `ComponentUpdateSystem.GetAuthorityChangesReceived()` were returned in order from newest to oldest. [#1465](https://github.com/spatialos/gdk-for-unity/pull/1465) - Fixed a bug where the build system would throw a null reference exception if you don't have a configuration for a worker type. [#1461](https://github.com/spatialos/gdk-for-unity/pull/1461) +- Fixed an incorrect callback registration for entity creation/removal in the `WorldCommandSender`. [#1473](https://github.com/spatialos/gdk-for-unity/pull/1462) ## `0.3.10` - 2020-08-18 diff --git a/workers/unity/Packages/io.improbable.gdk.core/Subscriptions/StandardSubscriptionManagers/WorldCommands.cs b/workers/unity/Packages/io.improbable.gdk.core/Subscriptions/StandardSubscriptionManagers/WorldCommands.cs index 9b6d26adb4..cc50b4dd72 100644 --- a/workers/unity/Packages/io.improbable.gdk.core/Subscriptions/StandardSubscriptionManagers/WorldCommands.cs +++ b/workers/unity/Packages/io.improbable.gdk.core/Subscriptions/StandardSubscriptionManagers/WorldCommands.cs @@ -33,7 +33,7 @@ public WorldCommandSenderSubscriptionManager(World world) : base(world) } }); - constraintsSystem.RegisterEntityAddedCallback(entityId => + constraintsSystem.RegisterEntityRemovedCallback(entityId => { if (!entityIdToSenderSubscriptions.TryGetValue(entityId, out var subscriptions)) {