Search Unity

Bug ICleanupBufferElementData doesn't get added to the Ghost using baker

Discussion in 'NetCode for ECS' started by Opeth001, Jan 5, 2024.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,113
    Hello everyone,

    When an ICleanupBufferElementData is added to a Ghost via authoring, the buffer is ignored and not added to the entity. However, replacing the ICleanupBufferElementData with IBufferElementData resolves the issue, enabling the buffer to be added correctly.
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,759
    ICleanup components can't be baked, they can only be added at runtime.
     
    NikiWalker, te_headfirst and Opeth001 like this.
  3. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,113
    Thanks! That's something I didn't see in the documentation. I guess it means it's not possible to use an ICleanup component as a ghost component.
     
    te_headfirst likes this.
  4. te_headfirst

    te_headfirst

    Joined:
    Aug 1, 2023
    Posts:
    18
  5. cort_of_unity

    cort_of_unity

    Unity Technologies

    Joined:
    Aug 15, 2018
    Posts:
    98
    Will do!
    FWIW cleanup components also get stripped out during instantiation. Both behaviors are intended, for capital-R Reasons, but this is definitely not an intuitive consequence given the usual usage of cleanup components, and deserves more docs coverage.
     
    te_headfirst likes this.