private static void CheckInstance() { if (_instance != null) { return; } GameObject go = new GameObject { name = "hinputSettings" }; _instance = go.AddComponent <hSettings>(); }
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()); } }