public override float GetAdaptiveWidth()
        {
            var width = 0f;

            if (chooseType)
            {
                width = Mathf.Max(width, LudiqGUI.GetTypeFieldAdaptiveWidth(type, new GUIContent("(Null)")));
            }

            if (showValue)
            {
                width = Mathf.Max(width, LudiqGUI.GetInspectorAdaptiveWidth(metadata.Cast(type)));
            }

            width += Styles.labelWidth;

            return(width);
        }
예제 #2
0
        public float GetWidth()
        {
            var width = 0f;

            if (parent.chooseType)
            {
                width = Mathf.Max(width, LudiqGUI.GetTypeFieldAdaptiveWidth(parent.type, new GUIContent("(Null)")));
            }

            if (parent.showValue)
            {
                width = Mathf.Max(width, LudiqGUI.GetInspectorAdaptiveWidth(parent.metadata.Cast(parent.type)));
            }

            width += SystemObjectInspector.Styles.labelWidth;

            return(width);
        }
        protected override float GetControlWidth()
        {
            var width = 0f;

            if (chooseType)
            {
                width = Mathf.Max(width, LudiqGUI.GetTypeFieldAdaptiveWidth(type));
            }

            if (showValue)
            {
                width = Mathf.Max(width, castedInspector.ControlWidth());
            }

            width += Styles.labelWidth;

            return(width);
        }
예제 #4
0
 public override float GetAdaptiveWidth()
 {
     return(LudiqGUI.GetTypeFieldAdaptiveWidth((Type)metadata.value));
 }