Skip to content

destiny5420/nintendo-joycon-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nintendo Joycon Patch

The repository is custom tool that can help developer pair Nintendo joy-con easily. If you would like to use this tool, selecting latest version at tag.

How to use this tool

  • Import Tool.unitypackage to your unity project, and your unity must support .NET Framework 3.5. You can set Scripting Runtime Version to change .NET version in configuration of playersettings.


  • You can seet that InputSetting and Plugin folder appear in the project.


  • Open Project Settings panel in the edit menu and select Input option. Then left click in preset button on upper right corner.


  • Select NintendoInputManagerAssets, Input axes will become a custom setting for up to 4 player.


NintendoJoyconManager

class in PaperGmaeStudio.Controller


  • First, you must use NintendoJoyconManager.Init() in scripts to initialize the nintendojoycon manager. NintendoJoyconManager will automatically generate on the scene.
using UnityEngine;
using PaperGmaeStudio.Controller;

public class NewBehaviourScript : MonoBehaviour
{
    void Start()
    {
        NintendoJoyconManager.Init();
    }
}


  • You need to register callback with manager if you want to capture the button event.
using UnityEngine;
using PaperGmaeStudio.Controller;

public class DemoScript : MonoBehaviour
{
    void Start()
    {
        NintendoJoyconManager.Init();
        NintendoJoyconManager.RegistCallback(NintendoJoyconManager.NINTENDO_KEY_TYPE.Player01_A, OnClick_A_01);
    }

    void OnClick_A_01(float v_value)
    {
        Debug.Log("OnClick_A_01 / value: " + v_value);
    }
}

NINTENDO_KEY_TYPE

This tool have support for the following button events.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages