protected virtual void AutoFindViewModelBinding(SerializedProperty bindingProperty) { ActionEvent actionEvent = serializedObject.targetObject as ActionEvent; bindingProperty.objectReferenceValue = actionEvent.GetComponentInParent <ViewModelBinding>(); serializedObject.ApplyModifiedProperties(); }
protected virtual void OnEnable() { bindingProperty = serializedObject.FindProperty("viewModelBinding"); if (bindingProperty.objectReferenceValue == null) { ActionEvent actionEvent = serializedObject.targetObject as ActionEvent; bindingProperty.objectReferenceValue = actionEvent.GetComponentInParent <ViewModelBinding>(); serializedObject.ApplyModifiedProperties(); } SerializedProperty memberNameProperty = serializedObject.FindProperty("memberNameArray"); memberDataList = new ReorderableList(serializedObject, memberNameProperty, true, true, true, true); memberDataList.drawHeaderCallback += DrawMemberHeader; memberDataList.drawElementCallback += DrawMemberDataListElement; }