-
Notifications
You must be signed in to change notification settings - Fork 341
Expand file tree
/
Copy pathExample.cs
More file actions
31 lines (26 loc) · 709 Bytes
/
Example.cs
File metadata and controls
31 lines (26 loc) · 709 Bytes
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
//Create: Icarus
//ヾ(•ω•`)o
//2021-04-17 10:34
//Assembly-CSharp-Editor
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
namespace CabinIcarus.EditorFrame.Utils
{
public class Example
{
[MenuItem("CONTEXT/Image/Replace To Test Image")]
static void _imageReplaceToTestImage(MenuCommand command)
{
((Component) command.context).ReplaceComponent<TestImage>();
}
[MenuItem("CONTEXT/TestImage/Replace To Image")]
static void _testImageReplaceToImage(MenuCommand command)
{
((Component) command.context).ReplaceComponent<Image>();
}
}
class TestImage:Image
{
}
}