Eonirr

Untitled

Dec 2nd, 2025 (edited)
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. using System;
  2. using System.Reflection;
  3. using UnityEditor;
  4.  
  5. static class EditorMenus
  6. {
  7. [MenuItem("Tools/Clear Console &c")]
  8. static void ClearConsole()
  9. {
  10. var logEntries = Type.GetType("UnityEditor.LogEntries,UnityEditor.dll");
  11. var clearMethod = logEntries.GetMethod("Clear", BindingFlags.Static | BindingFlags.Public);
  12. clearMethod.Invoke(null, null);
  13. }
  14.  
  15. [MenuItem("Tools/Toggle Inspector Lock &x")]
  16. static void ToggleInspectorLock()
  17. {
  18. ActiveEditorTracker.sharedTracker.isLocked = !ActiveEditorTracker.sharedTracker.isLocked;
  19. ActiveEditorTracker.sharedTracker.ForceRebuild();
  20. }
  21. }
Add Comment
Please, Sign In to add comment