protected virtual void AutoFindViewModelBinding(SerializedProperty bindingProperty)
        {
            ActionEvent actionEvent = serializedObject.targetObject as ActionEvent;

            bindingProperty.objectReferenceValue = actionEvent.GetComponentInParent <ViewModelBinding>();
            serializedObject.ApplyModifiedProperties();
        }
示例#2
0
        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;
        }