fix: Duplicating null NetworkVariables by EmandM · Pull Request #3891 · Unity-Technologies/com.unity.netcode.gameobjects

Purpose of this PR

Ensure NetworkVariable.Duplicate() doesn't throw an exception if a value is null

Fixes: #3888

Jira ticket

n/a

Changelog

  • Fixed: NestedNetworkVariables initialized with no value no longer throw an error.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Backports