com.alicizax.unity.framework/Runtime/UI/Other/UIBlock.cs
2025-09-05 19:46:30 +08:00

63 lines
1.5 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using UnityEngine;
using UnityEngine.UI;
namespace AlicizaX.UI.Runtime
{
/// <summary>
/// 不可见的一个图用来阻挡UI的投射。
/// </summary>
public class UIBlock : Graphic, ICanvasRaycastFilter
{
public override bool raycastTarget
{
get => true;
set { }
}
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"StyleCop.CSharp.NamingRules",
"SA1300:ElementMustBeginWithUpperCaseLetter",
Justification = "Reviewed. Suppression is OK here.")]
public override Texture mainTexture
{
get { return null; }
}
[System.Diagnostics.CodeAnalysis.SuppressMessage(
"StyleCop.CSharp.NamingRules",
"SA1300:ElementMustBeginWithUpperCaseLetter",
Justification = "Reviewed. Suppression is OK here.")]
public override Material materialForRendering
{
get { return null; }
}
public bool IsRaycastLocationValid(
Vector2 screenPoint, Camera eventCamera)
{
return true;
}
protected override void OnPopulateMesh(VertexHelper vh)
{
vh.Clear();
}
public override void SetAllDirty()
{
}
public override void SetLayoutDirty()
{
}
public override void SetVerticesDirty()
{
}
public override void SetMaterialDirty()
{
}
}
}