Graphic Raycast Target#
UI / Graphic / Graphic Raycast Target
Description#
Compares the Raycast Target property of Graphic component to another value
Parameters#
| Name | Description |
|---|---|
| Graphic |
Code#
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>
using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;
namespace VisualScript.Runtime
{
[Title("Graphic Raycast Target")]
[Category("UI/Graphic/Raycast Target")]
[Description("Compares the Raycast Target property of Graphic component to another value")]
[Image(typeof(IconBrush), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Graphic")]
[Serializable]
public class GenConditionBool_Graphic_CheckRaycastTarget : Condition
{
[SerializeField] private GetGameObject m_Graphic = new GetGameObject(
new GenTypeGameObject_Graphic()
);
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Raycast Target");
return $"{this.m_Graphic} {member}";
}
protected override bool Run(Args args)
{
Graphic component = this.m_Graphic.Get<Graphic>(args);
if (component == null) return false;
return component.raycastTarget;
}
}
}