#Distributed Authority not distributing
1 messages · Page 1 of 1 (latest)
Huh, having an ownerless object is not really possible. It should default to the session owner. Is client 3 still showing in the connected clients list?
Had to do a quick new test coz I already ended it, in this case client 1 left, client 2 remained
The first image is NetworkManager.Singleton.ConnectedClientsIds displayed in the editor, only client 2 is listed
Yet the enemies are still owned by client 1
( @magic pulsar )
Sounds like some weird bug. Are you using the Sessions API to start the session?
yeah,
var options = new SessionOptions()
{
MaxPlayers = (int)MAX_PLAYERS,
IsPrivate = true,
}.WithDistributedAuthorityNetwork(Authenticate.Region);
session = await MultiplayerService.Instance.CreateSessionAsync(options);
and
session = await MultiplayerService.Instance.JoinSessionByCodeAsync(partyCode.value);
Is the network manager using the DA Transport?
Does it still happen in the DA Quickstart sample scene
You can get it from the Multiplayer Center window
Lemme see
Not sure which one you mean that would be DA compatible 🤔
in the quickstart hosting section of the Multiplayer Center
Oh hmm I don't have the hosting tab there
oh change the hosting model to Distributed Authority in the recommendation tab
Ah, thx mustve missed that, I'll have to come back to this 2morrow because it's getting quite late here
The sample works entirely correctly 🤔
I think I found it? 🤔 The big thing that's different from how we spawn stuff vs the sample is that we do TrySetParent() afterwards
If I don't set the parent it's fixed
That would be a bug then. if the object doesnt despawn with the parent, owner should default back to the session owner or get redistributed
Yeah, the parent doesn't despawn, it's owned by the session owner - In short the game is a room-based dungeon crawler and enemies get parented to their room, mostly just for making the hierarchy more organized, no real mechanical value
So the issue is when the current session owner leaves. the objects that were parented the room are not changing owners? Do the Rooms show the correct owners?