Easy Chapter Generator
EnglishEspañol

Evaluate a deliberate UI choice

ButtonObjective converts a Unity UI action or another explicit event into either an accepted completion request or an invalid-choice response. Use one on the correct option, or configure a separate instance as an incorrect option when the interface needs neutral feedback without failing or advancing the Chapter.

It does not listen to Button.onClick automatically. Bind the Button's On Click event to ButtonObjective.Evaluate(). If project UI already validates the answer in code, calling the active Chapter directly can be clearer than creating several scene components.

Inspector fields

FieldBehaviorMinimum setup
Objective LinkInherited exact Ordered Objective bindingRequired for a correct option
Is Incorrect OptionPrevents completion and invokes the invalid eventEnable only on choices that must not advance
On Invalid OptionFeedback for an incorrect choiceOptional; does not fail the Chapter
On CompletedRuns after the correct request is acceptedOptional scene-side feedback

Execution, repeat calls, and reset

Evaluate() returns immediately after local completion. On an incorrect instance, every evaluation invokes OnInvalidOption and leaves progression untouched. On a correct instance, it calls the inherited TryComplete(); early, wrong-ID, or duplicate calls are rejected by the Chapter.

The component has no additional transient fields beyond the base completion flag. ResetObjective() therefore restores it through the inherited implementation. An incorrect option never sets the completion flag, so it remains available until the Chapter advances or the UI disables it.

Example: one correct and two incorrect answers

  1. 1
    Create one Ordered Objective named Answer the access question.
  2. 2
    Add a ButtonObjective to each answer Button and link all three to that row.
  3. 3
    Enable Is Incorrect Option on the two wrong answers; bind On Invalid Option to a short visual response.
  4. 4
    Leave the correct instance unchecked and bind each UI Button's On Click to its local Evaluate.
Validation may report duplicate bindings

Several Objective components linked to one row are normally a risky duplicate. For a multiple-choice interface, a single project controller that calls one correct ButtonObjective and handles wrong answers itself is often cleaner.