Skip to content

Commit b3e14f3

Browse files
committed
r: Cleanup
1 parent 4fd70d7 commit b3e14f3

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

Assets/AirConsole/scripts/Editor/BuildAutomation/AndroidGradleProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Regex versionExtractor
6464
for (int i = 0; i < lines.Length; i++) {
6565
// regex to check the used gradle version
6666
Match match = versionExtractor.Match(lines[i]);
67-
if (lines[i].StartsWith("distributionUrl=")
67+
if (lines[i].StartsWith("distributionUrl=") && match.Success
6868
&& (int.Parse(match.Groups["Major"].Value) < 8
6969
|| int.Parse(match.Groups["Minor"].Value) < 1
7070
|| int.Parse(match.Groups["Build"].Value) < 1)) {

Assets/AirConsole/scripts/Runtime/AirConsole.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@
33
#endif
44

55
namespace NDream.AirConsole {
6-
using UnityEngine;
6+
using NDream.AirConsole.Android.Plugin;
7+
using Newtonsoft.Json.Linq;
78
using System.Collections.Generic;
89
using System.Collections.ObjectModel;
9-
using System;
1010
using System.Diagnostics;
11-
using Android.Plugin;
12-
using WebSocketSharp.Server;
13-
using Newtonsoft.Json.Linq;
14-
using UnityEngine.Serialization;
15-
using UnityEngine.SceneManagement;
1611
using System.Threading;
12+
using System;
13+
using UnityEngine.SceneManagement;
14+
using UnityEngine.Serialization;
15+
using UnityEngine;
16+
using WebSocketSharp.Server;
1717

1818
public enum StartMode {
1919
VirtualControllers,
@@ -1487,7 +1487,7 @@ private void OnReady(JObject msg) {
14871487
UnityEditor.EditorApplication.isPlaying = false;
14881488
throw new Exception("No listeners registered to OnGameAudioFocusChanged. Editor playback stopped.");
14891489
#else
1490-
throw new System.Exception("No listeners registered to OnGameAudioFocusChanged.");
1490+
throw new Exception("No listeners registered to OnGameAudioFocusChanged.");
14911491
#endif
14921492
}
14931493

@@ -2284,7 +2284,7 @@ private void OnLaunchApp(JObject msg) {
22842284

22852285
if (gameId != Application.identifier || gameVersion != instance.androidGameVersion) {
22862286
// Marshal to main thread since this is called from WebSocket background thread
2287-
HandleLaunchAppTransition(msg, gameId, gameVersion);
2287+
eventQueue.Enqueue(() => HandleLaunchAppTransition(msg, gameId, gameVersion));
22882288
}
22892289
}
22902290

Assets/AirConsole/scripts/Runtime/Plugin/Android/PluginManager.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ public class PluginManager {
2323
internal event Action<string> OnAudioFocusChange;
2424

2525
internal PluginManager(AirConsole airConsole) {
26-
AirConsoleLogger.LogDevelopment(() => $"{nameof(PluginManager)} created.");
27-
2826
GenericUnityPluginCallback<bool> pauseCallback = new(HandlePlatformPauseEvent);
2927

3028
UnityPluginStringCallback callback = new(

0 commit comments

Comments
 (0)