Search Unity

Feedback Request to merge different ghost prefab with same archetype into same chunk

Discussion in 'NetCode for ECS' started by optimise, Feb 5, 2024.

  1. optimise

    optimise

    Joined:
    Jan 22, 2014
    Posts:
    2,129
    I would like official to improve netcode to merge different ghost prefab with same archetype into same chunk instead of currently each new ghost prefab with same archetype will go into completely new chunk. The use case is game designer always would like to create different ghost prefabs with same archetype that only some data of componenst are slightly different and/or just different visual but doing this will greatly affect performance. Hopefully official can improve it at 1.3 or later.
     
  2. NikiWalker

    NikiWalker

    Unity Technologies

    Joined:
    May 18, 2021
    Posts:
    316
    EDIT: I'm mistaken, see Cristian's answer below. It's by design.
     
    Last edited: Feb 5, 2024
    optimise likes this.
  3. CMarastoni

    CMarastoni

    Unity Technologies

    Joined:
    Mar 18, 2020
    Posts:
    895
    we are doing that intentionally because of the way the serialization code is written. We do that on both server and client. That would require removing the GhostType shared component and change the way we iterate over the chunks and apply different serialization etc to ghosts as we go, instead of assuming the same serialization applied to the whole archetype.
    It is a medium size of work, especially client side to cover all the cases.
     
    optimise likes this.