Mirror
Mirror copied to clipboard
feat: Prevent Nested Network Identities
See also https://github.com/vis2k/Mirror/pull/2869
Uses OnValidate and Reset to prevent users from adding components that would conflict that Unity can't catch on its own:
- NetworkIdentity in same object hierarchy as NetworkManager
- NetworkIdentity in same object hierarchy as another NetworkIdentity (prevents nesting)
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
3 Code Smells
No Coverage information
0.0% Duplication
did a test with benchmark scene and monster prefab.
added a child GO with NetworkIdentity.
press play, server & play.
we already have a check + error:

The point of this PR and #2869 is to block the user at design time, instead of waiting until play mode / run time.