-
Notifications
You must be signed in to change notification settings - Fork 0
/
PrinterEditor.cs
40 lines (35 loc) · 1.16 KB
/
PrinterEditor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using UnityEditor;
namespace dkstlzu.Utility
{
public static class PrinterEditor
{
[MenuItem("Dev/Printer/Up Priority %PGUP", false, 1)]
public static void UpPriority()
{
Printer.CurrentPriority++;
Notify();
}
[MenuItem("Dev/Printer/Down Priority %PGDN", false, 2)]
public static void DownPriority()
{
Printer.CurrentPriority--;
Notify();
}
[MenuItem("Dev/Printer/Print individual %#PGUP", false, 3)]
public static void DefulatIntervalAsIndividual()
{
Printer.DefaultLogInterval = LogInterval.Individual;
Notify();
}
[MenuItem("Dev/Printer/Print frame %#PGDN", false, 4)]
public static void DefulatIntervalAsFrame()
{
Printer.DefaultLogInterval = LogInterval.Frame;
Notify();
}
static void Notify()
{
Printer.Print($"Printer update. Priority : {Printer.CurrentPriority}, Interval : {Printer.DefaultLogInterval}", customTag:"Dev", priority:Printer.CurrentPriority, logInterval:LogInterval.Individual);
}
}
}