public void Recycle() { questHolder = null; if (mapIcon) { mapIcon.Recycle(); } ObjectPool.Put(gameObject); }
public void RemoveMapIcon(MapIcon icon, bool force) { if (!icon || !icon.RemoveAble && !force) { return; } if (icon.holder) { RemoveMapIcon(icon.holder); } else { IconsWithoutHolder.Remove(icon); icon.Recycle(); } }
public void RemoveMapIcon(MapIcon icon, bool force = false) { if (!icon || !icon.RemoveAble && !force) { return; } if (icon.holder) { RemoveMapIcon(icon.holder, force); } else { NormalIcons.Remove(icon); icon.Recycle(); } }