gg.easy.airship 0.1.2185 → 0.1.2187

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.
Files changed (74) hide show
  1. package/Editor/Accessories/AccessoryBuilderEditor.cs +66 -65
  2. package/Editor/Accessories/Clothing/PlatformGearBundleManifestEditor.cs +17 -1
  3. package/Editor/Build/AirshipIOSBuildProcessor.cs +1 -0
  4. package/Editor/BuildMenu.cs +56 -16
  5. package/Editor/Easy.Airship.Editor.asmdef +2 -1
  6. package/Editor/Publish/Deploy.cs +1 -0
  7. package/Editor/Quality/QualityConfig.cs +14 -6
  8. package/Editor/StreamingAssets.cs +82 -0
  9. package/Editor/StreamingAssets.cs.meta +3 -0
  10. package/Editor/TypescriptCompiler~/utsc.js +149 -149
  11. package/Generator/LuauDirectCallbackGenerator.dll +0 -0
  12. package/Runtime/Code/Accessories/Clothing/Editor/PlatformGearDownloader.cs +145 -0
  13. package/Runtime/Code/Accessories/Clothing/Editor/PlatformGearDownloader.cs.meta +3 -0
  14. package/Runtime/Code/Accessories/Clothing/Editor.meta +3 -0
  15. package/Runtime/Code/Accessories/Clothing/PlatformGear.cs +44 -1
  16. package/Runtime/Code/AirshipConst.cs +2 -2
  17. package/Runtime/Code/Auth/AuthManager.cs +2 -2
  18. package/Runtime/Code/Authentication/EasyAuthenticator.cs +5 -2
  19. package/Runtime/Code/Bootstrap/AirshipEntryPoint.cs +0 -16
  20. package/Runtime/Code/Bootstrap/BundleDownloader.cs +10 -12
  21. package/Runtime/Code/Bootstrap/ClientBundleLoader.cs +17 -2
  22. package/Runtime/Code/Bootstrap/LuauScriptsDtoSerializer.cs +3 -3
  23. package/Runtime/Code/Bootstrap/ServerBootstrap.cs +3 -6
  24. package/Runtime/Code/Bundles/AirshipPlatform.cs +2 -2
  25. package/Runtime/Code/Bundles/AirshipVersion.cs +1 -0
  26. package/Runtime/Code/CoreUI/Login/PickUsernamePage.cs +4 -1
  27. package/Runtime/Code/CoreUI/MainMenu/MainMenuLoadingScreen.prefab +7 -7
  28. package/Runtime/Code/Luau/LuauAssembly/BinaryBlob.cs +71 -29
  29. package/Runtime/Code/Luau/LuauAssembly/LuauAPI.asmdef +2 -1
  30. package/Runtime/Code/Luau/LuauCore.cs +4 -3
  31. package/Runtime/Code/Luau/LuauCoreCallbacks.cs +82 -50
  32. package/Runtime/Code/Luau/LuauCoreReflection.cs +8 -9
  33. package/Runtime/Code/Luau/LuauLogLevel.cs +8 -0
  34. package/Runtime/Code/Luau/LuauLogLevel.cs.meta +3 -0
  35. package/Runtime/Code/Luau/LuauPlugin.cs +7 -1
  36. package/Runtime/Code/Luau/LuauPluginNative.cs +16 -4
  37. package/Runtime/Code/Luau/ReflectionList.cs +12 -0
  38. package/Runtime/Code/MainMenu/MainMenuSceneManager.cs +9 -6
  39. package/Runtime/Code/NativePlugins/Airship.NativePlugins.asmdef +16 -0
  40. package/Runtime/Code/NativePlugins/NativeDelegateAttribute.cs +4 -3
  41. package/Runtime/Code/NativePlugins/NativeLibUtil.cs +4 -3
  42. package/Runtime/Code/NativePlugins/NativePluginAttribute.cs +4 -3
  43. package/Runtime/Code/NativePlugins/NativePluginHandles.cs +153 -8
  44. package/Runtime/Code/Network/Net.cs +52 -2
  45. package/Runtime/Code/Network/Simulation/AirshipSimulationManager.cs +3 -1
  46. package/Runtime/Code/Network/StateSystem/AirshipNetworkedStateManager.cs +10 -11
  47. package/Runtime/Code/Network/UdpPingTool.cs +10 -1
  48. package/Runtime/Code/Player/Character/Animation/CharacterAnimationHelper.cs +2 -2
  49. package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovement.cs +4 -5
  50. package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterMovementSettings.cs +0 -14
  51. package/Runtime/Code/Player/Character/MovementSystems/Character/CharacterPhysics.cs +11 -11
  52. package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterInputData.cs +2 -6
  53. package/Runtime/Code/Player/Character/MovementSystems/Character/Structures/CharacterSnapshotData.cs +6 -16
  54. package/Runtime/Code/Player/PlayerInfo.cs +3 -1
  55. package/Runtime/Code/Player/PlayerManagerBridge.cs +13 -15
  56. package/Runtime/Code/Player/UserData.cs +1 -0
  57. package/Runtime/Code/Quality/QualityManager.cs +7 -1
  58. package/Runtime/Code/VoiceChat/AirshipUniVoiceNetwork.cs +7 -3
  59. package/Runtime/Code/VoxelWorld/Resources/VoxelWorldMatURP.mat +4 -4
  60. package/Runtime/Code/Zstd/Zstd.cs +25 -11
  61. package/Runtime/Code/Zstd/ZstdNative.cs +3 -1
  62. package/Runtime/Plugins/Android/libLuauPlugin.so +0 -0
  63. package/Runtime/Plugins/Linux/libLuauPlugin.so +0 -0
  64. package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/MacOS/LuauPlugin +0 -0
  65. package/Runtime/Plugins/Windows/x64/LuauPlugin.dll +0 -0
  66. package/Runtime/Plugins/iOS/LuauPluginIos.a +0 -0
  67. package/Runtime/Scenes/MainMenu.unity +82 -171
  68. package/ThirdParty/Agones/AgonesSdk.cs +1 -3
  69. package/ThirdParty/Mirror/Core/NetworkClient_TimeInterpolation.cs +3 -6
  70. package/ThirdParty/Mirror/Core/NetworkConnectionToClient.cs +2 -1
  71. package/URP/AirshipURPAsset.asset +1 -1
  72. package/package.json +1 -1
  73. package/Runtime/Code/NativePlugins/NativePlugins.asmdef +0 -3
  74. /package/Runtime/Code/NativePlugins/{NativePlugins.asmdef.meta → Airship.NativePlugins.asmdef.meta} +0 -0
@@ -1,81 +1,82 @@
1
- using System.Threading.Tasks;
2
1
  using UnityEditor;
3
2
  using UnityEngine;
4
3
 
5
- [CustomEditor(typeof(AccessoryBuilder))]
6
- //[CanEditMultipleObjects]
7
- public class AccessoryBuilderEditor : UnityEditor.Editor{
4
+ namespace Editor.Accessories {
5
+ [CustomEditor(typeof(AccessoryBuilder))]
6
+ [Icon("Packages/gg.easy.airship/Editor/shirt-outline-icon.png")]
7
+ public class AccessoryBuilderEditor : UnityEditor.Editor{
8
8
 
9
- private bool downloading = false;
10
- private bool canceled = false;
9
+ private bool downloading = false;
10
+ private bool canceled = false;
11
11
 
12
- public override void OnInspectorGUI() {
13
- AccessoryBuilder builder = (AccessoryBuilder)target;
14
- EditorGUILayout.LabelField("Requried Setup");
15
- DrawDefaultInspector();
12
+ public override void OnInspectorGUI() {
13
+ AccessoryBuilder builder = (AccessoryBuilder)target;
14
+ EditorGUILayout.LabelField("Required Setup", EditorStyles.boldLabel);
15
+ DrawDefaultInspector();
16
16
 
17
- EditorGUILayout.Space(30);
17
+ EditorGUILayout.Space(30);
18
18
 
19
- EditorGUILayout.LabelField("Editor Tools");
19
+ EditorGUILayout.LabelField("Editor Tools", EditorStyles.boldLabel);
20
20
 
21
- builder.currentOutfit = (AccessoryOutfit)EditorGUILayout.ObjectField("Outfit", builder.currentOutfit, typeof(AccessoryOutfit), true);
22
-
23
- GUI.enabled = !downloading;
24
- if (GUILayout.Button("Equip Referenced Outfit")) {
25
- if(builder.currentOutfit != null){
26
- Debug.Log("Equipping outfit " + builder.currentOutfit.name);
27
- builder.LoadOutfit(builder.currentOutfit);
28
- builder.UpdateCombinedMesh();
21
+ builder.currentOutfit = (AccessoryOutfit)EditorGUILayout.ObjectField("Outfit", builder.currentOutfit, typeof(AccessoryOutfit), true);
22
+
23
+ GUI.enabled = !downloading;
24
+ if (GUILayout.Button("Equip Referenced Outfit")) {
25
+ if(builder.currentOutfit != null){
26
+ Debug.Log("Equipping outfit " + builder.currentOutfit.name);
27
+ builder.LoadOutfit(builder.currentOutfit);
28
+ builder.UpdateCombinedMesh();
29
+ }
29
30
  }
30
- }
31
-
32
- // GUILayout.Space(10);
33
- // GUI.enabled = true;
34
- // builder.currentUserName = EditorGUILayout.TextField("Username", builder.currentUserName);
35
- // builder.currentUserId = EditorGUILayout.TextField("User ID", builder.currentUserId);
36
- // GUI.enabled = !downloading;
37
- // if (GUILayout.Button("Equip User Outfit")) {
38
- // if(!string.IsNullOrEmpty(builder.currentUserName)){
39
- // DownloadUsernameOutfit(builder);
40
- // }
41
- // if(!string.IsNullOrEmpty(builder.currentUserId)){
42
- // Debug.Log("Equipping user outfit " + builder.currentUserId);
43
- // DownloadUserOutfit(builder);
44
- // }
45
- // }
46
- // GUI.enabled = true;
47
- // GUILayout.Space(30);
48
31
 
49
- if (GUILayout.Button("Clear Outfit")) {
50
- if(downloading){
51
- builder.cancelPendingDownload = true;
52
- downloading = false;
32
+ // GUILayout.Space(10);
33
+ // GUI.enabled = true;
34
+ // builder.currentUserName = EditorGUILayout.TextField("Username", builder.currentUserName);
35
+ // builder.currentUserId = EditorGUILayout.TextField("User ID", builder.currentUserId);
36
+ // GUI.enabled = !downloading;
37
+ // if (GUILayout.Button("Equip User Outfit")) {
38
+ // if(!string.IsNullOrEmpty(builder.currentUserName)){
39
+ // DownloadUsernameOutfit(builder);
40
+ // }
41
+ // if(!string.IsNullOrEmpty(builder.currentUserId)){
42
+ // Debug.Log("Equipping user outfit " + builder.currentUserId);
43
+ // DownloadUserOutfit(builder);
44
+ // }
45
+ // }
46
+ // GUI.enabled = true;
47
+ // GUILayout.Space(30);
48
+
49
+ if (GUILayout.Button("Clear Outfit")) {
50
+ if(downloading){
51
+ builder.cancelPendingDownload = true;
52
+ downloading = false;
53
+ }
54
+ Debug.Log("Clearing outfit.");
55
+ builder.RemoveAll();
56
+ builder.SetSkinColor(new Color(0.7169812f, 0.5064722f, 0.3754005f));
57
+ builder.UpdateCombinedMesh();
53
58
  }
54
- Debug.Log("Clearing outfit.");
55
- builder.RemoveAll();
56
- builder.SetSkinColor(new Color(0.7169812f, 0.5064722f, 0.3754005f));
57
- builder.UpdateCombinedMesh();
58
- }
59
59
 
60
60
 
61
- if(GUI.changed){
62
- EditorUtility.SetDirty(builder);
61
+ if(GUI.changed){
62
+ EditorUtility.SetDirty(builder);
63
+ }
63
64
  }
64
- }
65
65
 
66
- // private async Task DownloadUserOutfit(AccessoryBuilder builder) {
67
- // Debug.Log("Starting download");
68
- // downloading = true;
69
- // await builder.AddOutfitFromUserId(builder.currentUserId);
70
- // Debug.Log("Done with download");
71
- // downloading = false;
72
- // }
73
- //
74
- // private async Task DownloadUsernameOutfit(AccessoryBuilder builder) {
75
- // Debug.Log("Starting download");
76
- // downloading = true;
77
- // await builder.EquipOutfitFromUsername(builder.currentUserName);
78
- // Debug.Log("Done with download");
79
- // downloading = false;
80
- // }
66
+ // private async Task DownloadUserOutfit(AccessoryBuilder builder) {
67
+ // Debug.Log("Starting download");
68
+ // downloading = true;
69
+ // await builder.AddOutfitFromUserId(builder.currentUserId);
70
+ // Debug.Log("Done with download");
71
+ // downloading = false;
72
+ // }
73
+ //
74
+ // private async Task DownloadUsernameOutfit(AccessoryBuilder builder) {
75
+ // Debug.Log("Starting download");
76
+ // downloading = true;
77
+ // await builder.EquipOutfitFromUsername(builder.currentUserName);
78
+ // Debug.Log("Done with download");
79
+ // downloading = false;
80
+ // }
81
+ }
81
82
  }
@@ -71,6 +71,11 @@ namespace Editor.Accessories.Clothing {
71
71
 
72
72
  public async Task BuildAllPlatforms() {
73
73
  var st = Stopwatch.StartNew();
74
+
75
+ if (!AirshipPackagesWindow.VerifyBuildModules(true)) {
76
+ return;
77
+ }
78
+
74
79
  bool success = true;
75
80
 
76
81
  List<AirshipPlatform> platforms = new();
@@ -193,6 +198,15 @@ namespace Editor.Accessories.Clothing {
193
198
 
194
199
  bundlePaths.Add(path);
195
200
  }
201
+ // {
202
+ // var path = await this.BuildPlatform(AirshipPlatform.Windows, airId);
203
+ // if (string.IsNullOrEmpty(path)) {
204
+ // success = false;
205
+ // return;
206
+ // }
207
+ //
208
+ // bundlePaths.Add(path);
209
+ // }
196
210
 
197
211
  if (!success) return;
198
212
 
@@ -202,6 +216,7 @@ namespace Editor.Accessories.Clothing {
202
216
  for (int i = 0; i < platforms.Count; i++) {
203
217
  var platform = platforms[i];
204
218
  var buildOutputFile = bundlePaths[i];
219
+ // var buildOutputFile = bundlePaths[0];
205
220
 
206
221
  // Update air asset
207
222
  var bytes = await File.ReadAllBytesAsync(buildOutputFile);
@@ -279,6 +294,7 @@ namespace Editor.Accessories.Clothing {
279
294
  /// <returns>Path to built bundle. Empty string if it failed.</returns>
280
295
  private async Task<string> BuildPlatform(AirshipPlatform platform, string airId) {
281
296
  var st = Stopwatch.StartNew();
297
+
282
298
  var manifest = (PlatformGearBundleManifest)this.target;
283
299
 
284
300
  var buildOutputFolder = "bundles/gear/";
@@ -340,7 +356,7 @@ namespace Editor.Accessories.Clothing {
340
356
  CreateAssetBundles.buildingBundles = false;
341
357
  AirshipScriptableBuildPipelineConfig.buildingGameBundles = false;
342
358
  if (returnCode != ReturnCode.Success) {
343
- Debug.LogError("Failed to build asset bundles. ReturnCode=" + returnCode);
359
+ Debug.LogError("Failed to build asset bundles. ReturnCode: " + returnCode);
344
360
  return null;
345
361
  }
346
362
  Debug.Log($"Finished building {platform} in {st.Elapsed.TotalSeconds} seconds.");
@@ -19,6 +19,7 @@ namespace Editor.Build {
19
19
  var root = plist.root;
20
20
  var buildKey = "NSCameraUsageDescription";
21
21
  root.SetString(buildKey, "Use the camera to take profile pictures.");
22
+ root.SetBoolean("ITSAppUsesNonExemptEncryption", false);
22
23
  root.SetBoolean("GCSupportsGameMode", true);
23
24
  File.WriteAllText(plistPath, plist.WriteToString());
24
25
  #endif
@@ -2,6 +2,8 @@
2
2
  using System;
3
3
  using System.Collections.Generic;
4
4
  using System.Linq;
5
+ using Code.Bootstrap;
6
+ using NUnit;
5
7
  using UnityEditor;
6
8
  using UnityEditor.Build;
7
9
  using UnityEditor.Build.Profile;
@@ -42,7 +44,7 @@ namespace Editor {
42
44
  return $"{gb:F2} GB [{bytes} bytes]";
43
45
  }
44
46
 
45
- private static void OnBuild() {
47
+ public static void OnBuild() {
46
48
  PhysicsSetup.Setup();
47
49
  }
48
50
 
@@ -266,8 +268,16 @@ namespace Editor {
266
268
  ReleaseAPK,
267
269
  ReleaseAAB,
268
270
  }
271
+
272
+ public enum AndroidEnvironment {
273
+ Production,
274
+ Staging,
275
+ }
269
276
 
270
- public static void BuildAndroidClient(AndroidBuildType buildType) {
277
+ public static void BuildAndroidClient(AndroidBuildType buildType, AndroidEnvironment environment) {
278
+ #if AIRSHIP_PLAYER
279
+ StreamingAssets.SetCoreMaterialPlatform(AirshipPlatform.Android);
280
+
271
281
  var development = buildType == AndroidBuildType.DevelopmentAPK;
272
282
  var buildApk = buildType != AndroidBuildType.ReleaseAAB;
273
283
 
@@ -279,18 +289,35 @@ namespace Editor {
279
289
  PlayerSettings.SplashScreen.show = false;
280
290
  PlayerSettings.SetScriptingBackend(NamedBuildTarget.Android, ScriptingImplementation.IL2CPP);
281
291
  PlayerSettings.Android.splitApplicationBinary = !buildApk;
282
-
292
+ PlayerSettings.Android.applicationEntry = AndroidApplicationEntry.GameActivity;
293
+
294
+ PlayerSettings.Android.keyaliasName = environment switch {
295
+ AndroidEnvironment.Production => "airship",
296
+ AndroidEnvironment.Staging => "airship-staging",
297
+ _ => throw new ArgumentOutOfRangeException(nameof(environment), environment, null)
298
+ };
299
+
300
+ var editorBuildScenes = new List<EditorBuildSettingsScene>();
301
+ foreach (var sceneName in scenes) {
302
+ editorBuildScenes.Add(new EditorBuildSettingsScene(sceneName, true));
303
+ }
304
+
283
305
  BuildProfile buildProfile;
284
306
  if (development) {
285
307
  buildProfile = AssetDatabase.LoadAssetAtPath<BuildProfile>("Assets/Settings/Build Profiles/Android Debug.asset");
286
308
  } else {
287
309
  buildProfile = AssetDatabase.LoadAssetAtPath<BuildProfile>("Assets/Settings/Build Profiles/Android Google Play.asset");
288
310
  }
289
- var options = new BuildPlayerWithProfileOptions();
290
- var editorBuildScenes = new List<EditorBuildSettingsScene>();
291
- foreach (var sceneName in scenes) {
292
- editorBuildScenes.Add(new EditorBuildSettingsScene(sceneName, true));
311
+
312
+ var defines = new List<string>();
313
+ defines.Add("AIRSHIP_PLAYER");
314
+ if (environment == AndroidEnvironment.Staging) {
315
+ defines.Add("AIRSHIP_STAGING");
316
+ defines.Add("AIRSHIP_INTERNAL");
293
317
  }
318
+ buildProfile.scriptingDefines = defines.ToArray();
319
+
320
+ var options = new BuildPlayerWithProfileOptions();
294
321
  buildProfile.overrideGlobalScenes = true;
295
322
  buildProfile.scenes = editorBuildScenes.ToArray();
296
323
  options.buildProfile = buildProfile;
@@ -298,8 +325,9 @@ namespace Editor {
298
325
  if (development) {
299
326
  options.options = BuildOptions.Development | BuildOptions.ConnectWithProfiler;
300
327
  }
301
-
302
- var report = BuildPipeline.BuildPlayer(options);
328
+
329
+ var report = BuildPipeline.BuildPlayer(options);
330
+
303
331
  var summary = report.summary;
304
332
  switch (summary.result) {
305
333
  case BuildResult.Succeeded:
@@ -319,8 +347,10 @@ namespace Editor {
319
347
  #endif
320
348
  break;
321
349
  }
322
-
350
+
351
+ StreamingAssets.ResetCoreMaterials();
323
352
  CreateAssetBundles.AddAllGameBundleScenes();
353
+ #endif
324
354
  }
325
355
 
326
356
  #if AIRSHIP_PLAYER
@@ -354,19 +384,29 @@ namespace Editor {
354
384
  BuildIOSClient(true, true);
355
385
  }
356
386
 
357
- [MenuItem("Airship/Create Binary/Client/Android (Google Play)", priority = 80)]
387
+ [MenuItem("Airship/Create Binary/Client/Android/Android Release (Google Play)", priority = 10)]
358
388
  public static void BuildAndroidClientMenuItem() {
359
- BuildAndroidClient(AndroidBuildType.ReleaseAAB);
389
+ BuildAndroidClient(AndroidBuildType.ReleaseAAB, AndroidEnvironment.Production);
360
390
  }
361
391
 
362
- [MenuItem("Airship/Create Binary/Client/Android (APK)", priority = 80)]
392
+ [MenuItem("Airship/Create Binary/Client/Android/Android APK", priority = 80)]
363
393
  public static void BuildAndroidProdAPK() {
364
- BuildAndroidClient(AndroidBuildType.ReleaseAPK);
394
+ BuildAndroidClient(AndroidBuildType.ReleaseAPK, AndroidEnvironment.Production);
365
395
  }
366
396
 
367
- [MenuItem("Airship/Create Binary/Client/Android (Development APK)", priority = 80)]
397
+ [MenuItem("Airship/Create Binary/Client/Android/Android APK (Development)", priority = 80)]
368
398
  public static void BuildAndroidDevelopmentClientMenuItem() {
369
- BuildAndroidClient(AndroidBuildType.DevelopmentAPK);
399
+ BuildAndroidClient(AndroidBuildType.DevelopmentAPK, AndroidEnvironment.Production);
400
+ }
401
+
402
+ [MenuItem("Airship/Create Binary/Client/Android/Android Staging APK", priority = 150)]
403
+ public static void BuildAndroidProdStagingAPK() {
404
+ BuildAndroidClient(AndroidBuildType.ReleaseAPK, AndroidEnvironment.Staging);
405
+ }
406
+
407
+ [MenuItem("Airship/Create Binary/Client/Android/Android Staging APK (Development)", priority = 150)]
408
+ public static void BuildAndroidDevelopmentStagingClientMenuItem() {
409
+ BuildAndroidClient(AndroidBuildType.DevelopmentAPK, AndroidEnvironment.Staging);
370
410
  }
371
411
  #endif
372
412
 
@@ -67,7 +67,8 @@
67
67
  "GUID:2a0340569ab0e1245a38e0d6c7b2529b",
68
68
  "GUID:befe48b9a36afc04ea625c93daad910e",
69
69
  "GUID:5966039ae77c64b44bc04472c1ae63bb",
70
- "GUID:8db43d2f2329593428db90e3b3a6034c"
70
+ "GUID:8db43d2f2329593428db90e3b3a6034c",
71
+ "GUID:15fc0a57446b3144c949da3e2b9737a9"
71
72
  ],
72
73
  "includePlatforms": [
73
74
  "Editor"
@@ -19,6 +19,7 @@ using UnityEditor;
19
19
  using UnityEditor.SceneManagement;
20
20
  using UnityEngine;
21
21
  using UnityEngine.Networking;
22
+ using UnityEngine.Rendering;
22
23
  using UnityEngine.SceneManagement;
23
24
  using Debug = UnityEngine.Debug;
24
25
 
@@ -2,6 +2,7 @@
2
2
  using UnityEditor;
3
3
  using UnityEngine;
4
4
  using UnityEngine.Rendering;
5
+ using UnityEngine.Rendering.Universal;
5
6
 
6
7
  namespace Editor.Quality {
7
8
  [InitializeOnLoad]
@@ -34,9 +35,12 @@ namespace Editor.Quality {
34
35
  // Not super necessary, so if we notice animation issues on mobile we can increase this.
35
36
  QualitySettings.skinWeights = SkinWeights.TwoBones;
36
37
 
37
- QualitySettings.renderPipeline =
38
- AssetDatabase.LoadAssetAtPath<RenderPipelineAsset>(
39
- "Packages/gg.easy.airship/URP/AirshipMobileURPAsset.asset");
38
+ var pipeline = (UniversalRenderPipelineAsset) AssetDatabase.LoadAssetAtPath<RenderPipelineAsset>(
39
+ "Packages/gg.easy.airship/URP/AirshipMobileURPAsset.asset");
40
+ QualitySettings.renderPipeline = pipeline;
41
+
42
+ pipeline.shadowCascadeCount = 2;
43
+ pipeline.cascade4Split = new Vector3(0.067f, 0.2f, 0.467f);
40
44
  }
41
45
 
42
46
  private static void ConfigureForNormal() {
@@ -44,9 +48,13 @@ namespace Editor.Quality {
44
48
 
45
49
  QualitySettings.skinWeights = SkinWeights.FourBones;
46
50
 
47
- QualitySettings.renderPipeline =
48
- AssetDatabase.LoadAssetAtPath<RenderPipelineAsset>(
49
- "Packages/gg.easy.airship/URP/AirshipURPAsset.asset");
51
+ var pipeline = (UniversalRenderPipelineAsset) AssetDatabase.LoadAssetAtPath<RenderPipelineAsset>(
52
+ "Packages/gg.easy.airship/URP/AirshipURPAsset.asset");
53
+
54
+ QualitySettings.renderPipeline = pipeline;
55
+
56
+ pipeline.shadowCascadeCount = 2;
57
+ pipeline.cascade4Split = new Vector3(0.067f, 0.2f, 0.467f);
50
58
  }
51
59
 
52
60
  private static void SwapToQualityLevel(string name) {
@@ -0,0 +1,82 @@
1
+ using System;
2
+ using System.IO;
3
+ using Code.Bootstrap;
4
+ using Editor;
5
+ using Editor.Util;
6
+ using UnityEditor;
7
+ using UnityEngine;
8
+
9
+ #if AIRSHIP_PLAYER
10
+ internal class StreamingAssets {
11
+ private static readonly string ShippedBundles = "Assets/StreamingAssets/ShippedBundles";
12
+ private static readonly string ShippedBundlesTmp = "Assets/StreamingAssets/ShippedBundles~";
13
+
14
+ public static readonly string CoreMaterialsAndroid = "Assets/StreamingAssets/ShippedBundles/CoreMaterials_Android";
15
+ public static readonly string CoreMaterialsWindows = "Assets/StreamingAssets/ShippedBundles/CoreMaterials_Windows";
16
+ public static readonly string CoreMaterialsIOS = "Assets/StreamingAssets/ShippedBundles/CoreMaterials_iOS";
17
+ public static readonly string CoreMaterialsMac = "Assets/StreamingAssets/ShippedBundles/CoreMaterials_Mac";
18
+
19
+ public static readonly string RelativeResourcesPath = "@easy/corematerials_shared/resources";
20
+
21
+ private static void ExcludeStreamingAssetsPath(string path) {
22
+ var targetPath = path.Replace("StreamingAssets", "StreamingAssets~");
23
+
24
+ if (!Directory.Exists(targetPath)) {
25
+ Directory.CreateDirectory(targetPath);
26
+ }
27
+ Directory.Move(path, targetPath);
28
+ }
29
+
30
+ private static void FixStreamingAssetsPath(string sourcePath) {
31
+ var resourcePath = PosixPath.Join(sourcePath, RelativeResourcesPath);
32
+ var excludedResourcePath = resourcePath.Replace("StreamingAssets", "StreamingAssets~");
33
+ if (!File.Exists(excludedResourcePath)) {
34
+ Debug.LogWarning($"Could not find {excludedResourcePath}");
35
+ return;
36
+ }
37
+ File.Move(excludedResourcePath, resourcePath);
38
+ AssetDatabase.ImportAsset(resourcePath);
39
+ }
40
+
41
+ public static void SetCoreMaterialPlatform(AirshipPlatform platform) {
42
+ var platformPath = platform switch {
43
+ AirshipPlatform.Android => CoreMaterialsAndroid,
44
+ _ => throw new ArgumentOutOfRangeException(nameof(platform), platform, null)
45
+ };
46
+
47
+ var paths = new[] {
48
+ CoreMaterialsAndroid,
49
+ CoreMaterialsMac,
50
+ CoreMaterialsWindows,
51
+ CoreMaterialsIOS,
52
+ };
53
+
54
+ foreach (var path in paths) {
55
+ if (path == platformPath) continue;
56
+ var resourcePath = PosixPath.Join(path, RelativeResourcesPath);
57
+ if (!File.Exists(resourcePath)) {
58
+ Debug.LogWarning($"could not find resource path {resourcePath}");
59
+ continue;
60
+ }
61
+
62
+
63
+ var targetPath = resourcePath.Replace("StreamingAssets", "StreamingAssets~");
64
+ var targetFolder = Path.GetDirectoryName(targetPath);
65
+ if (!Directory.Exists(targetFolder)) {
66
+ Directory.CreateDirectory(targetFolder);
67
+ }
68
+
69
+ File.Move(resourcePath, targetPath);
70
+ }
71
+
72
+ AssetDatabase.ImportAsset("Assets/StreamingAssets", ImportAssetOptions.ImportRecursive);
73
+ }
74
+
75
+ public static void ResetCoreMaterials() {
76
+ FixStreamingAssetsPath(CoreMaterialsAndroid);
77
+ FixStreamingAssetsPath(CoreMaterialsWindows);
78
+ FixStreamingAssetsPath(CoreMaterialsMac);
79
+ FixStreamingAssetsPath(CoreMaterialsIOS);
80
+ }
81
+ }
82
+ #endif
@@ -0,0 +1,3 @@
1
+ fileFormatVersion: 2
2
+ guid: 23b1ca55a86f4a8597889786fd1941ab
3
+ timeCreated: 1758582757