Skip to content

Can't do operations on NetworkList with no NetworkManager (offline) #2539

Open
@PitouGames

Description

@PitouGames

Description

When using a NetworkList with no NetworkManager in scene (in my solo mode), operations on the list (add, insert, remove, clear...) throws an NullReferenceException.
This is because of the use of m_NetworkBehaviour that hasn't been initialized.

NetworkVariable<T> doesn't suffer from this behaviour because a check on m_NetworkBehaviour is made.

Actual Outcome

A null reference exception is thrown an the operation is not done.

Expected Outcome

The operation is done.

Environment

  • OS: Windows 11
  • Unity Version: 2021.3.22f1
  • Netcode Version: develop (and all previous versions)
  • Netcode Commit: dfd08d8

Metadata

Metadata

Assignees

No one assigned

    Labels

    TrackingHas been added to trackingstat:awaiting-responseAwaiting response from author. This label should be added manually.stat:importedStatus - Issue is tracked internally at Unitytype:bugBug Reporttype:featureNew feature, request or improvementtype:feature-2.xNew NGO 2.0.0 feature, request or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions