1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Rewired.Internal;
using Rewired.Utils.Interfaces;
using Rewired.Utils.Platforms.Windows;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Windows;
namespace Rewired.Utils;
[EditorBrowsable(EditorBrowsableState.Never)]
public class ExternalTools : IExternalTools
{
private static Func<object> _getPlatformInitializerDelegate;
private bool _isEditorPaused;
private Action<bool> _EditorPausedStateChangedEvent;
public static Func<object> getPlatformInitializerDelegate
{
get
{
return _getPlatformInitializerDelegate;
}
set
{
_getPlatformInitializerDelegate = value;
}
}
public bool isEditorPaused => _isEditorPaused;
public bool UnityInput_IsTouchPressureSupported => UnityEngine.Input.touchPressureSupported;
public event Action<bool> EditorPausedStateChangedEvent
{
add
{
_EditorPausedStateChangedEvent = (Action<bool>)Delegate.Combine(_EditorPausedStateChangedEvent, value);
}
remove
{
_EditorPausedStateChangedEvent = (Action<bool>)Delegate.Remove(_EditorPausedStateChangedEvent, value);
}
}
public event Action<uint, bool> XboxOneInput_OnGamepadStateChange;
public void Destroy()
{
}
public object GetPlatformInitializer()
{
return Main.GetPlatformInitializer();
}
public string GetFocusedEditorWindowTitle()
{
return string.Empty;
}
public bool IsEditorSceneViewFocused()
{
return false;
}
public bool LinuxInput_IsJoystickPreconfigured(string name)
{
return false;
}
public int XboxOneInput_GetUserIdForGamepad(uint id)
{
return 0;
}
public ulong XboxOneInput_GetControllerId(uint unityJoystickId)
{
return 0uL;
}
public bool XboxOneInput_IsGamepadActive(uint unityJoystickId)
{
return false;
}
public string XboxOneInput_GetControllerType(ulong xboxControllerId)
{
return string.Empty;
}
public uint XboxOneInput_GetJoystickId(ulong xboxControllerId)
{
return 0u;
}
public void XboxOne_Gamepad_UpdatePlugin()
{
}
public bool XboxOne_Gamepad_SetGamepadVibration(ulong xboxOneJoystickId, float leftMotor, float rightMotor, float leftTriggerLevel, float rightTriggerLevel)
{
return false;
}
public void XboxOne_Gamepad_PulseVibrateMotor(ulong xboxOneJoystickId, int motorInt, float startLevel, float endLevel, ulong durationMS)
{
}
public void GetDeviceVIDPIDs(out List<int> vids, out List<int> pids)
{
vids = new List<int>();
pids = new List<int>();
}
public int GetAndroidAPILevel()
{
return -1;
}
public void WindowsStandalone_ForwardRawInput(IntPtr rawInputHeaderIndices, IntPtr rawInputDataIndices, uint indicesCount, IntPtr rawInputData, uint rawInputDataSize)
{
UnityEngine.Windows.Input.ForwardRawInput(rawInputHeaderIndices, rawInputDataIndices, indicesCount, rawInputData, rawInputDataSize);
}
public bool UnityUI_Graphic_GetRaycastTarget(object graphic)
{
if (graphic as Graphic == null)
{
return false;
}
return (graphic as Graphic).raycastTarget;
}
public void UnityUI_Graphic_SetRaycastTarget(object graphic, bool value)
{
if (!(graphic as Graphic == null))
{
(graphic as Graphic).raycastTarget = value;
}
}
public float UnityInput_GetTouchPressure(ref Touch touch)
{
return touch.pressure;
}
public float UnityInput_GetTouchMaximumPossiblePressure(ref Touch touch)
{
return touch.maximumPossiblePressure;
}
public IControllerTemplate CreateControllerTemplate(Guid typeGuid, object payload)
{
return ControllerTemplateFactory.Create(typeGuid, payload);
}
public Type[] GetControllerTemplateTypes()
{
return ControllerTemplateFactory.templateTypes;
}
public Type[] GetControllerTemplateInterfaceTypes()
{
return ControllerTemplateFactory.templateInterfaceTypes;
}
}
|