示例#1
0
            void OnAdd()
            {
                var key = m_PropertyElement.GetTarget <NewSetValue>().Value;

                m_Set.Add(key);
                m_ShowAddKeyContainerButton.Show();
                m_AddValueContainer.Hide();
                m_PropertyElement.ClearTarget();
                m_Reload.Reload();
            }
示例#2
0
        public void TypeWithCustomInspector_WhenNoSpecializedInspectorExists_UsesDeclaredTypeInspector()
        {
            var element  = new PropertyElement();
            var instance = new ASD();

            instance.Type = new NoInspectorDerivedType();
            element.SetTarget(instance);
            Assert.That(element.Q <Label>(className: BaseType.Label).text, Is.EqualTo(nameof(BaseType)));
            element.ClearTarget();
            instance.Type = new HasInspectorDerivedType();
            element.SetTarget(instance);
            Assert.That(element.Q <Label>(className: BaseType.Label).text, Is.EqualTo(nameof(HasInspectorDerivedType)));
        }