Hello,
I am currently trying to use Mass to handle all NPCs in our project. We are aiming for >1000 NPCs, and we want to run at least some level of simulation on all of them when the player is far.
I used the Mass Representation system to spawn low resolution actors, which are run completely by mass processors; and high-resolution actors, which are just normal Actors, that run scripts, behaviors trees, etc… and just synchronize their data to/from mass fragments.
The issue I am facing right now is that I can’t easily filter on the current actor resolution. I have tried adding a tag, which gets added in a UMassRepresentationActorManagement subclass (which can be switched in Actor representation trait), however I didn’t find a good place to remove the tag without modifying the original plugin.
I know it is possible to add FMassRepresentationFragment to all processors and compare the CurrentRepresentation, however the processors that need to run on high-resolution actors will most likely need to run on game thread, so I am trying to minimize the work they need to do.
- Is it even a good idea to add the tag? Or is there some hidden cost related to
- adding/removing tags
- having a lot of different tags (thus increasing the number of entity archetypes)
- filtering on the tags
- Is there some callback/override that I missed where I could easily remove the tag?