Search Unity

Feedback Hide deprecated methods and properties

Discussion in 'Editor & General Support' started by Peter77, Oct 29, 2020.

  1. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    I would appreciate if you could hide more deprecated methods from code-completion, just like you did with many deprecated properties in UnityEngine.Component, to get rid of all the old clutter.
    Code (CSharp):
    1. [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
    2. [Obsolete("Property rigidbody has been deprecated. Use GetComponent<Rigidbody>() instead. (UnityUpgradable)", true)]
    3. public Component rigidbody
    Decorating a method or property with the EditorBrowsable(EditorBrowsableState.Never) attribute causes Visual Studio (and other IDE's of course), do not display it anymore.

    For example, UnityEngine.Random does not hide obsolete methods at the moment:
    upload_2020-10-29_6-58-14.png
    https://github.com/Unity-Technologi...Runtime/Export/Random/Random.bindings.cs#L100
     
    yooglory and JoNax97 like this.