Documentation index for AI agents (llms.txt) A Markdown version of every page is available: request the page's source under /docs/, follow the "alternate" link in this page's head, or start from /llms.txt.
Visual Script logo Manual

Player Input Get Player By Index#

Input / Player Input / Player Input Get Player By Index

Description#

Compares the Get Player By Index static method of Player Input class to another value

Parameters#

Name Description
Player Index
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("Player Input Get Player By Index")]
    [Category("Input/Player Input/Get Player By Index")]
    [Description("Compares the Get Player By Index static method of Player Input class to another value")]

    [Image(typeof(IconBoltOutline), ColorTheme.Type.Blue)]
    [Keywords("Input, Player, Controls, Local, Multiplayer, Co-op")]

    [Parameter("Player Index")]
    [Parameter("Value")]

    [Serializable]
    public class GenConditionGameObject_PlayerInput_CheckGetPlayerByIndex_1 : Condition
    {
        [SerializeField] private GetGameObject m_Value = new GetGameObject();

        [SerializeField] private GetInteger m_PlayerIndex = new GetInteger();

        protected override string GetTitle(GameObject source)
        {
            string className = TextUtils.ThemeAsKeyword("Player Input");
            string method = TextUtils.ThemeAsKeyword("Get Player By Index");
            return $"{className} {method} ({this.m_PlayerIndex}) = {this.m_Value}";
        }

        protected override bool Run(Args args)
        {
            PlayerInput value = PlayerInput.GetPlayerByIndex(
                (int) this.m_PlayerIndex.Get(args)
            );

            return value == this.m_Value.Get<PlayerInput>(args);
        }
    }
}
Visual Script logoVisual Script © Catsoft Works 2026. All rights reserved.