public void RemoveObjectInstance(VMEntity target) { VM.RemoveEntity(target); if (target is VMGameObject) { Blueprint.RemoveObject((ObjectComponent)target.WorldUI); } else { Blueprint.RemoveAvatar((AvatarComponent)target.WorldUI); } }