void Awake() { DontDestroyOnLoad(gameObject); buttonsDown = new bool[3]; touchBuffer = new LFTouch[20]; // set up the default controller configs #if !UNITY_WEBPLAYER configPath = Application.persistentDataPath + "/InputConfig.xml"; if(File.Exists(configPath)){ inputMap = InputMap.Load(configPath); }else{ #endif inputMap = new InputMap(); inputMap.SetDefaults(); #if !UNITY_WEBPLAYER inputMap.Save(configPath); } #endif }