When to use PersistentComponent!?

Hi

This might be a stupid and vague question, but if a component that is not going to change like the Mass component, BoundingRadius component, or ModelInfo component,… would you make them a persistent component or rather make them in-memory component and set them at runtime? (supposing there is a straight way to set them up at runtime)

The question comes down to how you know the entity needs Mass to add it back.

…and that implies a dependency that was maybe unnecessary if you’d just stored the component.

Suppose that entity has a blueprint and those properties are defined in the blueprint.

So the physics engine doesn’t need mass… it can just look for blueprints?

The issue is that you are essentially saying “for this object to have mass it MUST have a blueprint… even if it doesn’t make sense.” You’ve created a limitation where one wasn’t before.

1 Like

I see. That makes sense. Thanks so much for the help :slightly_smiling_face:

1 Like