Example #1
0
 void NewProfile(GenericGamepadProfile profile)
 {
     if (!InputManager.instance._gamepads.Contains(profile))
     {
         InputManager.instance._gamepads.Add(profile);
         EditorUtility.SetDirty(InputManager.instance);
         ProjectTools.RefreshAndSave();
     }
 }
Example #2
0
 public void DeleteProfile(GenericGamepadProfile toDelete)
 {
     if (EditorUtility.DisplayDialog("Delete Gamepad Profile", "Are you sure you want to delete profile: " + toDelete.name + "?", "Yes", "No"))
     {
         InputManager.instance._gamepads.Remove(toDelete);
         EditorUtility.SetDirty(InputManager.instance);
         AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath(toDelete));
         ProjectTools.RefreshAndSave();
     }
 }
Example #3
0
 public void RenameProfile(GenericGamepadProfile profile, string newName)
 {
     AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath(profile), newName);
     ProjectTools.RefreshAndSave();
 }