Compact-Unity-Events
Compact-Unity-Events copied to clipboard
Impossible to revert or apply prefab property overrides
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
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:
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();
}