From a4b257e43872b0e99840eb89322d6bda4a1d616e Mon Sep 17 00:00:00 2001
From: Adam Procter <adam.procter@soton.ac.uk>
Date: Tue, 23 Feb 2021 18:13:37 +0000
Subject: [PATCH] tweaked to work on macOS with PS4 Controller

---
 Assets/Script/Player/SetControls.cs    | 8 ++++----
 ProjectSettings/GraphicsSettings.asset | 4 ++++
 ProjectSettings/InputManager.asset     | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Assets/Script/Player/SetControls.cs b/Assets/Script/Player/SetControls.cs
index f01fd9d..c3c173f 100644
--- a/Assets/Script/Player/SetControls.cs
+++ b/Assets/Script/Player/SetControls.cs
@@ -16,14 +16,14 @@ public class SetControls : MonoBehaviour
         // Set Mac Controls
         if (Application.platform == RuntimePlatform.OSXEditor)
         {
-            jump = Input.GetButtonDown("A Button Mac");
-            pickup = Input.GetButtonDown("B Button Mac");
+            jump = Input.GetButtonDown("X Button Mac");
+            pickup = Input.GetButtonDown("Y Button Mac");
             pause = Input.GetButtonDown("Menu (Start) Mac");
         }
         if (Application.platform == RuntimePlatform.OSXPlayer)
         {
-            jump = Input.GetButtonDown("A Button Mac");
-            pickup = Input.GetButtonDown("B Button Mac");
+            jump = Input.GetButtonDown("X Button Mac");
+            pickup = Input.GetButtonDown("Y Button Mac");
             pause = Input.GetButtonDown("Menu (Start) Mac");
         }
 
diff --git a/ProjectSettings/GraphicsSettings.asset b/ProjectSettings/GraphicsSettings.asset
index 6cf2c97..b44212a 100644
--- a/ProjectSettings/GraphicsSettings.asset
+++ b/ProjectSettings/GraphicsSettings.asset
@@ -36,6 +36,10 @@ GraphicsSettings:
   - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
   - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
   - {fileID: 10783, guid: 0000000000000000f000000000000000, type: 0}
+  - {fileID: 16000, guid: 0000000000000000f000000000000000, type: 0}
+  - {fileID: 16001, guid: 0000000000000000f000000000000000, type: 0}
+  - {fileID: 16002, guid: 0000000000000000f000000000000000, type: 0}
+  - {fileID: 17000, guid: 0000000000000000f000000000000000, type: 0}
   m_PreloadedShaders: []
   m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
     type: 0}
diff --git a/ProjectSettings/InputManager.asset b/ProjectSettings/InputManager.asset
index 91c6490..938e577 100644
--- a/ProjectSettings/InputManager.asset
+++ b/ProjectSettings/InputManager.asset
@@ -682,7 +682,7 @@ InputManager:
     descriptiveName: 
     descriptiveNegativeName: 
     negativeButton: 
-    positiveButton: joystick button 18
+    positiveButton: joystick button 1
     altNegativeButton: 
     altPositiveButton: 
     gravity: 1000
@@ -698,7 +698,7 @@ InputManager:
     descriptiveName: 
     descriptiveNegativeName: 
     negativeButton: 
-    positiveButton: joystick button 19
+    positiveButton: joystick button 0
     altNegativeButton: 
     altPositiveButton: 
     gravity: 1000
-- 
GitLab