StandardShaderUtility.TryParseCSSGradient Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Attempts to parse a CSS gradient (https://developer.mozilla.org/en-US/docs/Web/CSS/gradient) into an array of colors and times. Note, only linear gradients are supported at the moment. And, not all CSS gradient features are supported. An example input sting is: background: background: linear-gradient(90deg, #0380FD 0%, #406FC8 19.05%, #2B398F 49.48%, #FF77C1 100%);
public static bool TryParseCSSGradient (string cssGradient, out UnityEngine.Color[] gradientColors, out float[] gradientTimes, out float gradientAngle);
static member TryParseCSSGradient : string * Color[] * Single[] * single -> bool
Public Shared Function TryParseCSSGradient (cssGradient As String, ByRef gradientColors As Color(), ByRef gradientTimes As Single(), ByRef gradientAngle As Single) As Boolean
Parameters
- cssGradient
- String
- gradientColors
- UnityEngine.Color[]
- gradientTimes
- Single[]
- gradientAngle
- Single