Detached not called on server

If a client loses connection or just shuts down then I get eg :
Detached [Entity [NetworkId 0-0-0-3-0-0-0-2] MulletState]
in the server console, but the Detached() method is not called on the server entity.
Is this correct behaviour? How can I deal with this gracefully?

Comments

  • I have found that:

    public override void EntityDetached(BoltEntity entity)

    is called on the server, though Detached() is not called on the entity when a client disconnects.
    Also, after EntityDetached is called then the entity is not null but causes an exception if accessed eg:

    BoltException: You can't access any Bolt specific methods or properties on an entity which is detached
    BoltEntity.get_Entity ()
    BoltEntity.get_isOwner ()

    Also entity.isAttached is still true.
    Is there any way to detect if the entity is detached?
  • I'm not sure off the top of my head if this is by design. I would open an issue on Github so we can take a closer look.
Sign In or Register to comment.