Selectable Find Selectable#
UI / Interaction / Selectable / Selectable Find Selectable
Can Read
Cannot Write
Description#
Returns the execution of Find Selectable method on the Selectable 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("Selectable Find Selectable")]
[Category("UI/Interaction/Selectable/Find Selectable")]
[Description("Returns the execution of Find Selectable method on the Selectable component")]
[Image(typeof(IconSelectable), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Serializable]
public class GenTypeGameObject_Selectable_FindSelectable_1 : TypeGameObject
{
[SerializeField] private GetGameObject m_Selectable = new GetGameObject(
new GenTypeGameObject_Selectable()
);
[SerializeField] private GetVector3 m_Dir = new GetVector3();
public override GameObject Get(Args args)
{
Selectable component = this.m_Selectable.Get<Selectable>(args);
if (component == null) return default;
Selectable value = (Selectable) component.FindSelectable(
(Vector3) this.m_Dir.Get(args)
);
return value != null ? value.gameObject : null;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(Selectable))
{
Selectable component = this.m_Selectable.Get<Selectable>(args);
if (component == null) return default;
return component.FindSelectable(
(Vector3) this.m_Dir.Get(args)
) as U;
}
return base.Get<U>(args);
}
public override string ToString()
{
return $"{this.m_Selectable} Find Selectable ({this.m_Dir})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}