public void GetAttribute_memeberInfo_false() { Type t = typeof(MyBaseTestClass); MyTestAttribute actual = MemberInfoExtensions.GetAttribute <MyTestAttribute>(t, false); Assert.IsNotNull(actual); }
public void GetAttribute() { ParameterInfo pi = GetParameter(); MyTestAttribute actual = ParameterInfoExtension.GetAttribute <MyTestAttribute>(pi); Assert.IsNotNull(actual); }
public void GetAttribute_on_inherited_true() { Type t = typeof(MyDerivedTestClass); MyTestAttribute actual = MemberInfoExtensions.GetAttribute <MyTestAttribute>(t, true); Assert.IsNotNull(actual); }
public override void OnGUI(UnityEngine.Rect position, SerializedProperty property, UnityEngine.GUIContent label) { MyTestAttribute attribute = (MyTestAttribute)base.attribute; property.intValue = Mathf.Min(Mathf.Max(EditorGUI.IntField(position, label.text, property.intValue), attribute.min), attribute.max); }