gg.easy.airship 0.1.2150 → 0.1.2153
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.
- package/Editor/Artifacts/AirshipPrefabUtility.cs +1 -1
- package/Editor/GrayProfilePicture.png +0 -0
- package/Editor/GrayProfilePicture.png.meta +11 -8
- package/Editor/Toolbar/EditorToolbar.cs +51 -34
- package/Editor/TypescriptServices/Compiler/TypescriptCompilationService.cs +0 -6
- package/Runtime/Code/Bootstrap/BundleDownloader.cs +5 -0
- package/Runtime/Code/Bootstrap/ClientBundleLoader.cs +15 -3
- package/Runtime/Code/CoreUI/CoreLoadingScreen.prefab +1086 -41
- package/Runtime/Code/CoreUI/Loading/CoreLoadingScreen.cs +24 -9
- package/Runtime/Code/Luau/Editor/LuauCoreEditor.cs +14 -1
- package/Runtime/Code/MainMenu/MainMenuSceneManager.cs +1 -3
- package/Runtime/Code/Network/Messaging/MessagingManager.cs +477 -0
- package/Runtime/Code/Network/Messaging/MessagingManager.cs.meta +2 -0
- package/Runtime/Code/Network/Messaging.meta +8 -0
- package/Runtime/Code/Network/Simulation/AirshipNetworkedObject.cs +4 -4
- package/Runtime/Code/Network/Simulation/AirshipSimulationManager.cs +10 -10
- package/Runtime/Code/Network/Simulation/History.cs +16 -16
- package/Runtime/Code/Network/StateSystem/AirshipNetworkedStateManager.cs +74 -55
- package/Runtime/Code/Network/StateSystem/Implementations/TestMovementSystem/TestMovement.cs +3 -3
- package/Runtime/Code/Network/StateSystem/NetworkedStateSystem.cs +3 -3
- package/Runtime/Code/Network/StateSystem/Structures/InputCommand.cs +1 -1
- package/Runtime/Code/Network/StateSystem/Structures/StateDiff.cs +1 -1
- package/Runtime/Code/Network/StateSystem/Structures/StateSnapshot.cs +2 -2
- package/Runtime/Code/Platform/Shared/AirshipPlatformUrl.cs +7 -0
- package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovement.cs +4 -4
- package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterSnapshotData.cs +27 -21
- package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterStateDiff.cs +1 -1
- package/Runtime/Code/VisualGraph/VisualGraphUI.shadergraph +17 -14
- package/Runtime/Scenes/CoreScene.unity +165 -0
- package/ThirdParty/Mirror/Core/NetworkManager.cs +6 -2
- package/ThirdParty/Packages/MQTTnet.4.3.7/MQTTnet.nuspec +41 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7/MQTTnet.nuspec.meta +7 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7/lib/netstandard2.0/MQTTnet.dll +0 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7/lib/netstandard2.0/MQTTnet.dll.meta +2 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7/lib/netstandard2.0.meta +8 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7/lib.meta +8 -0
- package/ThirdParty/Packages/MQTTnet.4.3.7.meta +8 -0
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ namespace Airship.Editor {
|
|
|
17
17
|
return false;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
var meshFilter = component.GetComponentsInChildren<MeshFilter>(); // because of 'SendMessage' we can't force reconcile these
|
|
20
|
+
var meshFilter = component.GetComponentsInChildren<MeshFilter>(true); // because of 'SendMessage' we can't force reconcile these
|
|
21
21
|
if (meshFilter.Length > 0) {
|
|
22
22
|
prefabComponent = null;
|
|
23
23
|
return false;
|
|
Binary file
|
|
@@ -43,7 +43,7 @@ TextureImporter:
|
|
|
43
43
|
nPOTScale: 0
|
|
44
44
|
lightmap: 0
|
|
45
45
|
compressionQuality: 50
|
|
46
|
-
spriteMode:
|
|
46
|
+
spriteMode: 2
|
|
47
47
|
spriteExtrude: 1
|
|
48
48
|
spriteMeshType: 1
|
|
49
49
|
alignment: 0
|
|
@@ -67,9 +67,9 @@ TextureImporter:
|
|
|
67
67
|
swizzle: 50462976
|
|
68
68
|
cookieLightType: 0
|
|
69
69
|
platformSettings:
|
|
70
|
-
- serializedVersion:
|
|
70
|
+
- serializedVersion: 4
|
|
71
71
|
buildTarget: DefaultTexturePlatform
|
|
72
|
-
maxTextureSize:
|
|
72
|
+
maxTextureSize: 128
|
|
73
73
|
resizeAlgorithm: 0
|
|
74
74
|
textureFormat: -1
|
|
75
75
|
textureCompression: 1
|
|
@@ -80,7 +80,7 @@ TextureImporter:
|
|
|
80
80
|
ignorePlatformSupport: 0
|
|
81
81
|
androidETC2FallbackOverride: 0
|
|
82
82
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
83
|
-
- serializedVersion:
|
|
83
|
+
- serializedVersion: 4
|
|
84
84
|
buildTarget: Standalone
|
|
85
85
|
maxTextureSize: 2048
|
|
86
86
|
resizeAlgorithm: 0
|
|
@@ -93,7 +93,7 @@ TextureImporter:
|
|
|
93
93
|
ignorePlatformSupport: 0
|
|
94
94
|
androidETC2FallbackOverride: 0
|
|
95
95
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
96
|
-
- serializedVersion:
|
|
96
|
+
- serializedVersion: 4
|
|
97
97
|
buildTarget: Server
|
|
98
98
|
maxTextureSize: 2048
|
|
99
99
|
resizeAlgorithm: 0
|
|
@@ -106,7 +106,7 @@ TextureImporter:
|
|
|
106
106
|
ignorePlatformSupport: 0
|
|
107
107
|
androidETC2FallbackOverride: 0
|
|
108
108
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
109
|
-
- serializedVersion:
|
|
109
|
+
- serializedVersion: 4
|
|
110
110
|
buildTarget: Android
|
|
111
111
|
maxTextureSize: 2048
|
|
112
112
|
resizeAlgorithm: 0
|
|
@@ -119,8 +119,8 @@ TextureImporter:
|
|
|
119
119
|
ignorePlatformSupport: 0
|
|
120
120
|
androidETC2FallbackOverride: 0
|
|
121
121
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
|
122
|
-
- serializedVersion:
|
|
123
|
-
buildTarget:
|
|
122
|
+
- serializedVersion: 4
|
|
123
|
+
buildTarget: iOS
|
|
124
124
|
maxTextureSize: 2048
|
|
125
125
|
resizeAlgorithm: 0
|
|
126
126
|
textureFormat: -1
|
|
@@ -136,6 +136,7 @@ TextureImporter:
|
|
|
136
136
|
serializedVersion: 2
|
|
137
137
|
sprites: []
|
|
138
138
|
outline: []
|
|
139
|
+
customData:
|
|
139
140
|
physicsShape: []
|
|
140
141
|
bones: []
|
|
141
142
|
spriteID: 5e97eb03825dee720800000000000000
|
|
@@ -145,6 +146,8 @@ TextureImporter:
|
|
|
145
146
|
edges: []
|
|
146
147
|
weights: []
|
|
147
148
|
secondaryTextures: []
|
|
149
|
+
spriteCustomMetadata:
|
|
150
|
+
entries: []
|
|
148
151
|
nameFileIdTable: {}
|
|
149
152
|
mipmapLimitGroupName:
|
|
150
153
|
pSDRemoveMatte: 0
|
|
@@ -159,6 +159,7 @@ namespace Airship.Editor
|
|
|
159
159
|
private static Material profilePicRounded;
|
|
160
160
|
private static Texture signedOutIcon;
|
|
161
161
|
private static Texture2D signedInIcon;
|
|
162
|
+
private static Texture2D signedInIconRaw;
|
|
162
163
|
public static byte[] signedInIconBytes = new byte[]{};
|
|
163
164
|
/** True when fetching game info for publish (publish shouldn't be clickable during this) */
|
|
164
165
|
private static bool fetchingPublishInfo;
|
|
@@ -178,16 +179,13 @@ namespace Airship.Editor
|
|
|
178
179
|
RunCore.launchInDedicatedServerMode = EditorPrefs.GetBool("AirshipDedicatedServerMode", false);
|
|
179
180
|
ToolbarExtender.RightToolbarGUI.Add(OnRightToolbarGUI);
|
|
180
181
|
ToolbarExtender.LeftToolbarGUI.Add(OnLeftToolbarGUI);
|
|
181
|
-
|
|
182
|
+
|
|
182
183
|
if (EditorAuthManager.localUser != null || !string.IsNullOrEmpty(InternalHttpManager.editorUserId)) {
|
|
183
184
|
FetchAndUpdateSignedInIcon();
|
|
184
185
|
}
|
|
185
186
|
EditorAuthManager.localUserChanged += (user) => {
|
|
186
187
|
if (EditorAuthManager.signInStatus != EditorAuthSignInStatus.SIGNED_IN) {
|
|
187
188
|
signedInIconBytes = new byte[]{};
|
|
188
|
-
// EditorIcons.Instance.signedInIcon = new byte[] {};
|
|
189
|
-
// EditorUtility.SetDirty(EditorIcons.Instance);
|
|
190
|
-
// AssetDatabase.SaveAssetIfDirty(EditorIcons.Instance);
|
|
191
189
|
RepaintToolbar();
|
|
192
190
|
return;
|
|
193
191
|
}
|
|
@@ -204,12 +202,8 @@ namespace Airship.Editor
|
|
|
204
202
|
EditorAuthManager.DownloadProfilePicture().ContinueWith((t) => {
|
|
205
203
|
if (t.Result == null) return;
|
|
206
204
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
// EditorIcons.Instance.signedInIcon = signedInIcon.EncodeToPNG();
|
|
210
|
-
// EditorUtility.SetDirty(EditorIcons.Instance);
|
|
211
|
-
// AssetDatabase.SaveAssetIfDirty(EditorIcons.Instance);
|
|
212
|
-
RepaintToolbar();
|
|
205
|
+
signedInIconRaw = t.Result;
|
|
206
|
+
GetSignedInIcon();
|
|
213
207
|
}, TaskScheduler.FromCurrentSynchronizationContext());
|
|
214
208
|
}
|
|
215
209
|
|
|
@@ -242,24 +236,34 @@ namespace Airship.Editor
|
|
|
242
236
|
}
|
|
243
237
|
}
|
|
244
238
|
|
|
245
|
-
private static Texture2D
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
profilePicRounded = AssetDatabase.LoadAssetAtPath<Material>("Packages/gg.easy.airship/Editor/Hidden_EditorProfilePicRounded.mat");
|
|
251
|
-
|
|
252
|
-
RenderTexture.active = rt;
|
|
253
|
-
Graphics.Blit(source, rt, profilePicRounded);
|
|
239
|
+
private static Texture2D ResizeAndRoundTexture(Texture2D source, int targetWidth, int targetHeight) {
|
|
240
|
+
if (source == null || !source.isReadable) {
|
|
241
|
+
Debug.LogError("Unable to set signed in icon: Source texture is null or unreadable.");
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
254
244
|
|
|
255
|
-
|
|
245
|
+
// Downsize texture and round on CPU. There are problems when using Graphics.Blit to
|
|
246
|
+
// create this texture (it may not be ready on startup and will cause crashes when not
|
|
247
|
+
// ready).
|
|
248
|
+
var result = new Texture2D(targetWidth, targetHeight);
|
|
249
|
+
var newPixels = new Color[targetHeight * targetWidth];
|
|
250
|
+
var srcPixels = source.GetPixels();
|
|
251
|
+
for (var x = 0; x < targetWidth; x++) {
|
|
252
|
+
for (var y = 0; y < targetHeight; y++) {
|
|
253
|
+
var u = x / (float)targetWidth;
|
|
254
|
+
var v = y / (float)targetHeight;
|
|
255
|
+
// Cut out pixels outside of a circle
|
|
256
|
+
if ((u - 0.5) * (u - 0.5) + (v - 0.5) * (v - 0.5) > 0.25) continue;
|
|
257
|
+
|
|
258
|
+
var i = x + y * targetWidth;
|
|
259
|
+
var srcX = Mathf.Clamp(Mathf.RoundToInt(u * source.width), 0, source.width - 1);
|
|
260
|
+
var srcY = Mathf.Clamp(Mathf.RoundToInt(v * source.height), 0, source.height - 1);
|
|
261
|
+
newPixels[i] = srcPixels[srcX + srcY * source.width];
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
result.SetPixels(newPixels);
|
|
256
265
|
result.filterMode = FilterMode.Bilinear;
|
|
257
|
-
result.ReadPixels(new Rect(0, 0, targetWidth, targetHeight), 0, 0);
|
|
258
266
|
result.Apply();
|
|
259
|
-
|
|
260
|
-
RenderTexture.active = null;
|
|
261
|
-
RenderTexture.ReleaseTemporary(rt);
|
|
262
|
-
|
|
263
267
|
return result;
|
|
264
268
|
}
|
|
265
269
|
|
|
@@ -280,14 +284,7 @@ namespace Airship.Editor
|
|
|
280
284
|
if (gameSettings == null)
|
|
281
285
|
gameSettings = AssetDatabase.LoadAssetAtPath<Texture2D>(IconSettings);
|
|
282
286
|
if (signedOutIcon == null)
|
|
283
|
-
signedOutIcon =
|
|
284
|
-
if (signedInIcon == null && AirshipToolbar.signedInIconBytes != null && AirshipToolbar.signedInIconBytes.Length > 0) {
|
|
285
|
-
Texture2D result = new Texture2D(128, 128);
|
|
286
|
-
result.filterMode = FilterMode.Bilinear;
|
|
287
|
-
result.LoadImage(AirshipToolbar.signedInIconBytes);
|
|
288
|
-
result.Apply();
|
|
289
|
-
signedInIcon = result;
|
|
290
|
-
}
|
|
287
|
+
signedOutIcon = AssetDatabase.LoadAssetAtPath<Texture2D>(SignedOutIcon);
|
|
291
288
|
|
|
292
289
|
if (coreUpdateTexture == null) {
|
|
293
290
|
coreUpdateTexture = AssetDatabase.LoadAssetAtPath<Texture2D>(coreUpdateIcon);
|
|
@@ -327,7 +324,7 @@ namespace Airship.Editor
|
|
|
327
324
|
GUI.enabled = true;
|
|
328
325
|
|
|
329
326
|
EditorGUIUtility.SetIconSize(new Vector2(16, 16));
|
|
330
|
-
Texture profileIcon =
|
|
327
|
+
Texture profileIcon = GetSignedInIcon();
|
|
331
328
|
if (profileIcon == null || EditorAuthManager.signInStatus == EditorAuthSignInStatus.SIGNED_OUT) {
|
|
332
329
|
profileIcon = signedOutIcon;
|
|
333
330
|
}
|
|
@@ -466,5 +463,25 @@ namespace Airship.Editor
|
|
|
466
463
|
|
|
467
464
|
GUILayout.Space(5);
|
|
468
465
|
}
|
|
466
|
+
|
|
467
|
+
private static Texture2D GetSignedInIcon() {
|
|
468
|
+
if (signedInIcon != null) return signedInIcon;
|
|
469
|
+
|
|
470
|
+
if (AirshipToolbar.signedInIconBytes != null && AirshipToolbar.signedInIconBytes.Length > 0) {
|
|
471
|
+
Texture2D result = new Texture2D(128, 128);
|
|
472
|
+
result.filterMode = FilterMode.Bilinear;
|
|
473
|
+
result.LoadImage(AirshipToolbar.signedInIconBytes);
|
|
474
|
+
result.Apply();
|
|
475
|
+
signedInIcon = result;
|
|
476
|
+
return signedInIcon;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
if (signedInIconRaw != null) {
|
|
480
|
+
signedInIcon = ResizeAndRoundTexture(signedInIconRaw, 128, 128);
|
|
481
|
+
signedInIconBytes = signedInIcon.EncodeToPNG();
|
|
482
|
+
return signedInIcon;
|
|
483
|
+
}
|
|
484
|
+
return null;
|
|
485
|
+
}
|
|
469
486
|
}
|
|
470
487
|
}
|
|
@@ -475,12 +475,6 @@ using Object = UnityEngine.Object;
|
|
|
475
475
|
BuildTypescript(new []{ TypescriptProjectsService.Project }, flags);
|
|
476
476
|
}
|
|
477
477
|
internal static void BuildTypescript(TypescriptProject[] projects, TypeScriptCompileFlags compileFlags = 0) {
|
|
478
|
-
var gameConfig = GameConfig.Load();
|
|
479
|
-
if (!gameConfig) {
|
|
480
|
-
Debug.LogError("Failed to load gameConfig for compilation step");
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
478
|
var isRunningServices = TypescriptCompilationServicesState.instance.CompilerCount > 0;
|
|
485
479
|
if (isRunningServices) StopCompilerServices();
|
|
486
480
|
|
|
@@ -180,6 +180,11 @@ public class BundleDownloader : Singleton<BundleDownloader> {
|
|
|
180
180
|
if (i >= bundleFilesToDownload.Count) break; // code.zip requests
|
|
181
181
|
var remoteBundleFile = bundleFilesToDownload[i];
|
|
182
182
|
bool success = false;
|
|
183
|
+
|
|
184
|
+
// Test error
|
|
185
|
+
// Debug.LogError("Forcing download fail.");
|
|
186
|
+
// onComplete?.Invoke(false);
|
|
187
|
+
// return false;
|
|
183
188
|
|
|
184
189
|
if (request.webRequest.result != UnityWebRequest.Result.Success) {
|
|
185
190
|
var statusCode = request.webRequest.responseCode;
|
|
@@ -55,6 +55,7 @@ namespace Code.Bootstrap {
|
|
|
55
55
|
[SerializeField]
|
|
56
56
|
public ServerBootstrap serverBootstrap;
|
|
57
57
|
private List<NetworkConnectionToClient> connectionsReadyToLoadGameScene = new();
|
|
58
|
+
private InitializeGameMessage initMessage;
|
|
58
59
|
|
|
59
60
|
public bool scriptsReady = false;
|
|
60
61
|
public bool packagesReady = false;
|
|
@@ -144,6 +145,10 @@ namespace Code.Bootstrap {
|
|
|
144
145
|
}
|
|
145
146
|
}
|
|
146
147
|
|
|
148
|
+
public void RetryDownload() {
|
|
149
|
+
StartCoroutine(this.LoadPackages(this.initMessage.startupConfig));
|
|
150
|
+
}
|
|
151
|
+
|
|
147
152
|
/// <summary>
|
|
148
153
|
/// Called when client starts but before it's ready.
|
|
149
154
|
/// </summary>
|
|
@@ -163,6 +168,7 @@ namespace Code.Bootstrap {
|
|
|
163
168
|
this.isFinishedPreparing = false;
|
|
164
169
|
|
|
165
170
|
NetworkClient.RegisterHandler<InitializeGameMessage>(async data => {
|
|
171
|
+
this.initMessage = data;
|
|
166
172
|
NetworkManager.networkSceneName = data.startupConfig.StartingSceneName;
|
|
167
173
|
|
|
168
174
|
StartCoroutine(this.LoadPackages(data.startupConfig));
|
|
@@ -361,16 +367,16 @@ namespace Code.Bootstrap {
|
|
|
361
367
|
} else {
|
|
362
368
|
BundleDownloader.Instance.downloadAccepted = false;
|
|
363
369
|
bool finishedDownload = false;
|
|
364
|
-
BundleDownloader.Instance.DownloadBundles(
|
|
370
|
+
var downloadResult = BundleDownloader.Instance.DownloadBundles(
|
|
365
371
|
startupConfig.CdnUrl,
|
|
366
372
|
packages.ToArray(),
|
|
367
373
|
null,
|
|
368
374
|
loadingScreen,
|
|
369
375
|
null,
|
|
370
376
|
false,
|
|
371
|
-
|
|
377
|
+
(success) => {
|
|
372
378
|
finishedDownload = true;
|
|
373
|
-
if (!
|
|
379
|
+
if (!success) {
|
|
374
380
|
loadingScreen.SetError("Failed to download game content. An error has occurred.");
|
|
375
381
|
}
|
|
376
382
|
}
|
|
@@ -379,6 +385,12 @@ namespace Code.Bootstrap {
|
|
|
379
385
|
while (!finishedDownload) {
|
|
380
386
|
yield return null;
|
|
381
387
|
}
|
|
388
|
+
|
|
389
|
+
// Something failed in the bundle downloader.
|
|
390
|
+
// So we stop and wait for player to press retry (which calls this function again)
|
|
391
|
+
if (!downloadResult.Result) {
|
|
392
|
+
yield break;
|
|
393
|
+
}
|
|
382
394
|
|
|
383
395
|
yield return new WaitUntil(() => this.scriptsReady);
|
|
384
396
|
}
|