public void UnregisterCreatable(GameActor actor) { // Let callers blindly cast object to GameActor, we'll worry about whether it wasn't one. if (actor == null) { return; } Guid creatableId = actor.CreatableId; /// Purge any recyclable copies we have lying around. ActorFactory.ClearCreatable(creatableId); GameActor creatable; if (!creatables.TryGetValue(creatableId, out creatable)) { return; } // Turn clones of this creatable into individuals. List <GameActor> cloneList = new List <GameActor>(); GetClones(creatableId, cloneList); foreach (GameActor curr in cloneList) { curr.CreatableId = Guid.Empty; curr.ClearCount(); } // Remove the actor from the set of creatables. creatables.Remove(creatableId); actor.CreatableId = Guid.Empty; actor.CreatableAura = null; RegisterCollide(actor); // Remove from create menu UnregisterCardSpace(creatableId); }