chore: initial commit
This commit is contained in:
25
Assets/Feel/MMTools/Accessories/MMGUI/MMRaycastTarget.cs
Normal file
25
Assets/Feel/MMTools/Accessories/MMGUI/MMRaycastTarget.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using UnityEngine;
|
||||
#if MM_UI
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user