This repository has been archived by the owner on Jun 10, 2022. It is now read-only.
Changing an actor's parent immediately after creation results in unpredictable behavior #728
Labels
V2
To be included in version 2
If you create an Actor and change its parent before the created promise completes, things seem fine. The update will be sent and the change will take effect in the Unity runtime as expected. However, moments later when the object-spawned reply to the actor creation is received, it may reset the parentId property on the Actor to the original value.
Whether the object-spawned message contains the original or modified parentId appears to be dependent on timing.
If the parentId is overwritten with an incorrect value in this way, the defect may not be immediately obvious. The Actor is parented on the Unity side as expected and the SDK just has the wrong parent value. It becomes apparent when subsequent attempts to re-parent the Actor to its original parent are ignored, because the incorrect parent value causes them to be treated as a noop.
The text was updated successfully, but these errors were encountered: