LoginSignup
3
4

More than 5 years have passed since last update.

Unity-ProfilerのログをクリアするEditor拡張作った

Posted at

Start関数の中で試しに処理を計測したい場合に、何度もClearボタンを押すのが面倒なので作ってみました。

検証環境

Unity5.3.2f1 (Pro版で検証したけど、フリー版でも動くはず・・・)
Mac 10.11.4

使い方

  1. ソースコードをコピペしてEditorフォルダ以下に保存
  2. ショートカット(Command + i) またはTools/Profiler/ProfilerClearを実行
  3. Profilerのログが消える

ソースコード

ソースコード
using UnityEditor;
using UnityEditorInternal;

public class ProfilerClear
{
    [MenuItem ("Tools/Profiler/ProfilerClear %i")]
    static void Clear ()
    {
        ProfilerDriver.ClearAllFrames ();
    }
}

8月-04-2016 15-54-55.gif

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