suriyun-production / mmorpg-kit-docs

This is document for MMORPG KIT project (https://www.assetstore.unity3d.com/#!/content/110188?aid=1100lGeN)
https://suriyun-production.github.io/mmorpg-kit-docs
49 stars 11 forks source link

[Bug] Do Not Destroy When Disconnect (Lite Net Lib Identity) #2455

Closed Eniotnacram closed 1 month ago

Eniotnacram commented 2 months ago

It looks like the Do Not Destroy When Disconnect bool on the Lite Net Lib Identity is not working. (On player character).

When I enable the bool, it doesnt keep my character in map server on disconnection.

insthync commented 2 months ago

It may be changed by my codes, did you check it?

Eniotnacram commented 2 months ago

I have not, I will check it after work.

Eniotnacram commented 2 months ago

Map Server disconnection logic is not using that bool at all. I will try to implement it with calle's help.

insthync commented 1 month ago

You are wrong, the disconnect logic uses it to not destroy the character immediately when the player leaves.

It works as intended, read codes in MapNetworkManager -> OnPeerDisconnected you will see the NetworkDestroy is being used, which means it is forced to be destroyed.

Eniotnacram commented 1 month ago

You are right, sorry for this, its implemented, I simply need to modify it for my use case.

Thanks!