/**
     * <summary>
     * On the UI clicked
     * </summary>
     */
    public virtual void OnPointerClick(PointerEventData pointerEventData)
    {
        // Hide previous editor UI
        if (UnitPartEditorsManager.ActivePartEditorUI != null)
        {
            UnitPartEditorsManager.ActivePartEditorUI.SetActive(false);
        }

        // Disable previous part component state
        if (UnitPartComponentsManager.SelectedPartComponentUI != null)
        {
            UnitPartComponentUI unitPartComponentUI = UnitPartComponentsManager.SelectedPartComponentUI
                                                      .GetComponent <UnitPartComponentUI>();

            unitPartComponentUI.SetSelect(false);
        }

        this.SetSelect(true);
    }
    // Update is called once per frame
    private void Update()
    {
        // On left button down
        if (Input.GetMouseButtonDown(0))
        {
            // Make sure the mouse is not over the UI
            if (!EventSystem.current.IsPointerOverGameObject())
            {
                if (UnitPartComponentsManager.SelectedPartComponentUI != null)
                {
                    UnitPartComponentUI unitPartComponentUI = UnitPartComponentsManager.SelectedPartComponentUI
                                                              .GetComponent <UnitPartComponentUI>();

                    unitPartComponentUI.SetSelect(false);
                }

                if (UnitPartEditorsManager.ActivePartEditorUI != null)
                {
                    UnitPartEditorsManager.ActivePartEditorUI.SetActive(false);
                    UnitPartEditorsManager.ActivePartEditorUI = null;
                }
            }

            // Disable selected body item UI to false
            if (BodyItemsManager.SelectedBodyItemUI != null)
            {
                BodyItemUI bodyItemUI = BodyItemsManager.SelectedBodyItemUI
                                        .GetComponent <BodyItemUI>();

                bodyItemUI.SetSelect(false);
            }

            // Disable selected weapon item UI to false
            if (WeaponItemsManager.SelectedWeaponItemUI != null)
            {
                WeaponItemUI weaponItemUI = WeaponItemsManager.SelectedWeaponItemUI
                                            .GetComponent <WeaponItemUI>();

                weaponItemUI.SetSelect(false);
            }
        }
    }