Compact-Unity-Events icon indicating copy to clipboard operation
Compact-Unity-Events copied to clipboard

Impossible to revert or apply prefab property overrides

Open lgarczyn opened this issue 1 year ago • 0 comments

This is a screenshot from a modified prefab instance. The event has been modified, then the modifications have been removed

However, as expected, the prefab override persist. It should be removable by doing right-click => reset, but no right click options appear

image

The blue marker for a prefab property override is hidden by the event box, with only one blue pixel visible

In the override list, the same issue persists:

image

This can be fixed in DrawListHeader

            // Header
            {
                // ReSharper disable once CoVariantArrayConversion
                string eventParams = (string)GetEventParams.Invoke(null, new[] { m_DummyEvent });
                string hex = EditorGUIUtility.isProSkin ? "#ffffff70" : "#00000070";
                guiContent.text = (string.IsNullOrEmpty(m_Text) ? "Event" : m_Text) + $"<color={hex}>{eventParams}</color>";

                EditorGUI.BeginProperty(foldoutRect, guiContent, property);
                property.isExpanded = EditorGUI.BeginFoldoutHeaderGroup(foldoutRect, property.isExpanded, guiContent, foldoutHeader);
                EditorGUI.EndFoldoutHeaderGroup();
                EditorGUI.EndProperty();
            }

lgarczyn avatar Oct 18 '23 15:10 lgarczyn