Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Best place to ReConstruct ClientSide Non-Replicated ComponentData

Discussion in 'NetCode for ECS' started by Opeth001, Nov 28, 2023.

  1. Opeth001


    Jan 28, 2017
    Hello everyone,

    In some scenarios, clients may need to rebuild certain non-replicated ComponentDatas or Fields when a Ghost is initially received from the Server. This is especially relevant for situations where ghost components contain extensive data, like BlobAssetReferences, and have their GhostField configured with SendData = false. The question arises: At which point in the Ghost's lifecycle is it ideal to identify that a new Ghost with a specific component has been spawned and that its predefined components have been updated to the latest received snapshot?
    From my understanding of the documentation, the GhostSpawnSystemGroup handles the spawning of Ghosts, and the NetworkReceiveSystemGroup takes care of updating their associated data. However, it remains unclear where exactly the non replicated data should be reconstructed to ensure its availability within the same frame.
  2. CMarastoni


    Unity Technologies

    Mar 18, 2020
    Opeth001 likes this.