messagebox

Display Unity modal dialogs and await boolean user responses via UniTask.

2.2k|349|Updated Jul 14, 2020
One-click install
npx skills add https://github.com/JasonXuDeveloper/JEngine --skill messagebox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: messagebox
Source: https://github.com/JasonXuDeveloper/JEngine/tree/main/.claude-plugin/skills/messagebox
Command: npx skills add https://github.com/JasonXuDeveloper/JEngine --skill messagebox

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables Unity developers to display asynchronous modal dialogs and capture user responses without blocking the main thread.

Core Features & Use Cases

  • Async Show API: Display modal dialogs and await a boolean result representing user confirmation.
  • Lifecycle Management: Centralized show/close/dispose control to manage dialog pooling and scene transitions.
  • Patterns & Use Cases: Confirmation dialogs, prompts, alerts, and information messages across gameplay UI and editor tooling.

Quick Start

Use MessageBox.Show to display a confirmation dialog and await the result: await MessageBox.Show("Exit","Are you sure you want to exit?", ok: "Exit", no: "Stay");

Frequently Asked Questions about messagebox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I show async modal dialogs in Unity without blocking the main thread?

To show async modal dialogs in Unity without blocking the main thread, use an async Show API that returns a UniTask<bool>. This displays confirmation prompts and alerts while awaiting user responses asynchronously.

What's the best way to handle confirmation dialog responses in Unity gameplay UI?

The best way to handle confirmation dialog responses in Unity gameplay UI is by awaiting a UniTask<bool> result from the Show API. This captures user confirmation non-blockingly, enabling smooth scene transitions and lifecycle management across menus.

Do I need the UniTask package to display non-blocking modal dialogs in Unity?

Yes, you need the UniTask package and Unity to display non-blocking modal dialogs using this approach. The async Show API specifically relies on UniTask<bool> to capture user responses without freezing the main thread.

How does dialog pooling and lifecycle management work for Unity modal dialogs?

Dialog pooling and lifecycle management for Unity modal dialogs work through centralized show, close, and dispose controls. This manages dialog instances efficiently across scene transitions, preventing memory leaks and ensuring responsive UI behavior.

Can I use async modal dialogs for editor tooling and alerts in Unity?

Yes, you can use async modal dialogs for editor tooling and alerts in Unity. The Show API supports displaying informational messages and prompts across both gameplay UI and editor tooling, returning a UniTask<bool> for user input.