TryComplete returns false
Confirm the Manager exists, the intended Chapter is selected, the linked row is Active, and the ID matches exactly.
Components
Use the supported base MonoBehaviour for custom scene-side completion detectors and common Objective Link behavior.
Objective is the supported MonoBehaviour base for a scene mechanic that requests completion of one Ordered Objective. Use it directly when a UnityEvent only needs the parameterless CompleteFromEvent() entry point. Derive from it when the mechanic needs serialized fields, condition detection, local transient state, or reset behavior.
Do not use it as a second progression controller. It does not select Chapters, advance by index, persist state, or search for a similar title. Its only progression command is an exact request to the currently selected Chapter.
| Field or property | Purpose | Rule |
|---|---|---|
| Objective ID | Links the component to a serialized Ordered Objective | Use the assisted selector; exact ordinal match required |
| On Completed | Scene response after the Chapter accepts completion | Not invoked for rejected or repeated calls |
| IsCompleted | Local success state for this component run | Becomes true only after Chapter acceptance |
| ObjectiveId | Public read-only linked ID | Useful for diagnostics, not mutation |
TryComplete() first rejects a locally completed component. It resolves ChapterManager.Instance.CurrentChapter, calls Chapter.TryCompleteObjective(ObjectiveId), and only then marks the component complete and invokes OnCompleted. This ordering keeps the detector consistent with the authoritative ordered flow.
TryComplete() is public and returns whether the Chapter advanced.CompleteFromEvent() is the UnityEvent-friendly void wrapper.RequestObjectiveCompletion() is protected for subclasses and returns the same acceptance result.ResetObjective() is public virtual and clears the base local completion flag.Override Reset only when the subclass owns transient state. Call base.ResetObjective() before or after clearing that state. Do not invoke completion events from Reset and do not write directly to the Ordered Objective state.
Add the component inside the intended Objective container, then use Select Chapter and the Ordered Objective dropdown. A linked component should show Linked. Missing means the stored ID no longer resolves; Wrong Chapter means the hierarchy and selected data disagree; Duplicate Binding means more than one scene detector claims the row.
Confirm the Manager exists, the intended Chapter is selected, the linked row is Active, and the ID matches exactly.
It is intentionally post-acceptance. Inspect the returned bool rather than expecting it for a rejected request.
Override ResetObjective() and clear every coroutine, counter, cached collider, or flag owned by the subclass.
For a complete compiled implementation, continue to Create a Custom Objective Component.
using System;
using System.Collections;
using System.Collections.Generic;
using OverFuture.ChapterObjectiveSystem.Chapters;
using OverFuture.ChapterObjectiveSystem.Events;
using OverFuture.ChapterObjectiveSystem.Objectives;
using OverFuture.ChapterObjectiveSystem.Persistence;
using OverFuture.ChapterObjectiveSystem.Progression;
using UnityEngine;
public sealed class LeverObjective : Objective
{
public bool NotifyLeverPulled()
{
return RequestObjectiveCompletion();
}
}