From 7742d0f65c94251358f5c38cc7970d94346e0ab0 Mon Sep 17 00:00:00 2001 From: Masoud Darvishian Date: Thu, 6 Jan 2022 20:57:06 +0330 Subject: [PATCH] Bug fix for the Update design pattern example --- .../9. Update/Custom Update method/Scripts/GameController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Patterns/9. Update/Custom Update method/Scripts/GameController.cs b/Assets/Patterns/9. Update/Custom Update method/Scripts/GameController.cs index a737caa..f5dc36c 100644 --- a/Assets/Patterns/9. Update/Custom Update method/Scripts/GameController.cs +++ b/Assets/Patterns/9. Update/Custom Update method/Scripts/GameController.cs @@ -63,7 +63,7 @@ public static void RegisterUpdateableObject(IUpdateable obj) //Unregister public static void UnregisterUpdateableObject(IUpdateable obj) { - if (!updateableObjects.Contains(obj)) + if (updateableObjects.Contains(obj)) { updateableObjects.Remove(obj); }