protected void DrawId() { EditorGUI.BeginChangeCheck(); EditorGUILayout.PropertyField(idProperty); if (EditorGUI.EndChangeCheck()) { BindingInfoTracker.RefreshBindingInfoDrawers(); } }
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(); } } }
protected virtual void OnDisable() { BindingInfoTracker.RefreshBindingInfoDrawers(); }
protected virtual void OnEnable() { expectedTypeProperty = serializedObject.FindProperty("expectedType"); idProperty = serializedObject.FindProperty("id"); BindingInfoTracker.RefreshBindingInfoDrawers(); }