示例#1
0
        internal bool TryReadDimension(StyleValueHandle handle, out Dimension value)
        {
            bool flag = StyleSheet.TryCheckAccess <Dimension>(this.dimensions, StyleValueType.Dimension, handle, out value);
            bool result;

            if (flag)
            {
                result = true;
            }
            else
            {
                float value2 = 0f;
                bool  flag2  = StyleSheet.TryCheckAccess <float>(this.floats, StyleValueType.Float, handle, out value2);
                value  = new Dimension(value2, Dimension.Unit.Unitless);
                result = flag2;
            }
            return(result);
        }
示例#2
0
        internal bool TryReadFloat(StyleValueHandle handle, out float value)
        {
            bool flag = StyleSheet.TryCheckAccess <float>(this.floats, StyleValueType.Float, handle, out value);
            bool result;

            if (flag)
            {
                result = true;
            }
            else
            {
                Dimension dimension;
                bool      flag2 = StyleSheet.TryCheckAccess <Dimension>(this.dimensions, StyleValueType.Float, handle, out dimension);
                value  = dimension.value;
                result = flag2;
            }
            return(result);
        }
示例#3
0
 internal bool TryReadAssetReference(StyleValueHandle handle, out UnityEngine.Object value)
 {
     return(StyleSheet.TryCheckAccess <UnityEngine.Object>(this.assets, StyleValueType.AssetReference, handle, out value));
 }
示例#4
0
 internal bool TryReadResourcePath(StyleValueHandle handle, out string value)
 {
     return(StyleSheet.TryCheckAccess <string>(this.strings, StyleValueType.ResourcePath, handle, out value));
 }
示例#5
0
 internal bool TryReadVariable(StyleValueHandle handle, out string value)
 {
     return(StyleSheet.TryCheckAccess <string>(this.strings, StyleValueType.Variable, handle, out value));
 }
示例#6
0
 internal bool TryReadColor(StyleValueHandle handle, out Color value)
 {
     return(StyleSheet.TryCheckAccess <Color>(this.colors, StyleValueType.Color, handle, out value));
 }