#Distributed Authority not distributing

1 messages · Page 1 of 1 (latest)

void tide
#

Unity 6.2, Netcode 2.6.0

Hi! For some reason my networkobjects do not want to redistribute - Client 3 here is long gone, the only remaining client is Client 10 (me), but for some reason this enemy here isn't getting redistributed to me

magic pulsar
#

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?

void tide
#

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 )

magic pulsar
#

Sounds like some weird bug. Are you using the Sessions API to start the session?

void tide
#

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);
magic pulsar
#

Is the network manager using the DA Transport?

void tide
#

yeah

magic pulsar
#

Does it still happen in the DA Quickstart sample scene

#

You can get it from the Multiplayer Center window

void tide
#

Lemme see

void tide
#

Not sure which one you mean that would be DA compatible 🤔

magic pulsar
#

in the quickstart hosting section of the Multiplayer Center

void tide
#

Oh hmm I don't have the hosting tab there

magic pulsar
#

oh change the hosting model to Distributed Authority in the recommendation tab

void tide
#

Ah, thx mustve missed that, I'll have to come back to this 2morrow because it's getting quite late here

void tide
#

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

magic pulsar
void tide
#

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

magic pulsar