Beispiel #1
0
        protected void DrawId()
        {
            EditorGUI.BeginChangeCheck();
            EditorGUILayout.PropertyField(idProperty);

            if (EditorGUI.EndChangeCheck())
            {
                BindingInfoTracker.RefreshBindingInfoDrawers();
            }
        }
Beispiel #2
0
        protected void DrawExpectedType()
        {
            var  injector        = viewModelComponent.GetComponents <IViewModelInjector>().FirstOrDefault(x => x.Target == viewModelComponent);
            bool shouldShowField = injector == null;

            if (shouldShowField)
            {
                EditorGUI.BeginChangeCheck();

                EditorGUILayout.PropertyField(expectedTypeProperty);

                if (EditorGUI.EndChangeCheck())
                {
                    BindingInfoTracker.RefreshBindingInfoDrawers();
                }
            }
        }
Beispiel #3
0
 public BindingInfoDrawer()
 {
     BindingInfoTracker.Register(this);
 }
Beispiel #4
0
 protected virtual void OnDisable()
 {
     BindingInfoTracker.RefreshBindingInfoDrawers();
 }
Beispiel #5
0
 protected virtual void OnEnable()
 {
     expectedTypeProperty = serializedObject.FindProperty("expectedType");
     idProperty           = serializedObject.FindProperty("id");
     BindingInfoTracker.RefreshBindingInfoDrawers();
 }