Skip to content

Add support for detecting Unity CoreCLR and IL2CPP on .NET - #948

Open
jeanclaudegrenier wants to merge 2 commits into
SteamDatabase:mainfrom
jeanclaudegrenier:unity/add-coreclr-detection
Open

jeanclaudegrenier wants to merge 2 commits into
SteamDatabase:mainfrom
jeanclaudegrenier:unity/add-coreclr-detection

Conversation

@jeanclaudegrenier

Copy link
Copy Markdown

SteamDB app page links to a few games using this

Unity just released an alpha for Unity 7 using CoreCLR, to our knowledge no games have been published with CoreCLR/il2cpp on .net bcl yet. We wanted to land this change as early as possible so we can tell when such games do start landing.

Brief explanation of the change

Adds two SDK detections for Unity's .NET (CoreCLR) runtime:

  • SDK.UnityCoreCLR: Unity.Private.Scripting.dll in _Data/Managed/ (or Contents/Resources/Data/Managed/ on macOS). It only ships in players built with the CoreCLR scripting backend. Copies in _BackUpThisFolder_ButDontShipItWithYourGame/ and Library/Bee/ are deliberately not matched.
  • SDK.UnityIL2CPPNet: il2cpp_data/Resources/System.Private.CoreLib.dll-resources.dat. It only ships in IL2CPP players built against the .NET class libraries, and complements the existing SDK.UnityIL2CPP.

SDK.UnityCoreCLR matches Unity.Private.Scripting.dll in the player's
<Game>_Data/Managed (or macOS Contents/Resources/Data/Managed) folder,
which only ships with the CoreCLR scripting backend.

SDK.UnityIL2CPPNet matches il2cpp_data/Resources/
System.Private.CoreLib.dll-resources.dat, which only ships with IL2CPP
builds made against the .NET class libraries.
Comment thread rules.ini Outdated
trueSKY = (?:^|/)TrueSky(?:PluginRender_MT|PluginRender_MD|UI_MD)\.dll$
Ultraleap = (?:^|/)LeapC?\.dll$
UnityBurst = (?:^|/)lib_burst_generated\.(?:dll|so|bundle)$
UnityCoreCLR = (?:^|/)(?:[^/]+_Data|Contents/(?:Resources/)?Data)/Managed/Unity\.Private\.Scripting\.dll$

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the generated test strings, this regex isn't great
just looking for Managed/Unity.Private.Scripting.dll isn't enough?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent was to be as specific as possible to avoid false positives, but yes, your version would work.
Would you like me to make that change?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you don't consider this app as a false positive https://steamdb.info/depot/3157091/ then yeah you switch to the smaller version
(this isn't the only app that has it "directly" in their depot's root, out of 21 apps currently detected 8 have it)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed it internally, I believe you are right, Managed/Unity.Private.Scripting.dll should be sufficient. I went ahead and made the change and updated the tests.

@SteamDB-Tracker

Copy link
Copy Markdown
Member

After running changed rules in this pull request (this bot only tests rules.ini changes):

Changed technologies: SDK.UnityCoreCLR, SDK.UnityIL2CPPNet

These apps now match: (13) 1149050 2331730 4127690 4231410 4502310 4601030 4800690 4831540 4940540 5206180 5269730 5476390 5520370

Please confirm that all these changed apps are correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

3 participants