Skip to content

Fix NetworkInformationPreview disposal error#4120

Closed
miwarnec with Copilot wants to merge 3 commits into
masterfrom
copilot/add-fix-to-networkinformationpreview
Closed

Fix NetworkInformationPreview disposal error#4120
miwarnec with Copilot wants to merge 3 commits into
masterfrom
copilot/add-fix-to-networkinformationpreview

Conversation

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Unity logs "Mirror.NetworkInformationPreview was not disposed properly. Make sure that base.Cleanup is called" because ObjectPreview subclasses must call base.Cleanup() when disabled.

  • Add OnDisable() => base.Cleanup() to NetworkInformationPreview

@miwarnec

Copy link
Copy Markdown
Collaborator

@copilot move changes to the bottom of the file

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot move changes to the bottom of the file

Moved to the bottom of the class in commit move OnDisable cleanup to bottom of NetworkInformationPreview class.

Copilot AI requested a review from miwarnec July 11, 2026 00:08
@miwarnec

Copy link
Copy Markdown
Collaborator

@copilot check failing signals

Copilot AI commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot check failing signals

The CI failure was because ObjectPreview.Cleanup() doesn't exist in Unity 2020.3. Wrapped the call with #if UNITY_2021_3_OR_NEWER to fix it.

@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 42.22%. Comparing base (31163ab) to head (776e75f).

Files with missing lines Patch % Lines
Assets/Mirror/Editor/NetworkInformationPreview.cs 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4120      +/-   ##
==========================================
- Coverage   42.22%   42.22%   -0.01%     
==========================================
  Files         156      156              
  Lines       15100    15101       +1     
==========================================
  Hits         6376     6376              
- Misses       8724     8725       +1     
Flag Coverage Δ
unittests 42.22% <0.00%> (-0.01%) ⬇️
unity-6000.5.1f1 42.22% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
Assets/Mirror/Editor/NetworkInformationPreview.cs 0.00% <0.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@miwarnec

Copy link
Copy Markdown
Collaborator

DOES NOT FIX IT

@miwarnec miwarnec closed this Jul 11, 2026
@miwarnec miwarnec deleted the copilot/add-fix-to-networkinformationpreview branch July 11, 2026 09:07
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.

2 participants