Lifecycle presentation¶
SystemBasedLifecyclePresenter shows the visual root for the lifecycle's current stage. It is optional: your gameplay can consume lifecycle state/events without any model switching.
Configure stage visuals¶
- Set up a valid lifecycle and profile first.
- Add System Based Lifecycle Presenter on a suitable object and assign Lifecycle.
- Use Sync Stage Visuals From Profile to populate IDs, retaining matching existing roots by ID.
- For each Stage ID, assign its Visual Root. Include terminal-stage visuals if that stage needs a visible result.
- Choose Hide Visuals Before Start and test initial, running, completed, reset, and re-enabled states.
Synchronization changes presenter mappings, not the shared profile. It removes entries for stages no longer in the profile, so review changes before relying on an old model assignment. Do not key models by stage list index if stable IDs are available.
Visual roots must not be the lifecycle host, the presenter host, or their ancestors. Toggling those roots could stop the very components that need to select the next model. Use child models/containers and keep the progression component outside the roots being toggled. The presenter rejects unsafe assignments, but validation is not a reason to design a circular hierarchy.
The presenter listens for state changes/reconciliation and reapplies the final state when re-enabled. It does not advance time, harvest crops, create inventory, or save progression. Assign gameplay actions to your own code using the lifecycle's explicit APIs.
Supplied crop example¶
The Lifecycle Objects demo contains Wheat, Corn, Tomato, and Pumpkin with separate visual-stage roots. Inspect their profile-to-root mappings as examples, not a universal crop stage specification. The inherited Object Showcase canvas has a known binding validation issue; do not use its Previous/Next controls as proof that lifecycle selection is configured.
Related: progression, rewind/offline policies, persistence.