Skip to content

fix: INetworkMessageILPP failing to output registration code for network messages #2256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ShadauxCat
Copy link
Collaborator

There were two issues at play here:

  1. We were looking for netstandard.dll with a simple single-layer-deep assembly reference search. In our development environments, apparently our assemblies all have it as a direct reference. In some users' environments, it's not. The search was updated to be recursive.
  2. Apparently in some environments, Type and List<> aren't even defined in netstandard.dll anyway... so I reverted those things back to importing using typeof(), which should be safe and ok for system types since they don't have any differences in structure based on conditional compilation... so netstandard.dll isn't even needed anymore, but I kept the change from part 1 because it's "more correct" anyway and will prevent us from potentially hitting any future edge cases involving assemblies that have indirect references to assemblies we need to import.

Testing and Documentation

  • No tests have been added.
  • No documentation changes or additions were necessary.

@ShadauxCat
Copy link
Collaborator Author

ShadauxCat commented Oct 13, 2022

Found out what was different about other users' environments - affected users were using .NET Framework instead of .NET Standard 2.1 in their player settings. That affects the locations of system types. Importing system types using typeof() instead of trying to look for them manually makes us immune to that variance.

Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity left a comment

Choose a reason for hiding this comment

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

LGTM!
💯

@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) October 13, 2022 23:35
@NoelStephensUnity NoelStephensUnity merged commit 8d22187 into develop Oct 13, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/inetworkmessageilpp_not_producing_output branch October 13, 2022 23:41
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
…ork messages (Unity-Technologies#2256)

* fix
Resolves the issue where NetworkMessageILPP was failing for users using different API Compatibility Settings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants