JoyShockLibrary (#213)
Fix PlayerInput.cs errors on MacOS Fix libraries not being added to the final build
This commit is contained in:
parent
26ff58a407
commit
d41463ed82
BIN
Assets/.DS_Store
vendored
Normal file
BIN
Assets/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Assets/Plugins/.DS_Store
vendored
Normal file
BIN
Assets/Plugins/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -11,6 +11,24 @@ PluginImporter:
|
|||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 0
|
||||
Exclude Editor: 0
|
||||
Exclude Linux64: 0
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude Win: 0
|
||||
Exclude Win64: 0
|
||||
Exclude iOS: 0
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
|
@ -19,10 +37,11 @@ PluginImporter:
|
|||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
|
@ -32,13 +51,13 @@ PluginImporter:
|
|||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
|
@ -47,6 +66,15 @@ PluginImporter:
|
|||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
BIN
Assets/Plugins/JSL/.DS_Store
vendored
Normal file
BIN
Assets/Plugins/JSL/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
Assets/Plugins/JSL/x64/libJoyShockLibrary.dylib
Executable file
BIN
Assets/Plugins/JSL/x64/libJoyShockLibrary.dylib
Executable file
Binary file not shown.
80
Assets/Plugins/JSL/x64/libJoyShockLibrary.dylib.meta
Normal file
80
Assets/Plugins/JSL/x64/libJoyShockLibrary.dylib.meta
Normal file
|
@ -0,0 +1,80 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 53ce567e644ef4880b1db00e550aa797
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 1
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 0
|
||||
Exclude Editor: 0
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 0
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -6,9 +6,30 @@ PluginImporter:
|
|||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
defineConstraints: []
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
isExplicitlyReferenced: 0
|
||||
validateReferences: 1
|
||||
platformData:
|
||||
- first:
|
||||
: Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Android: 1
|
||||
Exclude Editor: 0
|
||||
Exclude Linux64: 1
|
||||
Exclude OSXUniversal: 0
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
Exclude iOS: 1
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: ARMv7
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
|
@ -19,7 +40,15 @@ PluginImporter:
|
|||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: None
|
||||
- first:
|
||||
Standalone: OSXIntel
|
||||
second:
|
||||
|
@ -34,7 +63,29 @@ PluginImporter:
|
|||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
iPhone: iOS
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
AddToEmbeddedBinaries: false
|
||||
CPU: AnyCPU
|
||||
CompileFlags:
|
||||
FrameworkDependencies:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
BIN
Assets/Scripts/.DS_Store
vendored
Normal file
BIN
Assets/Scripts/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -87,6 +87,17 @@ namespace HeavenStudio
|
|||
|
||||
public static InputController GetInputController(int player)
|
||||
{
|
||||
// Needed so Keyboard works on MacOS
|
||||
#if UNITY_EDITOR_OSX
|
||||
inputDevices = new List<InputController>();
|
||||
if(inputDevices.Count < 1)
|
||||
{
|
||||
InputKeyboard keyboard = new InputKeyboard();
|
||||
keyboard.SetPlayer(1);
|
||||
keyboard.InitializeController();
|
||||
inputDevices.Add(keyboard);
|
||||
}
|
||||
#endif
|
||||
//select input controller that has player field set to player
|
||||
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
||||
//so such controllers should have a reference to the other controller in the pair
|
||||
|
@ -106,6 +117,19 @@ namespace HeavenStudio
|
|||
//this will return the first controller that has that player number in the case of controller pairs (eg. Joy-Cons)
|
||||
//so such controllers should have a reference to the other controller in the pair
|
||||
//controller IDs are determined by connection order (the Keyboard is always first)
|
||||
|
||||
|
||||
// Needed so Keyboard works on MacOS
|
||||
#if UNITY_EDITOR_OSX
|
||||
inputDevices = new List<InputController>();
|
||||
if(inputDevices.Count < 1)
|
||||
{
|
||||
InputKeyboard keyboard = new InputKeyboard();
|
||||
keyboard.SetPlayer(1);
|
||||
keyboard.InitializeController();
|
||||
inputDevices.Add(keyboard);
|
||||
}
|
||||
#endif
|
||||
for (int i = 0; i < inputDevices.Count; i++)
|
||||
{
|
||||
if (inputDevices[i].GetPlayer() == player)
|
||||
|
@ -118,6 +142,17 @@ namespace HeavenStudio
|
|||
|
||||
public static void UpdateInputControllers()
|
||||
{
|
||||
// Needed so Keyboard works on MacOS
|
||||
#if UNITY_EDITOR_OSX
|
||||
inputDevices = new List<InputController>();
|
||||
if(inputDevices.Count < 1)
|
||||
{
|
||||
InputKeyboard keyboard = new InputKeyboard();
|
||||
keyboard.SetPlayer(1);
|
||||
keyboard.InitializeController();
|
||||
inputDevices.Add(keyboard);
|
||||
}
|
||||
#endif
|
||||
foreach (InputController i in inputDevices)
|
||||
{
|
||||
i.UpdateState();
|
||||
|
|
Loading…
Reference in a new issue