Player Input Actions#
Input / Player Input / Player Input Actions
Can Read
Can Write
Description#
The Actions property of 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
{
[Get]
[Set]
[Title("Player Input Actions")]
[Category("Input/Player Input/Actions")]
[Description("The Actions property of the Player Input component")]
[Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]
[Keywords("Input, Player, Controls, Local, Multiplayer, Co-op")]
[Serializable]
public class GenTypeScriptableObject_PlayerInput_Actions : TypeScriptableObject
{
[SerializeField] private GetGameObject m_PlayerInput = new GetGameObject(
new GenTypeGameObject_PlayerInput()
);
public override ScriptableObject GetPreview(GameObject source)
{
GameObject instance = this.m_PlayerInput.GetPreview(source);
if (instance == null) return default;
PlayerInput component = instance.GetComponent<PlayerInput>();
return component != null ? component.actions : default;
}
public override ScriptableObject Get(Args args)
{
PlayerInput instance = this.m_PlayerInput.Get<PlayerInput>(args);
return instance != null
? instance.actions
: default;
}
public override void Set(ScriptableObject value, Args args)
{
PlayerInput component = this.m_PlayerInput.Get<PlayerInput>(args);
if (component != null) component.actions = (InputActionAsset) value;
}
public override string ToString()
{
return $"{this.m_PlayerInput} Actions";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}