Description:
Default Color parser.
Added In: v0.50
public class UMFConfigColorHexRGBA : UMFConfigParser<Color> { public Color DefaultValue; public bool RequiresRestart; public UMFConfigColorHexRGBA(Color defaultValues = default(Color), bool requiresRestart = false) { DefaultValue = defaultValues; RequiresRestart = requiresRestart; } public override Color Parse(string value) { if (ColorUtility.TryParseHtmlString(value, out Color color)) return color; else return Color.white; } public override string ToString() { return "#" + ColorUtility.ToHtmlStringRGBA(DefaultValue); } public override string Default() { return "#" + ColorUtility.ToHtmlStringRGBA(DefaultValue); } public override string Restart() { return RequiresRestart.ToString(); } }
//Coming soon
//Coming soon