For a given Definition, there may be multiple Prototypes that fit that definition as "Variants".
They are not structurally different (same components etc) but their values differ such that general configuration is not sufficient and it's better to duplicate an existing prototype instead.
Ex. RenderMeshes which have a bunch of SharedComponents to point to the right Mesh/Material combo.
What is the current behaviour?
There is no support for allowing a Variant to be chosen for a given definition.
You'd have to make more specific definitions which doesn't scale.
What is the new behaviour?
You can optionally choose to register a Prototype with a Variant key.
The Variant keys are PrototypeVariant structs (which are just wrapped ints) to allow for Burst to work without polymorphism.
For a given
Definition
, there may be multiplePrototypes
that fit that definition as "Variants".They are not structurally different (same components etc) but their values differ such that general configuration is not sufficient and it's better to duplicate an existing prototype instead.
Ex. RenderMeshes which have a bunch of SharedComponents to point to the right Mesh/Material combo.
What is the current behaviour?
What is the new behaviour?
Prototype
with a Variant key.PrototypeVariant
structs (which are just wrapped ints) to allow for Burst to work without polymorphism.What issues does this resolve?
What PRs does this depend on?
Does this introduce a breaking change?