A key mechanic for Kitchen & Curses is foraging for ingredients. The Plant Interaction UI is meant to provide depth: not only do you need to find the plant, but which part of the plant do you need? Which part of the plant needs to be eaten to aid your expedition? This is to provide a layer of mental gymnastics on top of navigating the environment, and in turn makes the environment feel more dense.
The PlantViewerUI is a single composited image of multiple textures.
Each texture can be pulled off the plant, but only in the Layer order that's specified (The stem can't be interacted with until all petals are removed).
Draw order is determined by the order of the Plant Textures list. This list can also be reordered via drag-and-drop.
Editor tools for moving each plant texture are available when assembling the composited image in the inspector. The position field is also accessible for fine tuning.
Density is the amount of UV noise that is applied to a specific texture, helping make the plant feel more natural.
Connection Strength is the amount of force required to pull that portion off the plant.
Single channel mask to give the impression of being eaten.
Mask is rotated per sprite within the plant image - provides visual variability and helps hide consistencies.
Each sprite has a specific number of chews it takes to be eaten.
Each chew is a button input, mimicking chewing behavior.
Same texture for every plant model.
UVs for each plant are organized by alpha channel and color groups.
PlantHolder object holds the state for each alpha group: if that group is eaten, then it's clipped, hiding that portion of the model.
Can be applied to any kind of plant, fruit, etc. Not limited to just a flower.
Plant part interactions need to be communicated so the player knows their input can do something:
Selecting a part
Pulling on that part in multiple directions
Tossing away the held part
Eating the held part
Storing the held part in your bag