31 lines
565 B
C#
31 lines
565 B
C#
|
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.UI;
|
||
|
#if UNITY_EDITOR
|
||
|
using UnityEditor;
|
||
|
#endif
|
||
|
|
||
|
namespace Ether
|
||
|
{
|
||
|
public class ImageEx : Image
|
||
|
{
|
||
|
|
||
|
#if UNITY_EDITOR
|
||
|
[MenuItem("GameObject/UIEx/ImageEx", priority = -1000)]
|
||
|
private static void CreateButtonEx(MenuCommand menuCmd)
|
||
|
{
|
||
|
GameObject selection = Selection.activeGameObject;
|
||
|
|
||
|
CommonExtension.CreateComponent<ImageEx>(selection, (obj) =>
|
||
|
{
|
||
|
obj.GetComponent<ImageEx>().raycastTarget = false;
|
||
|
});
|
||
|
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
}
|
||
|
}
|