jacobdufault / fullinspector

Full Inspector supercharges Unity's inspector
MIT License
110 stars 27 forks source link

Multi Selecting prefabs and changing color field causes exception #209

Open TheLouisHong opened 7 years ago

TheLouisHong commented 7 years ago

Stacktrace

Setting normalized color with a non-normalized color: RGBA(255.000, 255.000, 0.000, 1.000)
UnityEditor.EditorGUI:ColorField(Rect, GUIContent, Color)
FullInspector.Modules.ColorPropertyEditor:Edit(Rect, GUIContent, Color, fiGraphMetadata) (at Assets/FullInspector2/Modules/Common/Editor/CommonPropertyEditors.cs:233)
FullInspector.PropertyEditor`1:FullInspector.IPropertyEditorEditAPI.Edit(Rect, GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/IPropertyEditor.cs:75)
FullInspector.PropertyEditorExtensions:DoEditSlow(IPropertyEditorEditAPI, Rect, GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193)
FullInspector.PropertyEditorExtensions:Edit(IPropertyEditor, Rect, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87)
FullInspector.Internal.fiEditorGUI:EditPropertyDirect(Rect, InspectedProperty, Object, fiGraphMetadataChild, Object) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:336)
FullInspector.Internal.fiEditorGUI:EditProperty(Rect, Object, InspectedProperty, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/fiEditorGUI.cs:346)
FullInspector.Internal.ReflectedPropertyEditor:EditProperty(Rect&, Object, InspectedProperty, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:163)
FullInspector.Internal.ReflectedPropertyEditor:EditInspectedMember(Rect&, Object, InspectedMember, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:223)
FullInspector.Internal.ReflectedPropertyEditor:EditPropertiesButtons(GUIContent, Rect, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:272)
FullInspector.Internal.ReflectedPropertyEditor:Edit(Rect, GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/PropertyEditors/ReflectedPropertyEditor.cs:324)
FullInspector.PropertyEditorExtensions:DoEditSlow(IPropertyEditorEditAPI, Rect, GUIContent, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:193)
FullInspector.PropertyEditorExtensions:Edit(IPropertyEditor, Rect, GUIContent, Object, fiGraphMetadataChild) (at Assets/FullInspector2/Core/Editor/IPropertyEditorExtensions.cs:87)
FullInspector.DefaultBehaviorEditor:OnEdit(Rect, Object, fiGraphMetadata) (at Assets/FullInspector2/Core/Editor/DefaultBehaviorEditor.cs:29)
FullInspector.BehaviorEditor`1:Edit(Rect, Object) (at Assets/FullInspector2/Core/Editor/IBehaviorEditor.cs:83)
FullInspector.IBehaviorEditorExtensions:EditWithGUILayout(IBehaviorEditor, Object) (at Assets/FullInspector2/Core/Editor/IBehaviorEditorExtensions.cs:20)
FullInspector.FullInspectorCommonSerializedObjectEditor:ShowInspectorForSerializedObject(Object) (at Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:177)
FullInspector.FullInspectorCommonSerializedObjectEditor:OnInspectorGUI() (at Assets/FullInspector2/Core/Editor/FullInspectorCommonSerializedObjectEditor.cs:193)
UnityEditor.DockArea:OnGUI()

Unity Version: 5.6.1f Personal

SugoiDev commented 7 years ago

I could not reproduce this on Unity 2017.1.0f3. Could you share your monobehavior component that is showing this issue?


Incidentally, multi-edit is a very experimental feature and you might want to disable it if it is giving you trouble. This is a very important feature, but I don't see it receiving the love it needs anytime soon.

If you want to disable it, just put this code in a cs file somewhere:

using FullInspector;
using FullInspector.Internal;

public sealed class FullInspectorSettingsProcessor: fiSettingsProcessor {

    public void Process() {
        fiSettings.EnableMultiEdit = false;
    }

}
TheLouisHong commented 7 years ago

The monobehavior is nothing special, just a plain old color field. The multi-select must happen as prefabs in the project view though. Let's me try to make a project that recreates the bug