OpenParable
Skip to content
← Back to skills

F8 Tools Coroutine Mainthread Workflow

Development
f8-tools-coroutine-mainthread-workflow

F8 Tools Coroutine Mainthread Workflow is an Agent Skill for development published in the TippingGame/F8Framework repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when working with Coroutine/MainThread tools — coroutine utilities and main thread dispatch in F8Framework.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/TippingGame/F8Framework/blob/HEAD/Tests/AISkills/f8framework-skills/tools/f8-tools-coroutine-mainthread-workflow/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/f8-tools-coroutine-mainthread-workflow, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Coroutine/MainThread Tools Workflow

Use this skill when

  • The task involves coroutine management or dispatching work to the main thread.
  • The user needs to run code on the main thread from a background thread.

Path resolution

  1. Source: Assets/F8Framework/Runtime/Utility/Coroutine/

Sources of truth

  • Source directory: Assets/F8Framework/Runtime/Utility/Coroutine

Key capabilities

  • Coroutine start/stop utilities
  • Main thread action dispatch from background threads
  • Thread-safe Unity API access patterns
  • Coroutine chaining helpers

Workflow

  1. Use coroutine utilities for managed coroutine lifecycle.
  2. Dispatch to main thread when accessing Unity APIs from background threads.
  3. Combine with LogF8.LogToMainThread() for thread-safe logging.
  4. WebGL does not support multi-threading — use coroutines only.

Common error handling

ErrorCauseSolution
Unity API from background threadThread-unsafe accessDispatch to main thread
Coroutine not runningMonoBehaviour inactiveEnsure host is active

Output checklist

  • Threading model identified (main thread only vs multi-thread).
  • Main thread dispatch configured if needed.
  • Coroutine host MonoBehaviour verified.