Skip to content

IsOwner false on a NetworkBehaviour with 'NetworkObject that has IsOwner = True' #3210

Open
@MaybeKush

Description

@MaybeKush

Description

I have a class Fighter inheriting from NetworkBehaviour. Then a more specific class for the Fighter innheriting from Fighter. That class is attached to an object with NetworkObject component attached. I start server, spawn the object on Server (dynamically) with ownership = client (btw I spawn this new NetworkObject by Instantiating it under our Player default object, which is spawned by Network Manager under the Default Player Prefab field. Then after Instantiating it under that, only 1 line after I spawn it on the Network using its NetworkObject through the server). NetworkObject says IsOwner true, NetworkBehaviour script says IsOwner = false.

Reproduce Steps

Idk the steps exclusively. Though it could be related to Inheriting or how I instantiated it.

Actual Outcome

IsOwner is false on NetworkBehaviour but true on NetworkObject.

Expected Outcome

IsOwner should have been true in both NetworkObject and all NetworkBehaviours attached to it.

Screenshots

Image
Console is logging IsOwner from the NetworkBehaviour script

Environment

  • OS: Windows 10
  • Unity Version: 6000.0.24f1
  • Netcode Version: 2.2.0
  • Netcode Commit: Idk specifically, but the Package manager says released on December 16, 2024

Metadata

Metadata

Labels

priority:mediumThis issue has medium priority and may take some time to be resolvedstat:awaiting-responseAwaiting response from author. This label should be added manually.stat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions