handzlikchris / handzlikchris/FastScriptReload

[Bug] ArgumentException: Button text exceeds 64 characters in Welcome Screen

オープン 初心者向け
#202 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
C#
スター
2.2k
フォーク
167
PR マージ指標
30日以内にマージされた PR はありません

説明

# [Bug] ArgumentException: Button text exceeds 64 characters in Welcome Screen

### Description
In **Fast Script Reload v1.8**, the editor throws a `System.ArgumentException` during the initialization of the welcome screen. This prevents the "Auto-Refresh Awareness" dialog from appearing and can crash the editor initialization process.

The error is caused by a button text that is **65 characters long**, which exceeds Unity's internal limit of 64 characters for `EditorUtility.DisplayDialogComplex`.

### Error Log
```text
System.ArgumentException: Text on buttons must be less than 64 characters long.
Parameter name: defaultButtonText
at UnityEditor.EditorDialog.ThrowIfButtonTextIsInvalid (System.String buttonText, System.String parameterName)
at UnityEditor.EditorUtility.DisplayDialogComplex (System.String title, System.String message, System.String ok, System.String cancel, System.String alt)
at FastScriptReload.Editor.FastScriptReloadWelcomeScreenInitializer.EnsureUserAwareOfAutoRefresh ()
```

### Technical Details

**- File:** `FastScriptReloadWelcomeScreen.cs`
**- Method:** `EnsureUserAwareOfAutoRefresh()`
**- Line:** ~988
**- Offending String:** `"Ok, disable asset auto refresh (I'll refresh manually when needed)"` (Count: 65)

### Steps to Reproduce

1. Import Fast Script Reload v1.8 into a Unity project.
2. Ensure Unity's "Auto Refresh" is enabled in Preferences.
3. Restart the editor or wait for the `InitializeOnLoad` call to trigger the welcome screen.

### Suggested Fix
Shorten the button text to 64 characters or fewer.

### Original:

> "Ok, disable asset auto refresh (I'll refresh manually when needed)"

### Suggested Change:

> "Disable auto refresh (I'll refresh manually)" (44 characters)

### Screeenshots

Image

Image

Reporter: Umutcan Ekinci, 2nd Year Software Engineering Student at Yaşar University

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

FastScriptReloadWelcomeScreen.cs を開き、988 行目付近の EnsureUserAwareOfAutoRefresh() を調べます。Unity の DisplayDialogComplex に渡されるボタンテキストが制限を超えていることを確認し、issue に記載されているとおりに短くします。Unity でウェルカム画面の初期化を再現し、ArgumentException が発生せずにダイアログが表示されることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, unity
領域
game-dev, tooling
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
88/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。