Skip to content

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

Merged
NoelStephensUnity merged 10 commits intodevelopfrom
fix/inetworkmessageilpp_not_producing_output
Oct 13, 2022
Merged

fix: INetworkMessageILPP failing to output registration code for network messages#2256
NoelStephensUnity merged 10 commits intodevelopfrom
fix/inetworkmessageilpp_not_producing_output

Conversation

@ShadauxCat
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

@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