3
0

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.

UnityEditorでEditor実行時にErrorPauseを強制的に解除する

Posted at

作業環境
Unity2022.1.9f1

以下のスクリプトをEditorフォルダ以下に入れてください

using UnityEditor;

public class ForceDisableEditorErrorPause
{
    [InitializeOnEnterPlayMode]
    static void RunOnEnterPlayMode()
    {
        var assembly = typeof(Editor).Assembly;
        var type = assembly.GetType("UnityEditor.ConsoleWindow");
        var consoleWindow = EditorWindow.GetWindow(type);
        var methodInfo = type.GetMethod("SetConsoleErrorPause");

        methodInfo.Invoke(consoleWindow, new object[] {false});
    }
}

実行時にConsoleウィンドウが前面に出てきちゃうので、GetConsoleErrorPauseがtrueだったら。という風にしてもよさそうです

3
0
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
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?