Ejemplo n.º 1
0
        private int HandleReferenceProperty <T>(PropertyInfo field, ref object val) where T : UnityEngine.Object
        {
            IStyleValue <T> style       = (IStyleValue <T>)val;
            int             specificity = style.specificity;

            if (m_ShowAll || specificity != StyleValueExtensions.UndefinedSpecificity)
            {
                style.specificity = Int32.MaxValue;
                style.value       = EditorGUILayout.ObjectField(field.Name, ((IStyleValue <T>)val).value, typeof(T), false) as T;
                val = style;
            }
            return(specificity);
        }
Ejemplo n.º 2
0
 internal static string DebugString <T>(this IStyleValue <T> styleValue)
 {
     return((styleValue.keyword != StyleKeyword.Undefined) ? string.Format("{0}", styleValue.keyword) : string.Format("{0}", styleValue.value));
 }
Ejemplo n.º 3
0
 internal static string DebugString <T>(this IStyleValue <T> styleValue)
 {
     return(styleValue.keyword != StyleKeyword.Undefined ? $"{styleValue.keyword}" : $"{styleValue.value}");
 }