mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:57:37 +02:00
basic controller input from JSL
may need compiles for linux and mac
This commit is contained in:
@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using TMPro;
|
||||
|
||||
using HeavenStudio;
|
||||
using static JSL;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class ControllerSettings : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private TMP_Text numConnectedLabel;
|
||||
[SerializeField] private TMP_Text currentControllerLabel;
|
||||
|
||||
public void SearchAndConnectControllers()
|
||||
{
|
||||
int connected = PlayerInput.InitJoyShocks();
|
||||
numConnectedLabel.text = "Connected: " + connected;
|
||||
//do this better
|
||||
currentControllerLabel.text = "Current Controller: " + PlayerInput.GetJoyShockName(0);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10d59ed8edc40a448a61794f93c74ccd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user