Player Input Get Player By Index#
Input / Player Input / Player Input Get Player By Index
Can Read
Cannot Write
Description#
Returns the execution of Get Player By Index static method on the Player Input class
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]
[Title("Player Input Get Player By Index")]
[Category("Input/Player Input/Get Player By Index")]
[Description("Returns the execution of Get Player By Index static method on the Player Input class")]
[Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]
[Keywords("Input, Player, Controls, Local, Multiplayer, Co-op")]
[Serializable]
public class GenTypeGameObject_PlayerInput_GetPlayerByIndex_1 : TypeGameObject
{
[SerializeField] private GetInteger m_PlayerIndex = new GetInteger();
public override GameObject Get(Args args)
{
PlayerInput value = (PlayerInput) PlayerInput.GetPlayerByIndex(
(int) this.m_PlayerIndex.Get(args)
);
return value != null ? value.gameObject : null;
}
public override U Get<U>(Args args)
{
if (typeof(U) == typeof(PlayerInput))
{
return PlayerInput.GetPlayerByIndex(
(int) this.m_PlayerIndex.Get(args)
) as U;
}
return base.Get<U>(args);
}
public override string ToString()
{
return $"Player Input Get Player By Index ({this.m_PlayerIndex})";
}
protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
}
}