4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Unityで再生中にスクリプトを編集してもコンパイルが走らないようにする

Last updated at Posted at 2023-04-13

環境:Unity2021.3.11f1 or Unity2022.3.4f1 で確認

Unityはデフォルトの設定では再生中にスクリプトを編集・保存した場合、「NullReferenceException: Object reference not set to an instance of an object」のエラーが出て進行不能になってしまいます。

Preferences -> AssertsPipeline -> AutoRefresh」 を 「Enabled Outside Playmode」にする事で、再生を停止した後にコンパイルが走るようになり、再生中にスクリプトを保存しても進行不能にならなくなります。

日本語版UnityのPreferences画面のスクリーンショットを添付します。
image.png

※Unity 2018.3では「Preference -> General -> Script Changes While Playing」を「Recompile After Finished Playing」にする事で同じ事ができたようです。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?