Skip to main content

messagebox

MessageBox async modal dialogs for Unity with UniTask. Triggers on: confirmation dialog, modal popup, prompt, alert, user confirmation, yes/no dialog, OK/Cancel, async dialog, await user input, delete confirmation, save confirmation

소스 정보

저장소
JasonXuDeveloper/JEngine
최근 소스 활동
2026년 1월 29일 05:42
감지된 SKILL.md 언어
영어
스타
2,243
포크
349

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
messagebox
description
MessageBox async modal dialogs for Unity with UniTask. Triggers on: confirmation dialog, modal popup, prompt, alert, user confirmation, yes/no dialog, OK/Cancel, async dialog, await user input, delete confirmation, save confirmation
# MessageBox - Async Modal Dialogs Built on UniTask for non-blocking async operations with automatic object pooling. ## When to Use - Confirmation dialogs (Yes/No, OK/Cancel) - Information prompts (OK only) - Awaiting user decisions in gameplay ## API ### Show Method ```csharp public static UniTask<bool> Show( string title, string content, string ok = "OK", string no = "Cancel" ) ``` Returns `true` for confirm, `false` for cancel. ### Management - `MessageBox.CloseAll()` - Dismiss all active dialogs (for scene transitions) - `MessageBox.Dispose()` - Release all pooled instances (app shutdown) - `MessageBox.ActiveCount` - Currently displayed dialogs - `MessageBox.PooledCount` - Cached instances in pool ## Patterns ### Confirmation Dialog ```csharp bool confirmed = await MessageBox.Show( "Delete Item", "Are you sure you want to delete this item?", ok: "Delete", no: "Cancel" ); if (confirmed) { DeleteItem(); } ``` ### Custom Button Text ```csharp bool saved = await MessageBox.Show( "Save Changes", "Keep your changes?", ok: "Save", no: "Discard" ); ``` ### Single Button (Notification) ```csharp // Pass null or empty string to hide cancel button await MessageBox.Show( "Success", "Operation completed!", ok: "OK", no: null ); ``` ### Clean Up Before Scene Change ```csharp MessageBox.CloseAll(); SceneManager.LoadScene("NextScene"); ``` ## Common Mistakes - Forgetting to await (dialog shows but code continues immediately) - Not handling both true/false return values - Not calling CloseAll() before scene transitions
GitHub에서 보기