Selectable Is Interactable#
UI / Interaction / Selectable / Selectable Is Interactable
Description#
Compares the Is Interactable method of Selectable component to another value
Parameters#
| Name | Description |
|---|---|
| Selectable |
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("Selectable Is Interactable")]
[Category("UI/Interaction/Selectable/Is Interactable")]
[Description("Compares the Is Interactable method of Selectable component to another value")]
[Image(typeof(IconSelectable), ColorTheme.Type.TextLight)]
[Keywords("UI, User, Interface")]
[Parameter("Selectable")]
[Serializable]
public class GenConditionBool_Selectable_CheckIsInteractable_0 : Condition
{
[SerializeField] private GetGameObject m_Selectable = new GetGameObject(
new GenTypeGameObject_Selectable()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Is Interactable");
string parameters = $"()";
return $"{this.m_Selectable} {method}";
}
protected override bool Run(Args args)
{
Selectable component = this.m_Selectable.Get<Selectable>(args);
if (component == null) return false;
bool value = component.IsInteractable();
return value;
}
}
}