Reference source code on github is outdate

Last changes 12 months ago.
I need unity 2021 version.

Unity, can you update?

2 Likes

Hi, Iā€™m sorry, I donā€™t know anything about this repo! It may be worth making a puplic post on the Unity forum in the Scripting section here: Unity Engine - Unity Discussions

Itā€™s possible a Unity dev from the scripting team could see it and give more information.

Possibly, but unlike the posts in that section --this is not a technical question about Scripting. Itā€™s a request to update a reference that we as developers, rely on as a form of documentation similar to and in close conjunction with the Scripting API docs in real world workflows. While itā€™s apparently not managed by the documentation team (or anyone at the moment,) this is a rather special repo that seems to fall in a grey area. Where the Unity Scripting API documentation ends, the Unity C# Reference begins.

The original Unity blog announcement post authored by @Aras in 2018 states ā€œC# reference source code is released under a license which only permits you to read the code, not modify it.ā€ (unlike other published Unity source repos) and that it was released in part to let us see ā€œthe original comments and variable namesā€ (self documenting code / internal documentation made external since it is not distributed with the Editor in readable form) and "for the purpose of understanding or improving your projects made with Unity." (aligned with the purpose of the Scripting API documentation.)

Will you or @Aras do us a huge favor and spare a moment to forward this to the appropriate team / product manager, or someone that knows more? Or maybe @ali_mohebali knows who owns this or knows someone that could own this? (as Ali was so kind to spearhead managing similar, possibly related challenges with Unity Graphics repo. ) It would be greatly appreciated.

Not doing so will end up resulting (and likely already has resulted) in the same problem this repo was created to eliminate: people disassembling the Unity .NET assemblies into C# (legally) and redistributing them (illegally) without any of the helpful variable names and comments.

Expectation set in Unity Blog post, March 2018:


Current reality, June 2021:

4 Likes

If you want to go a step further to enable Unity developers with excellent documentation workflows: integrate or link to the Unity C# reference directly in the Unityā€™s Scripting API documentation. This could also be done for the packages documentation. Hereā€™s an agile / scrum style user story:

"As a developer, when browsing the Unity Scripting API docs, I would like be able to view a particular class or method, and then click on a link that jumps directly to the C# reference code where that class or method is defined, to better understand how it works, how to use it, or reimplement its functionality if needed due to limitations or bugs. It will also help me provide better feedback to Unity about bugs or feature requests, and avoid unnecessary support requests that question limitations or bugs in the Unity C# implementation, requiring a Unity Tech QA specialist to inspect the C# source or consult a Unity Tech developer for clarification."

Example:
The Unity 2019.4 Scripting API documentation page for the Transform class here: Unity - Scripting API: Transform
Would have a link to or otherwise contain the reference code for the Transform class bindings in the 2019.4 branch of the Unity C# Reference here:
UnityCsReference/Runtime/Transform/ScriptBindings/Transform.bindings.cs at 2019.4 Ā· Unity-Technologies/UnityCsReference Ā· GitHub

(This should not remove or replace the functionality available on Github, however. Being able to see the commits and diffs on github is invaluable for us and should be preserved.)

Thank you for your consideration.

5 Likes

I dont have anythin to add that has not been said by landon so Im just putting my +1 here

1 Like

I donā€™t disagree, Iā€™d like the C# reference repo to be ā€œliveā€ again and updated. But it has hit some sort of snag a year ago and has not recovered since then. All the relevant folks are aware of it, hopefully they will resurrect it to be ā€œliveā€ at some point again.

6 Likes

Is there anything the community can do to provide incentive for the powers that be to resurrect repo? It would be great to have a living, breathing reference again.

1 Like

We also routinely use the reference source to fix, understand or circumvent many issues locally, we really miss not having an up to date version.

If itā€™s too much trouble to maintain every version, maybe only LTS versions could be updated?

2 Likes

I use the pre-release versionsā€™ source code all the time to keep track and adapt to incoming changes to mainline versions. It has dramatically reduced issues for me when new Unity versions come around.

This situation with the reference source repo being abandoned is very disappointing, especially after Unity themselves asked MattRix to remove the repository with the decompiled source when they put their own repo online.

3 Likes

itā€™s time to put the decompiled C# source back up and cause a nuisance. ĀÆ_(惄)_/ĀÆ

6 Likes

+11

bump:(

Iā€™m actually wondering a bit why Unity Technologies isnā€™t a bit more straightforward with including the community in engine development. At least the C# part could start accepting pull requests with CLAs signed. Its not like other engines arenā€™t doing the same thing already. Its probably because they want people to pay extra for the source license, however I wouldnā€™t even know how much that costs right now (as its not openly stated).

Its interesting that even two years later there still isnā€™t a way to accept pull requests.

The whole legalese around this makes me wonder whether it would actually be illegal to binary patch the UnityEngine.dll that is shipped with a game or not. If it were illegal that seems a bit weird to me in the first place but then again Unity is a weird beast when it comes to its licensing.

2 Likes

well, thereā€™s one way to find outā€¦ :smile:

@willgoldstone this is causing us some serious pain right now. The reference source hasnā€™t been updated for 16 months. Whatā€™s happening here? Was the plans for having a reference repo killed off, or is there just some internal problem?

6 Likes

Alright! This took way longer than anyone would have liked (sorry), but the unity C# reference source code github repository should be up and running again, will the missing releases filled in. Itā€™s at 2022.1 a13 on the main branch right now: GitHub - Unity-Technologies/UnityCsReference: Unity C# reference source code. and there are branches for other releases.

15 Likes

Woohoo! Thanks, youā€™re the best.

Henrik is, Iā€™m just a local social media communicator device :slight_smile:

6 Likes

[T]/ Praised be the Sun, you and Henrik then!

2 Likes

Amazing, thank you so much! :slight_smile:

1 Like