void Start() { baseButtonGraphic.GetFeatureData <CustomVectorChannelData>().value = buttonColors.baseColor.ToHSV(); pressedButtonGraphic.GetFeatureData <CustomVectorChannelData>().value = buttonColors.pressedColor.ToHSV(); hoveringButtonGraphic.GetFeatureData <CustomVectorChannelData>().value = buttonColors.hoveringColor.ToHSV(); toggledButtonGraphic.GetFeatureData <CustomVectorChannelData>().value = buttonColors.toggledColor.ToHSV(); }
public void setGraphicColor(Color color) { if (graphic == null) { graphic = GetComponent <LeapGraphic>(); if (graphic == null) { graphic = GetComponentInParent <LeapGraphic>(); } } if (graphicColor == null) { graphicColor = graphic.GetFeatureData <CustomVectorChannelData>(); } graphicColor.value = color.ToHSV(); }
private void setColor(Color c) { if (graphicToDrive != null) { var colorFeature = graphicToDrive.GetFeatureData <LeapRuntimeTintData>(); if (colorFeature == null) { Debug.LogError("No runtime tint (color) feature available for " + graphicToDrive.name, this); } else { colorFeature.color = c; } } else { materialInstance.color = c; } }
void Start() { _tint = graphic.GetFeatureData <LeapRuntimeTintData>(); _button = GetComponent <InteractionButton>(); }