Different Layer Types as Different Components or a Single Enum Component
The relationship between an entity and a component is 1-to-1 (zero or one). So it is not possible to add multiple instances of the same component to the same entity. But if we make a component for each different layer type a layer entity can potentially have multiple of these components on it and this would create an ambiguity.
Instead if we model it as a single enum component each entity can have at most one type of layer at most.
[x] Create HeightMap component.
[x] Add enable preview and enable bake toggles to Layer.
[x] Extend add layer command to include the HeightMap component to the entity created.
A layer that evaluates to a constant value.
This will be part of the new project template.
0
is a good defaut value but it should be possible to use other values. Both as a default elevation and also to be mixed in with masks.Main Purpose of a Layer is Calculating Heights
Sample2D
trait.Different Layer Types as Different Components or a Single Enum Component
The relationship between an entity and a component is 1-to-1 (zero or one). So it is not possible to add multiple instances of the same component to the same entity. But if we make a component for each different layer type a layer entity can potentially have multiple of these components on it and this would create an ambiguity.
Instead if we model it as a single enum component each entity can have at most one type of layer at most.
HeightMap
component.Layer
.HeightMap
component to the entity created.UI