Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Resolved Reference source code on github is outdate

Discussion in 'Documentation' started by dimmduh1, May 21, 2021.

  1. dimmduh1

    dimmduh1

    Joined:
    Feb 5, 2021
    Posts:
    24
    LooperVFX and oscarAbraham like this.
  2. duck

    duck

    Unity Technologies

    Joined:
    Oct 21, 2008
    Posts:
    358
    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: https://forum.unity.com/forums/scripting.12/

    It's possible a Unity dev from the scripting team could see it and give more information.
     
  3. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    182
    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:
    upload_2021-6-20_15-5-40.png
    Current reality, June 2021:
    upload_2021-6-20_14-58-22.png
     

    Attached Files:

    Last edited: Jun 20, 2021
  4. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    182
    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: https://docs.unity3d.com/2019.4/Documentation/ScriptReference/Transform.html
    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:
    https://github.com/Unity-Technologi...ransform/ScriptBindings/Transform.bindings.cs

    (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.
     
    Last edited: Jun 21, 2021
  5. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    237
    I dont have anythin to add that has not been said by landon so Im just putting my +1 here
     
    LooperVFX likes this.
  6. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    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.
     
    skiplist, josh_dreemar, andyz and 3 others like this.
  7. WeirdBeardDev

    WeirdBeardDev

    Joined:
    Feb 16, 2013
    Posts:
    14
    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.
     
    april_4_short likes this.
  8. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    833
    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?
     
    april_4_short and LooperVFX like this.
  9. SugoiDev

    SugoiDev

    Joined:
    Mar 27, 2013
    Posts:
    395
    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.
     
  10. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    182
    it's time to put the decompiled C# source back up and cause a nuisance. ¯\_(ツ)_/¯
     
    M_R, Neto_Kokku, JohnTomorrow and 3 others like this.
  11. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,092
  12. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    934
  13. BlackclawsK

    BlackclawsK

    Joined:
    Jan 9, 2019
    Posts:
    100
    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.
     
    Last edited: Sep 9, 2021
    LooperVFX and Ruchir like this.
  14. LooperVFX

    LooperVFX

    Joined:
    Dec 3, 2018
    Posts:
    182
    well, there's one way to find out... :D
     
  15. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,371
    @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?
     
  16. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    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: https://github.com/Unity-Technologies/UnityCsReference and there are branches for other releases.
     
  17. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,371
    Woohoo! Thanks, you're the best.
     
  18. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Henrik is, I'm just a local social media communicator device :)
     
  19. Catsoft-Studios

    Catsoft-Studios

    Joined:
    Jan 15, 2011
    Posts:
    708
    \[T]/ Praised be the Sun, you and Henrik then!
     
    LooperVFX and henrikpAtUnity like this.
  20. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    833
    Amazing, thank you so much! :)
     
    LooperVFX likes this.