Keeps number of subtypes down on many switchers, aids ease-of-use
Current thinking: each child module registers itself to the "parent" to which it adds volume. Subtype changes on the child trigger a volume update on the parent.
Things to consider
The parent shouldn't really create any resources until all the children are initialized. Likely move resource creation/whatever to Start() so that OnStart() will be run on all modules first
Each subtype should have a new volumeAddedToParent field that specifies the volume it adds to the parent (different from its actual volume)
Volume update trigger: either keep track of parent and send method directly, or use part message
Keeps number of subtypes down on many switchers, aids ease-of-use
Current thinking: each child module registers itself to the "parent" to which it adds volume. Subtype changes on the child trigger a volume update on the parent.
Things to consider
Start()
so thatOnStart()
will be run on all modules firstvolumeAddedToParent
field that specifies the volume it adds to the parent (different from its actual volume)