ICleanupBufferElementData doesn't get added to the Ghost using baker

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.

ICleanup components can’t be baked, they can only be added at runtime.

3 Likes

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.

1 Like

Thanks (again) for pointing this out. Would be great if the unity documentation Create a cleanup component | Entities | 1.0.16 (unity3d.com) stated this clearly :slight_smile:

4 Likes

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.

1 Like