Components
IntegratedObjective
Expose a lightweight serializable completion endpoint for external systems that do not need a scene Objective MonoBehaviour.
A serializable completion endpoint
IntegratedObjective is a serializable class for an external component that needs to expose an Objective ID, accepted completion, and a post-acceptance UnityEvent without hosting a separate Objective MonoBehaviour. It uses the same exact active-Chapter check as the base Objective.
Use it as a serialized field inside project or integration code. It does not receive an assisted standalone Inspector, collision callbacks, Update, or automatic reset from scene Objective discovery. For most reusable scene mechanics, a custom Objective subclass is easier to author and validate.
Fields and call contract
| Member | Purpose | Constraint |
|---|---|---|
| Objective ID | Exact Ordered Objective identifier | The containing inspector must expose or assign it |
| On Completed | Invoked after accepted completion | Serialized inside the containing object |
| TryComplete() | Requests completion and returns acceptance | Rejects local repeats, missing Manager/Chapter, wrong or inactive ID |
| ResetObjective() | Clears local completion state | The containing owner must call it |
Safe containing-component pattern
- 1Add a serialized
IntegratedObjectivefield to the project component that already owns the mechanic. - 2Expose the field in that component's Inspector and assign the exact Ordered Objective ID.
- 3When the external system confirms success, call
TryComplete()and inspect its bool result. - 4When the containing mechanic resets, call
ResetObjective()as part of the same reset transaction.
If the containing component is duplicated, validate IDs yourself; Objective Link tooling is designed primarily for Objective MonoBehaviours.
Limits and alternatives
- It does not inherit MonoBehaviour and cannot run coroutines or receive Unity messages.
- It does not expose a public setter for Objective ID; author it through serialization.
- It does not automatically participate in physical Objective reset discovery.
- It does not replace direct external completion when the project already knows the current ID.
Choose Objective for scene detection, or Complete and Control Progression for a pure code integration.