Skip to content

fix: Add ILPP error-handling to catch managed INetworkSerializables that don't meet the new() constraint so they won't crash the editor [MTT-6211]#2528

Merged
ShadauxCat merged 6 commits intodevelopfrom
fix/editor_crash_with_invalid_inetworkserializable
May 2, 2023
Merged

fix: Add ILPP error-handling to catch managed INetworkSerializables that don't meet the new() constraint so they won't crash the editor [MTT-6211]#2528
ShadauxCat merged 6 commits intodevelopfrom
fix/editor_crash_with_invalid_inetworkserializable

Conversation

@ShadauxCat
Copy link
Copy Markdown
Collaborator

@ShadauxCat ShadauxCat commented Apr 25, 2023

fixes #2445

Changelog

  • Fixed: Making a NetworkVariable with an INetworkSerializable type that doesn't meet the new() constraint will now create a compile-time error instead of an editor crash

Testing and Documentation

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

…hat don't meet the `new()` constraint so they won't crash the editor
@ShadauxCat ShadauxCat requested a review from a team as a code owner April 25, 2023 18:17
@ShadauxCat ShadauxCat changed the title fix: Add ILPP error-handling to catch managed INetworkSerializables that don't meet the new() constraint so they won't crash the editor fix: Add ILPP error-handling to catch managed INetworkSerializables that don't meet the new() constraint so they won't crash the editor [MTT-6211] Apr 25, 2023
Comment thread com.unity.netcode.gameobjects/Editor/CodeGen/NetworkBehaviourILPP.cs Outdated
…LPP.cs

Co-authored-by: Fatih Mar <mfatihmar@gmail.com>
@ShadauxCat ShadauxCat enabled auto-merge (squash) May 2, 2023 17:26
@ShadauxCat ShadauxCat merged commit 26d75b2 into develop May 2, 2023
@ShadauxCat ShadauxCat deleted the fix/editor_crash_with_invalid_inetworkserializable branch May 2, 2023 18:36
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.

Having no default constructor in a INetworkSerializable class crashes the editor without any information

2 participants