void OnModeChanged() { ColorPickerMode mode = ColorPickerUtils.GetActiveMode(m_ColorController.IsHdr); ColorPickerInfo info = ColorPickerUtils.GetInfoForMode(mode); if (m_ColorPickerSelectorBorderCube != null && m_ColorPickerSelectorBorderCylinder != null) { m_ColorPickerSelectorBorderCube.enabled = false; m_ColorPickerSelectorBorderCylinder.enabled = false; if (info.cylindrical) { m_ColorPickerSelectorBorderCylinder.enabled = true; } else { m_ColorPickerSelectorBorderCube.enabled = true; } } if (m_CircleBack != null) { m_CircleBack.SetActive(info.cylindrical); } m_ColorPickerSelector.SetLocalMode(mode); m_ColorPickerSlider.SetLocalMode(mode); m_ColorController.CurrentColor = m_ColorController.CurrentColor; }
void OnModeChanged() { ColorPickerInfo info = ColorPickerUtils.GetInfoForMode(CustomColorPaletteStorage.m_Instance.Mode); if (!m_AtlasTexture) { m_ButtonRenderer.material.mainTexture = info.icon; } SetSelectedOption((int)CustomColorPaletteStorage.m_Instance.Mode); }
void OnModeChanged() { ColorPickerInfo info = ColorPickerUtils.GetInfoForMode(m_LocalMode); m_Renderer.material.shader = info.shader; if (m_LocalMode == ColorPickerMode.SL_H_Triangle) { GetComponent <MeshFilter>().sharedMesh = m_TriangleMesh; } else { GetComponent <MeshFilter>().sharedMesh = m_StandardMesh; } RawValue = RawValue; // force update of material param }