unity-编辑器快捷按键
2021-04-19 15:29
标签:ogg arm win arc 编辑 技术 unit play 图片 效果图 代码 unity-编辑器快捷按键 标签:ogg arm win arc 编辑 技术 unit play 图片 原文地址:https://www.cnblogs.com/Jaysonhome/p/13288162.html
[MenuItem("Custom/Run _F1")]
static void PlayToggle()
{
EditorApplication.isPlaying = !EditorApplication.isPlaying;
}
static MethodInfo clearMethod = null;
[MenuItem("Custom/Clear Console %#z")]
private static void ClearConsole()
{
if (clearMethod == null)
{
Type log = typeof(EditorWindow).Assembly.GetType("UnityEditor.LogEntries");
clearMethod = log.GetMethod("Clear");
}
clearMethod.Invoke(null, null);
}