Image Is Raycast Location Valid#
UI / Graphic / Image / Image Is Raycast Location Valid
Can Read
Cannot Write
Description#
Returns the execution of Is Raycast Location Valid method on the Image component
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
{
[Get]
[Title("Image Is Raycast Location Valid")]
[Category("UI/Graphic/Image/Is Raycast Location Valid")]
[Description("Returns the execution of Is Raycast Location Valid method on the Image component")]
[Image(typeof(IconUIImage), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Serializable]
public class GenTypeBool_Image_IsRaycastLocationValid_2 : TypeBool
{
[SerializeField] private GetGameObject m_Image = new GetGameObject(
new GenTypeGameObject_Image()
);
[SerializeField] private GetVector2 m_ScreenPoint = new GetVector2();
[SerializeField] private GetGameObject m_EventCamera = new GetGameObject();
public override bool Get(Args args)
{
Image component = this.m_Image.Get<Image>(args);
if (component == null) return default;
bool value = (bool) component.IsRaycastLocationValid(
(Vector2) this.m_ScreenPoint.Get(args),
(Camera) this.m_EventCamera.Get<Camera>(args)
);
return value;
}
public override string ToString()
{
return $"{this.m_Image} Is Raycast Location Valid ({this.m_ScreenPoint}, {this.m_EventCamera})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}