public override void ApplyTo(SkinComponent skinComponent) { var button = skinComponent.GetComponent <Button>(); button.colors = colors.GetValue(); var text = skinComponent.GetComponentInChildren <Text>(); if (text != null) { if (fontSize != null) { text.fontSize = (int)fontSize.GetValue(); } if (fontColor != null) { text.color = fontColor.GetValue(); } if (font != null) { text.font = font; } text.fontStyle = fontStyle; } }
public override void ApplyTo(SkinComponent skinComponent) { var image = skinComponent.GetComponent <Image>(); if (color != null) { image.color = color.GetValue(); } if (sprite != null) { image.sprite = sprite; } }
public override void ApplyTo(SkinComponent skinComponent) { var textComponent = skinComponent.GetComponent <Text>(); if (fontSize != null) { textComponent.fontSize = (int)fontSize.GetValue(); } if (color != null) { textComponent.color = color.GetValue(); } if (font != null) { textComponent.font = font; } textComponent.fontStyle = fontStyle; }
public override bool CanApplyTo(SkinComponent skinComponent) { return(skinComponent.GetComponent <Image>() != null); }