Demo Panels¶
This folder contains demo teachable panels for the Attributes system — panels that have to attach a component or configure a seam in order to demonstrate one.
Panels in This Folder¶
| Panel | Teaches |
|---|---|
AttributesCombinerProvidersPanel | Combining: two complete IAttributeCombiner implementations over identical inputs, providers collected up the parent chain, the difference between an unticked enabled box and an inactive GameObject, tags, and the two failure modes worth causing on purpose. |
Why This Panel Is A Demo¶
It builds its own object graph: a root GameObject, an owner under it carrying an AttributeSet, three DemoAttributeProvider components across the two, and a combiner supplied through SetCombiner. Then it destroys all of it when the panel is disabled.
Every one of those calls is public, and none of them touches anything in your scene. It is a demo because of the attaching, not because of any access it needed — see ../HostileConsumers/README.md for why that distinction is about what a panel can prove rather than how carefully it was written.
There was no alternative that taught the same thing. Providers are discovered with GetComponentsInParent, so a panel that demonstrates provider behaviour needs provider components on a chain. Either the panel makes them or the sample scene does — and if the scene made them, the lesson would be a screenshot of somebody else's wiring rather than the wiring itself.
The Combiners Are The Point¶
SumCombiner and FlatThenPercentCombiner are nested inside the panel, and they are not scaffolding. They are complete, they are about a dozen lines each, and copying one into your project is a legitimate way to start.
That they can be that short is the argument for the whole design. RevFramework ships no combiner because whether two +50% bonuses make +100% or +125% is a question every game answers differently and none of them answers wrongly. Both answers are a line of arithmetic — so the framework does the part nobody disagrees about and calls out to you for the part everybody does.
CyclicCombiner is the third, and it is deliberately broken: it reads an effective value from inside the combine that is producing it. Left alone that is a stack overflow with no useful trace. It is here so you can watch MaxReadDepth stop the descent and say why in the Console, and so that the day you write that cycle by accident, the message is one you have seen before.
The Default State Is A Lesson¶
The panel starts with no combiner selected, with three providers attached and contributing nothing. That is not an unconfigured panel waiting to be set up. It is the shipped default, it is correct, and it is the single behaviour most likely to cost somebody an afternoon:
No combiner means no modifiers. The providers are not consulted at all — not consulted and ignored. Without a combiner there is no defined way to apply a contribution, so collecting one would be pointless work.
The container does warn once in the Console when it notices providers on an owner with no combiner. Read the first tab before switching anything.