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(); }
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(); } }
protected override void DrawInspector() { DrawDefinitionField(); if (HasValidDefinition) { RagdollProfileEditorUtility.RefreshBoneDictionaryKeys(factorsDictionary, definitionProperty, (SerializedProperty newValue) => newValue.floatValue = 1); DrawFactors(); } }
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); }