Pages in both the old school and the package docu are lacking something very important: the version that the struct/class/method was introduced.
Unity changes to rapidly that this is essential to find compatible package.
On the normal docs, the version dropdown has “versions with this page” and “versions without this page”.
It’s not perfect, as it means that the docs were introduced in that version, rather than the type/member/function, but it’s better than nothing. Having actually “version introduced in” is probably going to take a lot of backtracking work if it’s not already written down, since somebody would have to manually check everything!
For api docs,
here’s Greasemonkey script to display first added version on the page:
(it just takes the last item from that dropdown menu)
How do I use it?
- Install https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
- Click the greasemonkey icon in firefox toolbar, select New User Script
- Take raw script source from https://gist.github.com/unitycoder/48b46d0192e2cce356c2731c8f274880#file-unitydocsshowfirstversionadded-cs
- Paste into user script, Save
- Refresh docs page, like https://docs.unity3d.com/ScriptReference/LowLevel.PlayerLoop.html
*might have some bugs still, it doesnt do any error checking…
nice!!
thanks!
(it’s called tampermonkey on brave)
ok, so the same script runs there without modifications needed? good to know.
for the original request,
unity could literally just add few lines of code, to do the same from their side…
Nice. Thanks
nice it’s working.
script updated, to handle those version specific pages, like:
https://docs.unity3d.com/**2023.3**/Documentation/ScriptReference/Collider2D.ClosestPoint.html
previously only these urls would trigger it:
Thanks! Super useful.