Skip to content

Commit 6f3b538

Browse files
committed
Fixed a couple of bugs related to instantiating the RadialController component at runtime.
1 parent 070ac5a commit 6f3b538

File tree

4 files changed

+20
-9
lines changed

4 files changed

+20
-9
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
# Changelog
44

5+
## v0.2.2
6+
7+
### Date: 11/21/2019
8+
9+
### Changes
10+
- Bug Fixes
11+
- Fixed UnityEvents on `RadialController` being null if instanced at runtime.
12+
- Fixed `RadialControllerWindowsBridge.StartServerProcess` not being invoked if the `RadialController` component is instanced at runtime.
13+
514
## v0.2.1
615

716
### Date: 11/20/2019

RadialControllerUnity/Assets/RadialController/RadialController.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public class RadialController : MonoBehaviour {
1111
public float rotationResolutionInDegrees = 10.0f;
1212
public bool useAutoHapticFeedback = true;
1313

14-
public UnityEvent onButtonClicked;
15-
public UnityEvent onButtonPressed;
16-
public UnityEvent onButtonReleased;
17-
public UnityEvent onButtonHolding;
18-
public FloatEvent onRotationChanged;
19-
public UnityEvent onControlAcquired;
20-
public UnityEvent onControlLost;
14+
public UnityEvent onButtonClicked = new UnityEvent();
15+
public UnityEvent onButtonPressed = new UnityEvent();
16+
public UnityEvent onButtonReleased = new UnityEvent();
17+
public UnityEvent onButtonHolding = new UnityEvent();
18+
public FloatEvent onRotationChanged = new FloatEvent();
19+
public UnityEvent onControlAcquired = new UnityEvent();
20+
public UnityEvent onControlLost = new UnityEvent();
2121

2222
private float _prevRotationResolutionInDegrees;
2323
private bool _prevUseAutoHapticFeedback;

RadialControllerUnity/Assets/RadialController/RadialControllerWindowsBridge.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class RadialControllerWindowsBridge : IRadialControllerPlatformBridge
4646

4747
public string Name { get { return "Radial Controller Windows Bridge"; } }
4848

49-
public string Version { get { return "0.2.1"; } }
49+
public string Version { get { return "0.2.2"; } }
5050

5151
public event Action onBridgeReady;
5252
public event Action onButtonClicked;
@@ -64,6 +64,8 @@ public RadialControllerWindowsBridge(RadialController radialController) {
6464
_localUdpClient = new LocalUdpClient("RadialControllerUnityReceiver", Port);
6565
_localUdpClient.ignoreDataFromClient = true;
6666
_localUdpClient.onDataReceived += OnDataReceived;
67+
68+
StartServerProcess();
6769
}
6870

6971
private void StartServerProcess() {

RadialControllerUnity/ProjectSettings/ProjectSettings.asset

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ PlayerSettings:
120120
16:10: 1
121121
16:9: 1
122122
Others: 1
123-
bundleVersion: 0.2.1
123+
bundleVersion: 0.2.2
124124
preloadedAssets: []
125125
metroInputSource: 0
126126
wsaTransparentSwapchain: 0

0 commit comments

Comments
 (0)