gg.easy.airship 0.1.2154 → 0.1.2156
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/BuildMenu.cs +26 -3
- package/Editor/NetworkPrefabManager.cs +30 -0
- package/Editor/Toolbar/EditorToolbar.cs +18 -4
- package/Editor/TypescriptCompiler~/utsc.js +92 -92
- package/Editor/TypescriptServices/Compiler/TypescriptCompilationService.cs +19 -1
- package/Editor/TypescriptServices/Projects/TypescriptProject.cs +5 -0
- package/Editor/TypescriptServices/TypescriptServices.cs +1 -1
- package/Runtime/Code/AirshipConst.cs +2 -2
- package/Runtime/Code/Auth/AuthManager.cs +6 -1
- package/Runtime/Code/Authentication/EditorAuthManager.cs +26 -4
- package/Runtime/Code/CoreUI/Login/LoginApp.cs +4 -2
- package/Runtime/Code/Luau/LuauScript.cs +1 -1
- package/Runtime/Code/LuauAPI/AirshipBehaviourHelper.cs +6 -0
- package/Runtime/Code/MainMenu/MainMenuSceneManager.cs +4 -0
- package/Runtime/Code/Network/Simulation/AirshipNetworkedObject.cs +7 -5
- package/Runtime/Code/Network/Simulation/AirshipOfflineRigidbody.cs +5 -3
- package/Runtime/Code/Network/StateSystem/AirshipNetworkedStateManager.cs +7 -4
- package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovement.cs +1 -8
- package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovementSettings.cs +1 -1
- package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterSnapshotData.cs +4 -14
- package/Runtime/Code/Player/OcclusionCam.cs +28 -49
- package/Runtime/Code/Steam/SteamLuauAPI.cs +84 -11
- package/Runtime/Code/Util/Singleton.cs +1 -0
- package/Runtime/Plugins/Android/libLuauPlugin.so +0 -0
- package/Runtime/Plugins/Linux/libLuauPlugin.so +0 -0
- package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/MacOS/LuauPlugin +0 -0
- package/Runtime/Plugins/Windows/x64/LuauPlugin.dll +0 -0
- package/Runtime/Plugins/Windows/x64/LuauPlugin.pdb +0 -0
- package/Runtime/Plugins/iOS/LuauPluginIos.a +0 -0
- package/ThirdParty/NativeGallery/Editor/NGPostProcessBuild.cs +2 -2
- package/package.json +1 -1
package/Editor/BuildMenu.cs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#if UNITY_EDITOR
|
|
2
2
|
using System;
|
|
3
3
|
using System.Collections.Generic;
|
|
4
|
+
using System.Linq;
|
|
4
5
|
using UnityEditor;
|
|
5
6
|
using UnityEditor.Build;
|
|
6
7
|
using UnityEditor.Build.Profile;
|
|
@@ -186,7 +187,7 @@ namespace Editor {
|
|
|
186
187
|
#endif
|
|
187
188
|
}
|
|
188
189
|
|
|
189
|
-
public static void BuildIOSClient(bool development) {
|
|
190
|
+
public static void BuildIOSClient(bool development, bool staging) {
|
|
190
191
|
#if UNITY_EDITOR_OSX
|
|
191
192
|
OnBuild();
|
|
192
193
|
CreateAssetBundles.ResetScenes();
|
|
@@ -198,6 +199,14 @@ namespace Editor {
|
|
|
198
199
|
options.scenes = scenes;
|
|
199
200
|
options.locationPathName = "build/client_ios";
|
|
200
201
|
options.target = BuildTarget.iOS;
|
|
202
|
+
|
|
203
|
+
var extraDefines = new List<string>();
|
|
204
|
+
if (staging) {
|
|
205
|
+
extraDefines.Add("AIRSHIP_STAGING");
|
|
206
|
+
extraDefines.Add("AIRSHIP_INTERNAL");
|
|
207
|
+
}
|
|
208
|
+
options.extraScriptingDefines = extraDefines.ToArray();
|
|
209
|
+
|
|
201
210
|
if (development == true) {
|
|
202
211
|
options.options = BuildOptions.Development;
|
|
203
212
|
}
|
|
@@ -270,12 +279,26 @@ namespace Editor {
|
|
|
270
279
|
#if AIRSHIP_PLAYER
|
|
271
280
|
[MenuItem("Airship/Create Binary/Client/iOS", priority = 80)]
|
|
272
281
|
public static void BuildIOSClientMenuItem() {
|
|
273
|
-
|
|
282
|
+
PlayerSettings.GetScriptingDefineSymbols(NamedBuildTarget.Standalone, out var defines);
|
|
283
|
+
if (defines.Contains("AIRSHIP_STAGING")) {
|
|
284
|
+
var list = new List<string>(defines);
|
|
285
|
+
list.Remove("AIRSHIP_STAGING");
|
|
286
|
+
defines = list.ToArray();
|
|
287
|
+
}
|
|
288
|
+
PlayerSettings.SetScriptingDefineSymbols(NamedBuildTarget.Standalone, defines);
|
|
289
|
+
|
|
290
|
+
BuildIOSClient(false, false);
|
|
274
291
|
}
|
|
275
292
|
|
|
276
293
|
[MenuItem("Airship/Create Binary/Client/iOS (Development)", priority = 80)]
|
|
277
294
|
public static void BuildIOSDevelopmentClientMenuItem() {
|
|
278
|
-
BuildIOSClient(true);
|
|
295
|
+
BuildIOSClient(true, false);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
[MenuItem("Airship/Create Binary/Client/iOS (Staging)", priority = 80)]
|
|
299
|
+
public static void BuildIOSClientStagingMenuItem() {
|
|
300
|
+
Debug.Log("Building iOS staging client..");
|
|
301
|
+
BuildIOSClient(false, true);
|
|
279
302
|
}
|
|
280
303
|
|
|
281
304
|
[MenuItem("Airship/Create Binary/Client/Android", priority = 80)]
|
|
@@ -12,6 +12,7 @@ using UnityEditor.Search;
|
|
|
12
12
|
using UnityEngine;
|
|
13
13
|
using UnityEngine.Profiling;
|
|
14
14
|
using Debug = UnityEngine.Debug;
|
|
15
|
+
using Object = UnityEngine.Object;
|
|
15
16
|
|
|
16
17
|
internal class AssetData {
|
|
17
18
|
/** The asset's _full_ path. */
|
|
@@ -186,6 +187,10 @@ public class NetworkPrefabManager : AssetPostprocessor {
|
|
|
186
187
|
var assetData = GetAssetDataFromPath(assetPath);
|
|
187
188
|
WriteToCollection(nob, assetData, modifiedCollections);
|
|
188
189
|
}
|
|
190
|
+
|
|
191
|
+
// Automatically clean up the _game-specific_ collection.
|
|
192
|
+
var gameCollection = GetGameCollection();
|
|
193
|
+
RemoveInvalidEntries(gameCollection);
|
|
189
194
|
|
|
190
195
|
// Save ALL collections.
|
|
191
196
|
foreach (var collection in modifiedCollections) {
|
|
@@ -278,5 +283,30 @@ public class NetworkPrefabManager : AssetPostprocessor {
|
|
|
278
283
|
AssetDatabase.Refresh();
|
|
279
284
|
return newCollection;
|
|
280
285
|
}
|
|
286
|
+
|
|
287
|
+
private static void RemoveInvalidEntries(NetworkPrefabCollection collection) {
|
|
288
|
+
var entriesToRemove = new List<Object>();
|
|
289
|
+
foreach (var prefab in collection.networkPrefabs) {
|
|
290
|
+
// This is checking for "Missing (Object)" and "None (Object)" references
|
|
291
|
+
// inside the collection.
|
|
292
|
+
if (prefab == null && !ReferenceEquals(prefab, null)) {
|
|
293
|
+
entriesToRemove.Add(prefab);
|
|
294
|
+
continue;
|
|
295
|
+
}
|
|
296
|
+
// This is checking for entries that do _not_ have a NetworkIdentity component
|
|
297
|
+
// attached to them.
|
|
298
|
+
GameObject pf = prefab as GameObject;
|
|
299
|
+
if (pf == null) continue;
|
|
300
|
+
NetworkIdentity ni = pf.GetComponent<NetworkIdentity>();
|
|
301
|
+
if (ni == null) {
|
|
302
|
+
entriesToRemove.Add(prefab);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
foreach (var entry in entriesToRemove) {
|
|
306
|
+
collection.networkPrefabs.Remove(entry);
|
|
307
|
+
}
|
|
308
|
+
EditorUtility.SetDirty(collection);
|
|
309
|
+
AssetDatabase.SaveAssetIfDirty(collection);
|
|
310
|
+
}
|
|
281
311
|
}
|
|
282
312
|
#endif
|
|
@@ -184,8 +184,11 @@ namespace Airship.Editor
|
|
|
184
184
|
FetchAndUpdateSignedInIcon();
|
|
185
185
|
}
|
|
186
186
|
EditorAuthManager.localUserChanged += (user) => {
|
|
187
|
+
signedInIcon = null;
|
|
188
|
+
signedInIconRaw = null;
|
|
189
|
+
signedInIconBytes = new byte[]{};
|
|
190
|
+
|
|
187
191
|
if (EditorAuthManager.signInStatus != EditorAuthSignInStatus.SIGNED_IN) {
|
|
188
|
-
signedInIconBytes = new byte[]{};
|
|
189
192
|
RepaintToolbar();
|
|
190
193
|
return;
|
|
191
194
|
}
|
|
@@ -199,8 +202,15 @@ namespace Airship.Editor
|
|
|
199
202
|
}
|
|
200
203
|
|
|
201
204
|
private static void FetchAndUpdateSignedInIcon() {
|
|
202
|
-
EditorAuthManager.DownloadProfilePicture()
|
|
203
|
-
|
|
205
|
+
var task = EditorAuthManager.DownloadProfilePicture();
|
|
206
|
+
task.ContinueWith((t) => {
|
|
207
|
+
if (t.IsFaulted) {
|
|
208
|
+
Debug.LogError("Failed to download profile picture: " + t.Exception);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
if (t.Result == null) {
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
204
214
|
|
|
205
215
|
signedInIconRaw = t.Result;
|
|
206
216
|
GetSignedInIcon();
|
|
@@ -237,11 +247,15 @@ namespace Airship.Editor
|
|
|
237
247
|
}
|
|
238
248
|
|
|
239
249
|
private static Texture2D ResizeAndRoundTexture(Texture2D source, int targetWidth, int targetHeight) {
|
|
240
|
-
if (source == null
|
|
250
|
+
if (source == null) {
|
|
241
251
|
Debug.LogError("Unable to set signed in icon: Source texture is null or unreadable.");
|
|
242
252
|
return null;
|
|
243
253
|
}
|
|
244
254
|
|
|
255
|
+
if (!source.isReadable) {
|
|
256
|
+
return source;
|
|
257
|
+
}
|
|
258
|
+
|
|
245
259
|
// Downsize texture and round on CPU. There are problems when using Graphics.Blit to
|
|
246
260
|
// create this texture (it may not be ready on startup and will cause crashes when not
|
|
247
261
|
// ready).
|