gg.easy.airship 0.1.1921 → 0.1.1923
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -307,6 +307,17 @@ namespace Editor.Packages {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
public IEnumerator PublishPackage(AirshipPackageDocument packageDoc, bool skipBuild, bool includeAssets) {
|
|
310
|
+
var confirmTitle = "Package Publish";
|
|
311
|
+
var confirmMessage = $"You are about to publish {packageDoc.id}.";
|
|
312
|
+
#if AIRSHIP_INTERNAL
|
|
313
|
+
confirmTitle = $"{currentEnvironment} Publish";
|
|
314
|
+
confirmMessage = $"You are about to publish {packageDoc.id} to {currentEnvironment}.";
|
|
315
|
+
#endif
|
|
316
|
+
var okWithPublish = EditorUtility.DisplayDialog(confirmTitle, confirmMessage, "Publish", "Cancel");
|
|
317
|
+
if (!okWithPublish) {
|
|
318
|
+
yield break;
|
|
319
|
+
}
|
|
320
|
+
|
|
310
321
|
List<string> possibleKeys;
|
|
311
322
|
if (currentEnvironment == "Staging") {
|
|
312
323
|
possibleKeys = new List<string> { AuthConfig.instance.stagingApiKey, InternalHttpManager.editorAuthToken };
|
|
@@ -132,9 +132,13 @@ namespace Code.Bootstrap {
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
public void CleanupServer() {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
try {
|
|
136
|
+
NetworkServer.UnregisterHandler<RequestScriptsMessage>();
|
|
137
|
+
NetworkServer.UnregisterHandler<ClientFinishedPreparingMessage>();
|
|
138
|
+
NetworkServer.UnregisterHandler<GreetingMessage>();
|
|
139
|
+
} catch (Exception e) {
|
|
140
|
+
Debug.LogException(e);
|
|
141
|
+
}
|
|
138
142
|
}
|
|
139
143
|
|
|
140
144
|
/// <summary>
|
|
@@ -20,6 +20,7 @@ using UnityEngine.Networking;
|
|
|
20
20
|
using UnityEngine.SceneManagement;
|
|
21
21
|
using UnityEngine.Serialization;
|
|
22
22
|
using Debug = UnityEngine.Debug;
|
|
23
|
+
using Random = UnityEngine.Random;
|
|
23
24
|
using SceneManager = UnityEngine.SceneManagement.SceneManager;
|
|
24
25
|
|
|
25
26
|
[Serializable]
|
|
@@ -104,9 +105,11 @@ public class ServerBootstrap : MonoBehaviour
|
|
|
104
105
|
transport.port = port;
|
|
105
106
|
|
|
106
107
|
if (RunCore.IsClient()) {
|
|
108
|
+
// use random port in shared mode
|
|
109
|
+
transport.port = (ushort)Random.Range(7770, 7870);
|
|
110
|
+
print("Listening on port " + transport.port);
|
|
107
111
|
AirshipNetworkManager.singleton.StartHost();
|
|
108
112
|
} else {
|
|
109
|
-
print("Listening on port " + port);
|
|
110
113
|
AirshipNetworkManager.singleton.StartServer();
|
|
111
114
|
}
|
|
112
115
|
} else {
|
|
@@ -129,7 +132,6 @@ public class ServerBootstrap : MonoBehaviour
|
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
private void ProcessExit(object sender, EventArgs args) {
|
|
132
|
-
Debug.Log("----> Process Exit!");
|
|
133
135
|
this.onProcessExit?.Invoke();
|
|
134
136
|
}
|
|
135
137
|
|