Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix: avoid throwing exception when using NetworkList without a NetworkManager (#2539) #2540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
Loading
from

Conversation

PitouGames
Copy link
Contributor

@PitouGames PitouGames commented Apr 30, 2023

Resolve #2539

This PR add a check that m_NetworkBehaviour is not null before calling the CanClientWrite function.

I did it exactly the same way it's already done for NetworkVariable.

With this PR, operations on the list are done and throws the anyoning warning ( NetworkVariable<T> do the same)

image

Changelog

Testing and Documentation

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

@PitouGames PitouGames requested a review from a team as a code owner April 30, 2023 21:41
@PitouGames PitouGames force-pushed the fix/offline-network-variable branch from 6081b6e to b1feb94 Compare May 2, 2023 20:57
@0xFA11 0xFA11 requested a review from jeffreyrainy May 2, 2023 21:10
@michalChrobot michalChrobot added stat:awaiting-triage Status - Awaiting triage from the Netcode team. and removed stat:awaiting-triage Status - Awaiting triage from the Netcode team. labels Jan 16, 2025
@PitouGames PitouGames force-pushed the fix/offline-network-variable branch from 8dc63f2 to 844acdb Compare April 19, 2025 09:25
Copy link
Collaborator

@EmandM EmandM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution and your patience on this review.

To be able to land this PR we will also need a forward-port PR for the develop-2.0.0 branch as we cannot have bug fixes in older versions that are not also in newer versions.

@PitouGames PitouGames force-pushed the fix/offline-network-variable branch from 844acdb to fd18093 Compare May 27, 2025 23:03
@EmandM
Copy link
Collaborator

EmandM commented Jun 2, 2025

Thanks for the update! Just to check that we're not landing an incomplete fix, have you used this branch with your project? Does it resolve the issue you're needing resolved?

@PitouGames PitouGames force-pushed the fix/offline-network-variable branch from fd18093 to 5e06bf1 Compare June 6, 2025 17:06
@PitouGames
Copy link
Contributor Author

Yes, I do use this fix in my project for two years.
Yes, it resolve the issue.

This PR just adds the same check as you already do in the NetworkVariable here:

if (m_NetworkManager && !CanClientWrite(m_NetworkManager.LocalClientId))

I also have rebased my branch.

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.

Can't do operations on NetworkList with no NetworkManager (offline)
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.