Invalid Destroy Error in DA When Changing Scenes #3144
Labels
priority:high
This issue has high priority and we are focusing to resolve it
stat:Investigating
Issue is currently being investigated
type:bug
Bug Report
Description
In Distributed Authority (DA) topology, when I spawn objects using
NetworkObject.Spawn(destroyWithScene: true)
, then change scene as SessionOwner usingNetworkManager.SceneManager.LoadScene("Lobby", LoadSceneMode.Single)
, the network objects owned by the clients are correctly destroyed, but the SessionOwner receives an error:Destroy a spawned NetworkObject on a non-owner client is not valid during a distributed authority session.
Additionally, unchecking Scene Migration Synchronization on the NetworkObject was required, even though in my opinion it should be irrelevant when
destroyWithScene: true
is set.Reproduce Steps
destroyWithScene: true
.NetworkManager.SceneManager.LoadScene("Lobby", LoadSceneMode.Single)
.Actual Outcome
Expected Outcome
destroyWithScene: true
was explicitly set.Screenshots
NetworkObject on an object owned by a client:
Environment
Additional Context
As far as I know, the player object has to be destroyed by each client manually, where as other spawned network objects should be destroyed automatically on scene change if
destroyWithScene: true
. Please correct me if I'm wrong.The text was updated successfully, but these errors were encountered: