Too many SharedComponentData

I was hoping to add 4 shared components to most of my entities, but once I add the 4th, I get an error saying the max amount of 8 has been exceeded. There are already 5 being added by Unity.

The 3 marked red are mine, the 5 yellow ones are from Unity. Am I able to remove some of them, e.g. is EditorRenderData related to the Live Link Mode (which I thought I’d tured off)?

Or can I override the 8 component limit?

You could edit the package and try increase the value of kMaxSharedComponentCount (which is hard coded to 8 and what limits it). I have no idea what is going to happen though. I’d say it’s generally unwise to have so many shared components but you do you.

3 Likes

Yep, I would also avoid using shared components.
On the side note, is accessing them still can not be bursted?

1 Like

Thanks guys. Not sure about bursted access but all I need them for is filtering by value with an entity query. Most of mine are hierarchical, so the “upper levels” don’t create additional archetypes, i.e. there’s no issues with chunk fragmentation. I think I’ll change one of them to a tag component so I’m within the 8 limit and may remove others down the line if I run into issues.