Search Unity

Remove renamed obsolete methods

Discussion in 'Scripting' started by GuusW, Aug 12, 2019.

  1. GuusW

    GuusW

    Joined:
    Aug 3, 2018
    Posts:
    3
    So, obsolete functions like Quaternion.AxisAngle, Quaternion.EulerAngles, Random.RandomRange, etc. seem to still exist in the scripting API.
    Especially in the quaternion case I find myself almost always picking the wrong version and then have to correct it.

    My suggestion its that these functions get removed somewhere on a next major version release.
    Most of them are just renames or can be easily replaced by using another function with radians instead of degrees if somehow someone is still using these obsolete functions.

    It would clean up the scripting API, documentation and make use of auto-complete less annoying for basic math functions.

    Thanks.
     
  2. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    They are still there to not break existing code bases, Unity marking something obsolete tells people to stop using it because it will be removed soon (relativley speaking..)
     
    Vryken likes this.
  3. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    That's the plan.
    When something gets marked as obsolete, it will hang around for awhile so as to not break any projects that used it before it became obsolete.
    At some point - who knows how long - the Unity team will eventually decide to remove these functions entirely.