Attached token not storing entity for later

Hi, I'm having some strange behavior.

Attached can get called way alter for an Entity when a new client connects and has to get all the Attaches from object already in the scene.

If we Bolt instantiated it with a token that has a BoltEntity in it, this entity is null when it's received by new clients later on.

Is this expected? Thought we could use this as a way to tie back the game player to other entities we create.

Comments

  • Please send repro to support@boltengine.com
  • vlab22
    vlab22
    edited April 2017
    Same problem here, but what happens is a delay.
    I solved using a coroutine + while to wait boltentity token not be null. <= not works, always null

    I
  • dev001
    dev001
    edited July 2017
    Has this been fixed?

    The repro is just using an AttachToken with a BoltEntity member variable, when client connect later on and receive the Attached() for those objects, the BoltEntity variable in the token is always null, even if the BoltEntity is still in the game.

    We use this when BoltNetwork.Instantiate an entity that when it attaches it parent to another BoltEntity that's already in the game.

    Since having that parent BoltEntity in the AttachToken doesn't work we have to do pretty ugly workaround waiting for some state BolyEntity variable to replicate later.

    If there is a better way to do this? But I would think passing the BoltEntity in the AttachToken would be the best way.