void NewProfile(GenericGamepadProfile profile) { if (!InputManager.instance._gamepads.Contains(profile)) { InputManager.instance._gamepads.Add(profile); EditorUtility.SetDirty(InputManager.instance); ProjectTools.RefreshAndSave(); } }
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(); } }
public void RenameProfile(GenericGamepadProfile profile, string newName) { AssetDatabase.RenameAsset(AssetDatabase.GetAssetPath(profile), newName); ProjectTools.RefreshAndSave(); }