Beispiel #1
0
    private static void CheckInstance()
    {
        if (_instance != null)
        {
            return;
        }

        GameObject go = new GameObject {
            name = "hinputSettings"
        };

        _instance = go.AddComponent <hSettings>();
    }
Beispiel #2
0
    private void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        if (_instance != this)
        {
            Destroy(this);
        }
        DontDestroyOnLoad(this);

        if (_buildAllOnStartUp)
        {
            hinput.anyGamepad.BuildAll();
            //for (int i=0; i<hUtils.maxGamepads; i++) hinput.gamepad[i].BuildAll();
            hinput.gamepad.ForEach(item => item.BuildAll());
        }
    }