Files
ChunilENG/Assets/DownloadAssets/3D Interactive Bar Chart/2.Scripts/Editor/Shortcut.cs
정영민 2dd5d814a7 update
2025-02-20 09:59:37 +09:00

39 lines
1.1 KiB
C#

using System.Reflection;
using UnityEditor;
using UnityEngine;
namespace Uitility.VittorCloud
{
public class Shortcut : Editor
{
[MenuItem("Tools/ActiveToggle _`")]
static void ToggleActivationSelection()
{
var go = Selection.activeGameObject;
go.SetActive(!go.activeSelf);
}
[MenuItem("Tools/Clear Console _]")] // CMD + SHIFT + C
static void ClearConsole()
{
// This simply does "LogEntries.Clear()" the long way:
var assembly = Assembly.GetAssembly(typeof(SceneView));
var type = assembly.GetType("UnityEditor.LogEntries");
var method = type.GetMethod("Clear");
method.Invoke(new object(), null);
//Debug.Log("Cleared");
}
[MenuItem("Tools/Clear PlayerFrebs _#]")] // CMD + SHIFT + C
static void ClearPlayerFrebs()
{
// This simply does "LogEntries.Clear()" the long way:
PlayerPrefs.DeleteAll();
//Debug.Log("PlayerFrebs Clear");
}
}
}