diff --git a/Source/Editor/CustomEditors/CustomEditor.cs b/Source/Editor/CustomEditors/CustomEditor.cs index 7f540b767..c6f62746e 100644 --- a/Source/Editor/CustomEditors/CustomEditor.cs +++ b/Source/Editor/CustomEditors/CustomEditor.cs @@ -377,6 +377,10 @@ namespace FlaxEditor.CustomEditors else if (Values.HasDefaultValue && CanRevertDefaultValue) color = Color.Yellow * 0.8f; LinkedLabel.HighlightStripColor = color; + + // Grey out deprecated members + if (Values.IsObsolete) + LinkedLabel.TextColor = LinkedLabel.TextColorHighlighted = FlaxEngine.GUI.Style.Current.ForegroundGrey; } } diff --git a/Source/Editor/CustomEditors/Values/ValueContainer.cs b/Source/Editor/CustomEditors/Values/ValueContainer.cs index 04bc8bd7c..c6efda318 100644 --- a/Source/Editor/CustomEditors/Values/ValueContainer.cs +++ b/Source/Editor/CustomEditors/Values/ValueContainer.cs @@ -139,6 +139,11 @@ namespace FlaxEditor.CustomEditors /// public bool IsArray => Type != ScriptType.Null && Type.IsArray; + /// + /// True if member or type has that marks it as obsolete. + /// + public bool IsObsolete { get; } + /// /// Gets the values types array (without duplicates). /// @@ -160,6 +165,7 @@ namespace FlaxEditor.CustomEditors { Info = info; Type = Info.ValueType; + IsObsolete = Info.HasAttribute(typeof(ObsoleteAttribute), true); } ///