private void OpenColorMenu() { SelectionFilter selectionFilter = selectionGizmo.selectionFilter; GameController.CursorFocusUI(true); if (!selectionFilter.IsMultiSelection) { fillColor = selectionFilter.GetSelectedGameObjects()[0].GetComponent <ChildScript>().GetColor(); } ColorPicker.Create(this.fillColor, "colortool", selectedColor => { if (!selectionFilter.IsMultiSelection) { selectionFilter.GetSelectedGameObjects()[0].GetComponent <ChildScript>().SetColor(selectedColor); } }, selectedColor => { if (fillColor == selectedColor) { return; } fillColor = selectedColor; foreach (GameObject selectedGameObject in selectionFilter.GetSelectedGameObjects()) { if (selectedGameObject.TryGetComponent <ChildScript>(out var component)) { component.SetColor(selectedColor); } }
public void ChooseColorButtonClick() { ColorPicker.Create(r.sharedMaterial.color, "Choose the cube's color!", SetColor, ColorFinished, true); }
//choose color button call public void ChooseColor() { ColorPicker.Create(colorKeys[selectedColorKey].color, "Gradient Color Key", (c) => UpdateColor(selectedColorKey, c), null); }
public void OnClickChooseColor() { selectedColorButton = EventSystem.current.currentSelectedGameObject; selectedColorButtonID = EventSystem.current.currentSelectedGameObject.GetComponent <ColorChooserButton>().ButtonID; ColorPicker.Create(colors[selectedColorButtonID], "Choose color", onColorChanged, onColorSelected, false); }