Skip to content

Commit

Permalink
Fixed a couple of bugs related to instantiating the RadialController …
Browse files Browse the repository at this point in the history
…component at runtime.
  • Loading branch information
Blitzy committed Nov 21, 2019
1 parent 070ac5a commit 6f3b538
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

# Changelog

## v0.2.2

### Date: 11/21/2019

### Changes
- Bug Fixes
- Fixed UnityEvents on `RadialController` being null if instanced at runtime.
- Fixed `RadialControllerWindowsBridge.StartServerProcess` not being invoked if the `RadialController` component is instanced at runtime.

## v0.2.1

### Date: 11/20/2019
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ public class RadialController : MonoBehaviour {
public float rotationResolutionInDegrees = 10.0f;
public bool useAutoHapticFeedback = true;

public UnityEvent onButtonClicked;
public UnityEvent onButtonPressed;
public UnityEvent onButtonReleased;
public UnityEvent onButtonHolding;
public FloatEvent onRotationChanged;
public UnityEvent onControlAcquired;
public UnityEvent onControlLost;
public UnityEvent onButtonClicked = new UnityEvent();
public UnityEvent onButtonPressed = new UnityEvent();
public UnityEvent onButtonReleased = new UnityEvent();
public UnityEvent onButtonHolding = new UnityEvent();
public FloatEvent onRotationChanged = new FloatEvent();
public UnityEvent onControlAcquired = new UnityEvent();
public UnityEvent onControlLost = new UnityEvent();

private float _prevRotationResolutionInDegrees;
private bool _prevUseAutoHapticFeedback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class RadialControllerWindowsBridge : IRadialControllerPlatformBridge

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

public string Version { get { return "0.2.1"; } }
public string Version { get { return "0.2.2"; } }

public event Action onBridgeReady;
public event Action onButtonClicked;
Expand All @@ -64,6 +64,8 @@ public RadialControllerWindowsBridge(RadialController radialController) {
_localUdpClient = new LocalUdpClient("RadialControllerUnityReceiver", Port);
_localUdpClient.ignoreDataFromClient = true;
_localUdpClient.onDataReceived += OnDataReceived;

StartServerProcess();
}

private void StartServerProcess() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.2.1
bundleVersion: 0.2.2
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down

0 comments on commit 6f3b538

Please sign in to comment.