Set Player Input Never Auto Switch Control Schemes#
Input / Player Input / Set Player Input Never Auto Switch Control Schemes
Description#
Sets the Never Auto Switch Control Schemes property of Player Input component
Parameters#
| Name | Description |
|---|---|
| Player Input | |
| Value |
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("Set Player Input Never Auto Switch Control Schemes")]
[Category("Input/Player Input/Never Auto Switch Control Schemes")]
[Description("Sets the Never Auto Switch Control Schemes property of Player Input component")]
[Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]
[Keywords("Input, Player, Controls, Local, Multiplayer, Co-op")]
[Parameter("Player Input")]
[Parameter("Value")]
[Serializable]
public class GenInstructionBool_PlayerInput_SetNeverAutoSwitchControlSchemes : Instruction
{
[SerializeField] private GetGameObject m_PlayerInput = new GetGameObject(
new GenTypeGameObject_PlayerInput()
);
[SerializeField] private GetBool m_Value = new GetBool();
protected override string GetTitle(GameObject source)
{
string member = TextUtils.ThemeAsKeyword("Never Auto Switch Control Schemes");
return $"{this.m_PlayerInput} {member} = {this.m_Value}";
}
protected override Awaitable Run(Args args)
{
PlayerInput component = this.m_PlayerInput.Get<PlayerInput>(args);
if (component == null) return Done;
component.neverAutoSwitchControlSchemes = (bool) this.m_Value.Get(args);
return Done;
}
}
}