You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CrowdControl/Assets/Feel/MMTools/Tools/MMGUI/MMRaycastTarget.cs

23 lines
565 B
C#

2 months ago
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System;
namespace MoreMountains.Tools
{
/// <summary>
/// Add this class to a UI object to have it act as a raycast target without needing an Image component
/// </summary>
[AddComponentMenu("More Mountains/Tools/GUI/MMRaycastTarget")]
public class MMRaycastTarget : Graphic
{
public override void SetVerticesDirty() { return; }
public override void SetMaterialDirty() { return; }
protected override void OnPopulateMesh(VertexHelper vh)
{
vh.Clear();
return;
}
}
}