Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

player input manager join manually

//Use this if you want to join players manually with unity's new input system
//This connects all active devices to a gameobject setup for inputsystem input
//Check your player prefab's player input component's Auto-Switch box

using UnityEngine.InputSystem;
void JoinConnectedDevices()
{
	int playerNo = 0;
	for(InputDevice device in InputSystem.devices)
    {
    	playerInputManager.JoinPlayer(playerNo++, playerNo++, null, device);
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to decrease velocity of a Unity rigidbody 
Csharp :: join dictionaries keys c# 
Csharp :: remove duplicates in the list using linq 
Csharp :: mvc c# return renderPartial 
Csharp :: convert string to decimal c# 
Csharp :: c# write line 
Csharp :: c# mvc get current directory 
Csharp :: c# linq select specific columns 
Csharp :: c# array.reduce 
Csharp :: check if two timespans intersect c# 
Csharp :: .net json result status code not working 
Csharp :: substring in c# 
Csharp :: render world space UI infront of everything unity 
Csharp :: c# centos Regex Username 
Csharp :: allow scroll with wheel mouse datagridview c# 
Csharp :: how to make a block disappear in unity 
Csharp :: c# loop 2 time tables 
Csharp :: c# calculate checksum of file 
Csharp :: c# object is enum 
Csharp :: unity how to find the largest value out of 2 numbers 
Csharp :: c# try parse date yyyymmdd 
Csharp :: unity stop physics 
Csharp :: how to make a system to check if i see certain object in unity 
Csharp :: last index for array c# 
Csharp :: do while loop in c# 
Csharp :: enum in combobox wpf 
Csharp :: .net core login redirect loop 
Csharp :: linq select to list 
Csharp :: winforms combobox get selected text 
Csharp :: install active directory windows server 2019 powershell 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =