Player Input Deactivate Input#
Input / Player Input / Player Input Deactivate Input
Description#
Executes the Deactivate Input method on the Player Input 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.InputSystem;
namespace VisualScript.Runtime
{
[Title("Player Input Deactivate Input")]
[Category("Input/Player Input/Deactivate Input")]
[Description("Executes the Deactivate Input method on the Player Input component")]
[Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]
[Keywords("Input, Player, Controls, Local, Multiplayer, Co-op")]
[Serializable]
public class GenInstructionPlayerInput_DeactivateInput_0 : Instruction
{
[SerializeField] private GetGameObject m_PlayerInput = new GetGameObject(
new GenTypeGameObject_PlayerInput()
);
protected override string GetTitle(GameObject source)
{
string method = TextUtils.ThemeAsKeyword("Deactivate Input");
return $"{this.m_PlayerInput} {method}";
}
protected override Awaitable Run(Args args)
{
PlayerInput component = this.m_PlayerInput.Get<PlayerInput>(args);
if (component == null) return Done;
component.DeactivateInput();
return Done;
}
}
}