UnityEditor.MaterialIntRangeDrawer.OnGUI C# (CSharp) Method

OnGUI() public method

public OnGUI ( Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor ) : void
position UnityEngine.Rect
prop MaterialProperty
label UnityEngine.GUIContent
editor MaterialEditor
return void
        public override void OnGUI(Rect position, MaterialProperty prop, GUIContent label, MaterialEditor editor)
        {
            if (prop.type != MaterialProperty.PropType.Range)
            {
                GUIContent content = EditorGUIUtility.TempContent("IntRange used on a non-range property: " + prop.name, EditorGUIUtility.GetHelpIcon(MessageType.Warning));
                EditorGUI.LabelField(position, content, EditorStyles.helpBox);
            }
            else
            {
                MaterialEditor.DoIntRangeProperty(position, prop, label);
            }
        }
    }
MaterialIntRangeDrawer