Graphic Raycast#
UI / Graphic / Graphic Raycast
Description#
Compares the Raycast method of Graphic component to another value
Parameters#
| Name | Description |
|---|---|
| Graphic | |
| Sp | |
| Event Camera |
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")]
[Category("UI/Graphic/Raycast")]
[Description("Compares the Raycast method of Graphic component to another value")]
[Image(typeof(IconBrush), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Graphic")]
[Parameter("Sp")]
[Parameter("Event Camera")]
[Serializable]
public class GenConditionBool_Graphic_CheckRaycast_2 : Condition
{
[SerializeField] private GetGameObject m_Graphic = new GetGameObject(
new GenTypeGameObject_Graphic()
);
[SerializeField] private GetVector2 m_Sp = new GetVector2();
[SerializeField] private GetGameObject m_EventCamera = new GetGameObject();
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Raycast");
string parameters = $"({this.m_Sp}, {this.m_EventCamera})";
return $"{this.m_Graphic} {method}";
}
protected override bool Run(Args args)
{
Graphic component = this.m_Graphic.Get<Graphic>(args);
if (component == null) return false;
bool value = component.Raycast(
(Vector2) this.m_Sp.Get(args),
(Camera) this.m_EventCamera.Get<Camera>(args)
);
return value;
}
}
}