public override void OnInspectorGUI()
        {
            serializedObject.Update();

            RagdollProfileEditorUtility.DrawDefinitionField_Layout(definition, true);

            hasValidDefinition = RagdollProfileEditorUtility.IsValid(definition);
            if (hasValidDefinition)
            {
                RagdollProfileEditorUtility.RefreshBoneDictionaryKeys(bindingsDictionary, definition);

                NaughtyEditorGUI.BeginBoxGroup_Layout("Bindings");

                EditorGUI.BeginDisabledGroup(Application.isPlaying);
                DrawBindingFields();
                DrawAutoCompleteButton();
                EditorGUI.EndDisabledGroup();

                NaughtyEditorGUI.EndBoxGroup_Layout();

                ValidateNoDuplicateJoints();
                ValidateNoUnassignedBones();
            }

            serializedObject.ApplyModifiedProperties();
        }
示例#2
0
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            UsePropertySetterDrawer.Draw_Layout(profileProperty);
            RagdollProfileEditorUtility.ValidateProfileField_Layout(profileProperty, bindingsDefinition.objectReferenceValue as RagdollDefinition, false);

            serializedObject.ApplyModifiedProperties();
        }
        protected void DrawDefinitionField()
        {
            EditorGUI.BeginChangeCheck();
            RagdollProfileEditorUtility.DrawDefinitionField_Layout(definitionProperty, RequiresDefinition);

            if (EditorGUI.EndChangeCheck())
            {
                OnDefinitionChanged();
            }
        }
示例#4
0
        protected override void DrawInspector()
        {
            DrawDefinitionField();

            if (HasValidDefinition)
            {
                RagdollProfileEditorUtility.RefreshBoneDictionaryKeys(factorsDictionary, definitionProperty,
                                                                      (SerializedProperty newValue) => newValue.floatValue = 1);

                DrawFactors();
            }
        }
示例#5
0
 void DrawProfileField(SerializedProperty property)
 {
     UsePropertySetterDrawer.Draw_Layout(property);
     RagdollProfileEditorUtility.ValidateProfileField_Layout(property, bindingsDefinition.objectReferenceValue as RagdollDefinition, true);
 }
 void RefreshDictionary()
 {
     RagdollProfileEditorUtility.RefreshBoneDictionaryKeys(settingsDictionary, definitionProperty,
                                                           (SerializedProperty newEntry) => newEntry.enumValueIndex = (int)PowerSetting.Powered);
 }