gg.easy.airship 0.1.2190 → 0.1.2192

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 (107) hide show
  1. package/Editor/Accessories/Clothing/PlatformGearBundleManifestEditor.cs +5 -0
  2. package/Editor/AirshipComponentEditor.cs +2 -2
  3. package/Editor/AirshipEditors/AirshipCustomEditors.cs +1 -1
  4. package/Editor/AirshipEditors/AirshipSerializedObject.cs +24 -3
  5. package/Editor/AirshipEditors/Properties/{AirshipPropertyExtensions.cs → AirshipEditorExtensions.cs} +68 -4
  6. package/Editor/AirshipEditors/Properties/AirshipSerializedArrayValue.cs +4 -0
  7. package/Editor/AirshipEditors/Properties/AirshipSerializedProperty.cs +2 -1
  8. package/Editor/AirshipEditors/Properties/AirshipSerializedValue.cs +2 -1
  9. package/Editor/AirshipScriptGUI.cs +18 -32
  10. package/Editor/BuildMenu.cs +80 -3
  11. package/Editor/EditorInternal/AirshipEditorInternals.cs +20 -2
  12. package/Editor/Publish/Deploy.cs +96 -70
  13. package/Editor/Quality/QualityConfig.cs +37 -5
  14. package/Editor/StyleSheets/AirshipSelectorWindow.dark.uss +15 -0
  15. package/Editor/StyleSheets/AirshipSelectorWindow.dark.uss.meta +11 -0
  16. package/Editor/StyleSheets/AirshipSelectorWindow.uss +17 -0
  17. package/Editor/StyleSheets/AirshipSelectorWindow.uss.meta +11 -0
  18. package/Editor/StyleSheets.meta +8 -0
  19. package/Editor/TypescriptAst/TypescriptCodeGen.cs +5 -1
  20. package/Editor/TypescriptCompiler~/utsc.js +151 -151
  21. package/Editor/TypescriptServices/Compiler/TypescriptCompilationService.cs +6 -3
  22. package/Editor/TypescriptServices/Compiler/TypescriptCompilerBuildArguments.cs +4 -4
  23. package/Editor/Util/AirshipComponentSelectorWindow.cs +274 -0
  24. package/Editor/Util/AirshipComponentSelectorWindow.cs.meta +3 -0
  25. package/Editor/Util/AirshipEditorGUI.internal.cs +9 -7
  26. package/Editor/Util/AirshipEditorUtil.cs +21 -16
  27. package/Generator/LuauDirectCallbackGenerator.dll +0 -0
  28. package/Runtime/Code/Accessories/Clothing/PlatformGear.cs +29 -7
  29. package/Runtime/Code/Airship/Resources/Scripts/MaterialColorURP.cs +23 -1
  30. package/Runtime/Code/CoreUI/Components/ForceClose.cs +27 -1
  31. package/Runtime/Code/CoreUI/CoreLoadingScreen.prefab +15 -0
  32. package/Runtime/Code/Luau/AirshipEditorInfo.cs +2 -8
  33. package/Runtime/Code/Luau/LuauCoreCallbacks.cs +26 -4
  34. package/Runtime/Code/Luau/LuauCoreReflection.cs +25 -4
  35. package/Runtime/Code/Luau/LuauMetadata.cs +11 -5
  36. package/Runtime/Code/LuauAPI/ApplicationAPI.cs +70 -5
  37. package/Runtime/Code/LuauAPI/RectTransformUtilityAPI.cs +49 -0
  38. package/Runtime/Code/LuauAPI/StaticBatchingUtilityAPI.cs +9 -0
  39. package/Runtime/Code/LuauAPI/StaticBatchingUtilityAPI.cs.meta +3 -0
  40. package/Runtime/Code/LuauAPI/TransformAPI.cs +11 -8
  41. package/Runtime/Code/Misc/AirshipBuildInfo.cs +17 -5
  42. package/Runtime/Code/Misc/AirshipType.cs +80 -6
  43. package/Runtime/Code/VoxelWorld/VoxelWorld.cs +5 -0
  44. package/Runtime/Code/VoxelWorld/VoxelWorldChunk.cs +10 -2
  45. package/Runtime/Plugins/Android/libLuauPlugin.so +0 -0
  46. package/Runtime/Plugins/Linux/libLuauPlugin.so +0 -0
  47. package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/Info.plist +1 -1
  48. package/Runtime/Plugins/Mac/LuauPlugin.bundle/Contents/MacOS/LuauPlugin +0 -0
  49. package/Runtime/Plugins/Windows/x64/LuauPlugin.dll +0 -0
  50. package/Runtime/Plugins/iOS/LuauPluginIos.a +0 -0
  51. package/ThirdParty/UiRoundedCorners/ImageWithRoundedCorners.cs +77 -22
  52. package/ThirdParty/UiRoundedCorners/RoundedCorners.mat +142 -0
  53. package/ThirdParty/UiRoundedCorners/RoundedCorners.mat.meta +8 -0
  54. package/ThirdParty/UiRoundedCorners/RoundedCorners.shader +1 -10
  55. package/ThirdParty/UiRoundedCorners/ShaderSetup.cginc +8 -0
  56. package/ThirdParty/Unified-Universal-Blur-0.7.3/Editor/ShowAsPassDrawer.cs +66 -0
  57. package/ThirdParty/Unified-Universal-Blur-0.7.3/Editor/ShowAsPassDrawer.cs.meta +3 -0
  58. package/ThirdParty/Unified-Universal-Blur-0.7.3/Editor/Unified.Universal.Blur.Editor.asmdef +20 -0
  59. package/ThirdParty/Unified-Universal-Blur-0.7.3/Editor/Unified.Universal.Blur.Editor.asmdef.meta +7 -0
  60. package/ThirdParty/Unified-Universal-Blur-0.7.3/Editor.meta +8 -0
  61. package/ThirdParty/Unified-Universal-Blur-0.7.3/LICENSE +21 -0
  62. package/ThirdParty/Unified-Universal-Blur-0.7.3/LICENSE.meta +7 -0
  63. package/ThirdParty/Unified-Universal-Blur-0.7.3/README.md +64 -0
  64. package/ThirdParty/Unified-Universal-Blur-0.7.3/README.md.meta +7 -0
  65. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurConfig.cs +21 -0
  66. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurConfig.cs.meta +3 -0
  67. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurPasses.cs +65 -0
  68. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurPasses.cs.meta +3 -0
  69. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurType.cs +9 -0
  70. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/BlurType.cs.meta +3 -0
  71. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/IWrappedCommandBuffer.cs +12 -0
  72. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/IWrappedCommandBuffer.cs.meta +3 -0
  73. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/WrappedCommandBuffer.cs +26 -0
  74. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/WrappedCommandBuffer.cs.meta +3 -0
  75. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/WrappedUnsafeCommandBuffer.cs +28 -0
  76. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer/WrappedUnsafeCommandBuffer.cs.meta +3 -0
  77. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/CommandBuffer.meta +3 -0
  78. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/Constants.cs +16 -0
  79. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/Constants.cs.meta +3 -0
  80. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/IPassData.cs +15 -0
  81. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/IPassData.cs.meta +3 -0
  82. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/LegacyPassData.cs +40 -0
  83. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/LegacyPassData.cs.meta +3 -0
  84. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/RenderGraphPassData.cs +44 -0
  85. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData/RenderGraphPassData.cs.meta +3 -0
  86. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/PassData.meta +3 -0
  87. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/ScaleBlurWith.cs +9 -0
  88. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/ScaleBlurWith.cs.meta +3 -0
  89. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/ShowAsPass.cs +16 -0
  90. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/ShowAsPass.cs.meta +3 -0
  91. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/Unified.UniversalBlur.Runtime.asmdef +17 -0
  92. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/Unified.UniversalBlur.Runtime.asmdef.meta +7 -0
  93. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/UniversalBlurFeature.cs +151 -0
  94. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/UniversalBlurFeature.cs.meta +12 -0
  95. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/UniversalBlurPass.cs +138 -0
  96. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime/UniversalBlurPass.cs.meta +3 -0
  97. package/ThirdParty/Unified-Universal-Blur-0.7.3/Runtime.meta +8 -0
  98. package/ThirdParty/Unified-Universal-Blur-0.7.3/package.json +26 -0
  99. package/ThirdParty/Unified-Universal-Blur-0.7.3/package.json.meta +10 -0
  100. package/ThirdParty/Unified-Universal-Blur-0.7.3.meta +8 -0
  101. package/ThirdParty/UnityMeshSimplifier-3.1.0/Runtime/LODGenerator.cs +3 -2
  102. package/URP/AirshipLowestURPAsset_Renderer.asset +25 -1
  103. package/URP/AirshipMobileURPAsset.asset +5 -5
  104. package/URP/AirshipMobileURPAsset_Renderer.asset +25 -1
  105. package/URP/AirshipURPAsset_Renderer.asset +25 -1
  106. package/package.json +1 -1
  107. /package/Editor/AirshipEditors/Properties/{AirshipPropertyExtensions.cs.meta → AirshipEditorExtensions.cs.meta} +0 -0
@@ -236,6 +236,7 @@ namespace Editor.Accessories.Clothing {
236
236
  await updateReq.SendWebRequest();
237
237
  if (updateReq.result != UnityWebRequest.Result.Success) {
238
238
  Debug.LogError("Failed to update air asset: " + updateReq.downloadHandler.text);
239
+ EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows);
239
240
  return;
240
241
  }
241
242
  var updateData = JsonUtility.FromJson<AirAssetCreateResponse>(updateReq.downloadHandler.text);
@@ -256,6 +257,7 @@ namespace Editor.Accessories.Clothing {
256
257
  if (putReq.result != UnityWebRequest.Result.Success) {
257
258
  Debug.LogError(putReq.error);
258
259
  Debug.LogError(putReq.downloadHandler.text);
260
+ EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows);
259
261
  return;
260
262
  }
261
263
  }
@@ -280,10 +282,13 @@ namespace Editor.Accessories.Clothing {
280
282
  await req.SendWebRequest();
281
283
  if (req.result != UnityWebRequest.Result.Success) {
282
284
  Debug.LogError($"patch classId. url: {url}, response: {req.downloadHandler.text}, authToken: {InternalHttpManager.editorAuthToken}");
285
+ EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows);
283
286
  return;
284
287
  }
285
288
  }
286
289
 
290
+ EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows);
291
+
287
292
  Debug.Log($"<color=green>Finished building {bundlePaths.Count} asset bundles for all platforms in {st.Elapsed.Seconds} seconds.</color> File size: " + AirshipEditorUtil.GetFileSizeText(bytesCount));
288
293
  }
289
294
 
@@ -942,7 +942,7 @@ public class ScriptBindingEditor : UnityEditor.Editor {
942
942
  var value = objectRefs.GetArrayElementAtIndex(index);
943
943
 
944
944
  var objOld = objectRefs.arraySize > index ? value.objectReferenceValue as AirshipComponent : null;
945
- var objNew = AirshipScriptGUI.AirshipBehaviourField(rect, new GUIContent(label), script, objOld, value);
945
+ var objNew = AirshipScriptGUI.AirshipBehaviourField(rect, new GUIContent(label), arraySerializedProperty.serializedObject.targetObject, script, objOld, value);
946
946
  if (objOld != objNew) {
947
947
  value.objectReferenceValue = objNew;
948
948
  arrayModified.boolValue = true;
@@ -1357,7 +1357,7 @@ public class ScriptBindingEditor : UnityEditor.Editor {
1357
1357
  return;
1358
1358
  }
1359
1359
 
1360
- var binding = AirshipScriptGUI.AirshipBehaviourField(guiContent, script, obj);
1360
+ var binding = AirshipScriptGUI.AirshipBehaviourField(guiContent, obj.serializedObject.targetObject, script, obj);
1361
1361
 
1362
1362
 
1363
1363
  if (binding != null && target is AirshipComponent parentBinding && binding == parentBinding) {
@@ -235,7 +235,7 @@ public static class AirshipCustomEditors {
235
235
 
236
236
 
237
237
  internal static AirshipEditor GetComponentEditorForType(AirshipType airshipType, AirshipComponent component, AirshipSerializedObject serializedObject) {
238
- if (!airshipType.AirshipBehaviour) return null;
238
+ if (airshipType.DeclarationType != AirshipDeclarationType.AirshipBehaviour) return null;
239
239
  var editorType = AirshipCustomEditors.GetEditorTypeForTypeName(airshipType.Name);
240
240
  var editor = AirshipCustomEditors.GetEditorForComponent(component, editorType, serializedObject);
241
241
  return editor;
@@ -35,7 +35,28 @@ public class AirshipSerializedObject {
35
35
 
36
36
  public AirshipType airshipType => AirshipBuildInfo.Instance.GetTypeByName(serializedName.stringValue);
37
37
  public AirshipComponent airshipComponent => (AirshipComponent)serializedObject.targetObject;
38
-
38
+ public UnityEngine.Object targetObject => serializedObject.targetObject;
39
+
40
+ internal AirshipSerializedObject() {}
41
+ public AirshipSerializedObject(AirshipComponent component) => Update(null, new SerializedObject(component), component.metadata);
42
+
43
+ [CanBeNull]
44
+ internal AirshipSerializedObject prefabAsset {
45
+ get {
46
+ if (PrefabUtility.IsPartOfPrefabInstance(serializedObject.targetObject)) {
47
+ var obj = new AirshipSerializedObject();
48
+ var original = (AirshipComponent) PrefabUtility.GetCorrespondingObjectFromOriginalSource(serializedObject.targetObject);
49
+ var serObj =
50
+ new SerializedObject(original);
51
+
52
+ obj.Update(this.editor, serObj, original.metadata);
53
+ return obj;
54
+ } else {
55
+ return null;
56
+ }
57
+ }
58
+ }
59
+
39
60
  internal void Update(AirshipEditor currentEditor, SerializedObject currentSerializedObject, LuauMetadata currentMetadata) {
40
61
  _propertyCache.Clear();
41
62
  serializedObject = currentSerializedObject;
@@ -59,7 +80,7 @@ public class AirshipSerializedObject {
59
80
  if (propertyName == targetPropertyName) {
60
81
  var propertyMetadata = metadata.FindProperty(targetPropertyName);
61
82
 
62
- var airshipProperty = new AirshipSerializedProperty(property, propertyMetadata, this.editor);
83
+ var airshipProperty = new AirshipSerializedProperty(this, property, propertyMetadata, this.editor);
63
84
  // _propertyCache.Add(targetPropertyName, airshipProperty);
64
85
  return airshipProperty;
65
86
  }
@@ -80,7 +101,7 @@ public class AirshipSerializedObject {
80
101
  if (bindingPropertyIndex == -1) continue;
81
102
  var bindingProperty = metadata.properties[bindingPropertyIndex];
82
103
 
83
- propertyList.Add(new AirshipSerializedProperty(property, bindingProperty, editor));
104
+ propertyList.Add(new AirshipSerializedProperty(this, property, bindingProperty, editor));
84
105
  indexDictionary.Add(bindingProperty.name, bindingPropertyIndex);
85
106
  }
86
107
 
@@ -7,7 +7,7 @@ using Mono.WebBrowser;
7
7
  using UnityEditor;
8
8
  using UnityEngine;
9
9
 
10
- public static class AirshipPropertyExtensions {
10
+ public static class AirshipEditorExtensions {
11
11
  public static UnityEngine.Object GetObject(this AirshipSerializedValue value) {
12
12
  if (value.type is AirshipSerializedType.AirshipBehaviour or AirshipSerializedType.Object) return value.objectReferenceValue;
13
13
  return null;
@@ -27,6 +27,40 @@ public static class AirshipPropertyExtensions {
27
27
  if (component.script.m_metadata == null) return null;
28
28
  return AirshipBuildInfo.Instance.GetTypeByName(component.script.m_metadata.name);
29
29
  }
30
+
31
+ private static IEnumerable<string> GetPathParts(Transform transform) {
32
+ var parent = transform;
33
+ while (parent != null) {
34
+ yield return parent.name;
35
+ parent = parent.transform.parent;
36
+ }
37
+ }
38
+
39
+ internal static string GetFullName(this GameObject gameObject) {
40
+ var parts = new List<string>();
41
+ parts.AddRange(GetPathParts(gameObject.transform));
42
+ parts.Reverse();
43
+ return "/" + string.Join("/", parts);
44
+ }
45
+
46
+ public static string NicifyName(this AirshipType type) {
47
+ return ObjectNames.NicifyVariableName(type.Name);
48
+ }
49
+
50
+ /// <summary>
51
+ /// Grab the type of component of the given airship script, or null if no component attached to the script
52
+ /// </summary>
53
+ /// <param name="script"></param>
54
+ /// <returns></returns>
55
+ [CanBeNull]
56
+ public static AirshipType GetComponentType(this AirshipScript script) {
57
+ // TODO: Get types by path
58
+ if (script.m_metadata != null) {
59
+ return AirshipBuildInfo.Instance.GetTypeByPathAndName(script.assetPath, script.m_metadata.name);
60
+ }
61
+
62
+ return null;
63
+ }
30
64
 
31
65
  /// <summary>
32
66
  /// Add the given AirshipBehaviour to the GameObject
@@ -40,7 +74,7 @@ public static class AirshipPropertyExtensions {
40
74
  throw new InvalidCastException("Cannot add invalid type");
41
75
  }
42
76
 
43
- if (!type.AirshipBehaviour) return null;
77
+ if (type.DeclarationType != AirshipDeclarationType.AirshipBehaviour) return null;
44
78
 
45
79
  var airshipScript = type.Script;
46
80
  if (airshipScript == null) throw new InvalidCastException($"Found type without script - {type.UniqueId}");
@@ -60,7 +94,7 @@ public static class AirshipPropertyExtensions {
60
94
  [CanBeNull]
61
95
  public static AirshipComponent GetAirshipComponent(this GameObject gameObject, AirshipType type) {
62
96
  if (type == null) return null;
63
- if (!type.AirshipBehaviour) return null;
97
+ if (type.DeclarationType != AirshipDeclarationType.AirshipBehaviour) return null;
64
98
 
65
99
  foreach (var airshipComponent in gameObject.GetComponents<AirshipComponent>()) {
66
100
  var componentType = airshipComponent.GetAirshipType();
@@ -80,7 +114,7 @@ public static class AirshipPropertyExtensions {
80
114
  /// <param name="type">The component type</param>
81
115
  /// <returns></returns>
82
116
  public static AirshipComponent[] GetAirshipComponents(this GameObject gameObject, AirshipType type) {
83
- List<AirshipComponent> components = new List<AirshipComponent>();
117
+ var components = new List<AirshipComponent>();
84
118
 
85
119
  if (type == null) return null;
86
120
  foreach (var airshipComponent in gameObject.GetComponents<AirshipComponent>()) {
@@ -94,4 +128,34 @@ public static class AirshipPropertyExtensions {
94
128
 
95
129
  return components.ToArray();
96
130
  }
131
+
132
+ public static AirshipComponent GetAirshipComponentInChildren(this GameObject gameObject, AirshipType type) {
133
+ if (type == null) return null;
134
+ foreach (var airshipComponent in gameObject.GetComponentsInChildren<AirshipComponent>()) {
135
+ var componentType = airshipComponent.GetAirshipType();
136
+ if (componentType == null) continue;
137
+
138
+ if (airshipComponent.GetAirshipType() == type) {
139
+ return airshipComponent;
140
+ }
141
+ }
142
+
143
+ return null;
144
+ }
145
+
146
+ public static AirshipComponent[] GetAirshipComponentsInChildren(this GameObject gameObject, AirshipType type) {
147
+ var components = new List<AirshipComponent>();
148
+
149
+ if (type == null) return null;
150
+ foreach (var airshipComponent in gameObject.GetComponentsInChildren<AirshipComponent>()) {
151
+ var componentType = airshipComponent.GetAirshipType();
152
+ if (componentType == null) continue;
153
+
154
+ if (airshipComponent.GetAirshipType() == type) {
155
+ components.Add(airshipComponent);
156
+ }
157
+ }
158
+
159
+ return components.ToArray();
160
+ }
97
161
  }
@@ -1,6 +1,8 @@
1
1
  using UnityEditor;
2
2
 
3
3
  public class AirshipSerializedArrayValue : AirshipSerializedValue {
4
+
5
+
4
6
  public AirshipSerializedArrayValue(AirshipSerializedProperty parentSerializedProperty, int index, SerializedProperty valueProperty, SerializedProperty objectValueProperty) {
5
7
  serializedModified = parentSerializedProperty.serializedModified;
6
8
 
@@ -17,5 +19,7 @@ public class AirshipSerializedArrayValue : AirshipSerializedValue {
17
19
  decorators = parentSerializedProperty.propertyMetadata.GetDecorators();
18
20
 
19
21
  this.editor = parentSerializedProperty.editor;
22
+
23
+ serializedObject = parentSerializedProperty.serializedObject;
20
24
  }
21
25
  }
@@ -49,12 +49,13 @@ public class AirshipSerializedProperty : AirshipSerializedValue {
49
49
  }
50
50
  }
51
51
 
52
- public AirshipSerializedProperty(SerializedProperty property, LuauMetadataProperty metadata, AirshipEditor editor) {
52
+ public AirshipSerializedProperty(AirshipSerializedObject serializedObject, SerializedProperty property, LuauMetadataProperty metadata, AirshipEditor editor) {
53
53
  serializedProperty = property;
54
54
  UpdateProperty();
55
55
  propertyMetadata = metadata;
56
56
  decorators = metadata.GetDecorators();
57
57
  this.editor = editor;
58
+ this.serializedObject = serializedObject;
58
59
  }
59
60
 
60
61
  internal void UpdateProperty() {
@@ -71,7 +71,8 @@ public abstract class AirshipSerializedValue {
71
71
  internal SerializedProperty serializedObjectType { get; set; }
72
72
  internal SerializedProperty serializedObjectValue { get; set; }
73
73
  internal LuauMetadataProperty propertyMetadata { get; set; }
74
-
74
+ public AirshipSerializedObject serializedObject { get; protected set; }
75
+
75
76
  internal AirshipEditor editor { get; set; }
76
77
 
77
78
  public string name => serializedName.stringValue;
@@ -4,6 +4,7 @@ using Editor.EditorInternal;
4
4
  using JetBrains.Annotations;
5
5
  using Luau;
6
6
  using UnityEditor;
7
+ using UnityEditor.SceneManagement;
7
8
  using UnityEditor.Search;
8
9
  using UnityEngine;
9
10
  using Object = UnityEngine.Object;
@@ -44,6 +45,7 @@ namespace Code.Luau {
44
45
  Rect dropRect,
45
46
  int id,
46
47
  AirshipScript script,
48
+ UnityEngine.Object objectBeingEdited,
47
49
  [CanBeNull] AirshipComponent airshipComponent,
48
50
  SerializedProperty property,
49
51
  bool allowSceneObjects,
@@ -116,29 +118,11 @@ namespace Code.Luau {
116
118
  if (GUI.enabled) {
117
119
  GUIUtility.keyboardControl = id;
118
120
 
119
- var searchContext = SearchService.CreateContext(string.Empty);
120
- var view = SearchService.ShowPicker(
121
- searchContext,
122
- (item, b) => {
123
- var obj = item.ToObject<AirshipComponent>();
124
- if (obj != null) {
125
- onObjectSelected?.Invoke(obj);
126
- }
127
-
128
- GUI.changed = true;
129
- },
130
- item => {
131
- var obj = item.ToObject<AirshipComponent>();
132
- if (obj != null) {
133
- EditorGUIUtility.PingObject(obj);
134
- }
135
- },
136
- item => {
137
- var itemScriptBinding = item.ToObject<AirshipComponent>();
138
- return itemScriptBinding != null && IsBindableAsComponent(itemScriptBinding, script);
139
- }, null, script.m_metadata?.displayName ?? "AirshipBehaviour");
140
- view.SetSearchText($"h:t:AirshipComponent airshipcomponent.script=\"{script.assetPath}\""); // #m_fileFullPath={script.m_path}
141
-
121
+ var componentType = script.GetComponentType();
122
+ if (componentType != null) {
123
+ var context = new AirshipComponentSelectionContext(objectBeingEdited, componentType, obj as AirshipComponent);
124
+ AirshipComponentSelectorWindow.Show(context, null, onObjectSelected);
125
+ }
142
126
  evt.Use();
143
127
  GUIUtility.ExitGUI();
144
128
  }
@@ -215,37 +199,39 @@ namespace Code.Luau {
215
199
  return (AirshipComponent) obj;
216
200
  }
217
201
 
218
- internal static AirshipComponent AirshipBehaviourField(Rect rect, GUIContent content, AirshipScript script, AirshipComponent airshipComponent, SerializedProperty property) {
202
+ internal static AirshipComponent AirshipBehaviourField(
203
+ Rect rect, GUIContent content, UnityEngine.Object objectBeingEdited, AirshipScript script, AirshipComponent airshipComponent, SerializedProperty property) {
219
204
  int id = GUIUtility.GetControlID("_airshipBehaviourFieldHash".GetHashCode(), FocusType.Keyboard, rect);
220
205
 
221
206
  rect = EditorGUI.PrefixLabel(rect, id, content);
222
207
  var value = DoAirshipBehaviourField(
223
- rect, rect, id, script, airshipComponent, property, true,
208
+ rect, rect, id, script, objectBeingEdited, airshipComponent, property, true,
224
209
  binding => {
225
210
  if (property != null) {
226
211
  property.objectReferenceValue = binding;
212
+ property.serializedObject.ApplyModifiedProperties();
227
213
  }
228
214
  },
229
215
  () => {
230
- Debug.Log("Remove object " + property.objectReferenceValue);
231
216
  property.objectReferenceValue = null;
217
+ property.serializedObject.ApplyModifiedProperties();
232
218
  });
233
219
 
234
220
  return value;
235
221
  }
236
222
 
237
- public static AirshipComponent AirshipBehaviourField(Rect r, GUIContent content, AirshipScript script, AirshipComponent airshipComponent) {
238
- return AirshipBehaviourField(r, content, script, airshipComponent, null);
223
+ public static AirshipComponent AirshipBehaviourField(Rect r, GUIContent content, UnityEngine.Object objectBeingEdited, AirshipScript script, AirshipComponent airshipComponent) {
224
+ return AirshipBehaviourField(r, content,objectBeingEdited, script, airshipComponent, null);
239
225
  }
240
226
 
241
- internal static AirshipComponent AirshipBehaviourField(GUIContent content, AirshipScript script, SerializedProperty property) {
227
+ internal static AirshipComponent AirshipBehaviourField(GUIContent content, UnityEngine.Object objectBeingEdited, AirshipScript script, SerializedProperty property) {
242
228
  var r = EditorGUILayout.GetControlRect(false, ObjectField.singleLineHeight);
243
- return AirshipBehaviourField(r, content, script, (AirshipComponent) property.objectReferenceValue, property);
229
+ return AirshipBehaviourField(r, content,objectBeingEdited, script, (AirshipComponent) property.objectReferenceValue, property);
244
230
  }
245
231
 
246
- public static AirshipComponent AirshipBehaviourField(GUIContent content, AirshipScript script, AirshipComponent airshipComponent) {
232
+ public static AirshipComponent AirshipBehaviourField(GUIContent content, UnityEngine.Object objectBeingEdited, AirshipScript script, AirshipComponent airshipComponent) {
247
233
  var r = EditorGUILayout.GetControlRect(false, ObjectField.singleLineHeight);
248
- return AirshipBehaviourField(r, content, script, airshipComponent, null);
234
+ return AirshipBehaviourField(r, content,objectBeingEdited, script, airshipComponent, null);
249
235
  }
250
236
 
251
237
  internal static Sprite AirshipSpriteField(Rect position, GUIContent content, Sprite sprite) {
@@ -9,7 +9,7 @@ using UnityEditor.Build;
9
9
  using UnityEditor.Build.Profile;
10
10
  using UnityEditor.Build.Reporting;
11
11
  using UnityEngine;
12
- #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
12
+ #if UNITY_EDITOR_OSX
13
13
  using UnityEditor.OSXStandalone;
14
14
  #endif
15
15
 
@@ -212,13 +212,12 @@ namespace Editor {
212
212
  }
213
213
 
214
214
  public static void BuildIOSClient(bool development, bool staging) {
215
- #if UNITY_EDITOR_OSX || UNITY_EDITOR_LINUX
215
+ #if AIRSHIP_PLAYER
216
216
  OnBuild();
217
217
  CreateAssetBundles.ResetScenes();
218
218
 
219
219
  CreateAssetBundles.SwapToQualityLevel("Low");
220
220
 
221
- UserBuildSettings.architecture = OSArchitecture.x64ARM64;
222
221
  PlayerSettings.SplashScreen.show = false;
223
222
  PlayerSettings.SetScriptingBackend(NamedBuildTarget.iOS, ScriptingImplementation.IL2CPP);
224
223
  var options = new BuildPlayerOptions();
@@ -296,6 +295,23 @@ namespace Editor {
296
295
  AndroidEnvironment.Staging => "airship-staging",
297
296
  _ => throw new ArgumentOutOfRangeException(nameof(environment), environment, null)
298
297
  };
298
+
299
+ Dictionary<string, string> envOptions = GetValidatedOptions();
300
+ if (envOptions.TryGetValue("androidKeystoreName", out string keystoreName) &&
301
+ !string.IsNullOrEmpty(keystoreName))
302
+ {
303
+ PlayerSettings.Android.useCustomKeystore = true;
304
+ PlayerSettings.Android.keystoreName = keystoreName;
305
+ }
306
+ if (envOptions.TryGetValue("androidKeystorePass", out string keystorePass) &&
307
+ !string.IsNullOrEmpty(keystorePass))
308
+ PlayerSettings.Android.keystorePass = keystorePass;
309
+ if (envOptions.TryGetValue("androidKeyaliasName", out string keyaliasName) &&
310
+ !string.IsNullOrEmpty(keyaliasName))
311
+ PlayerSettings.Android.keyaliasName = keyaliasName;
312
+ if (envOptions.TryGetValue("androidKeyaliasPass", out string keyaliasPass) &&
313
+ !string.IsNullOrEmpty(keyaliasPass))
314
+ PlayerSettings.Android.keyaliasPass = keyaliasPass;
299
315
 
300
316
  var editorBuildScenes = new List<EditorBuildSettingsScene>();
301
317
  foreach (var sceneName in scenes) {
@@ -498,6 +514,67 @@ namespace Editor {
498
514
  CreateAssetBundles.AddAllGameBundleScenes();
499
515
  #endif
500
516
  }
517
+
518
+ // From Game CI example
519
+ private static Dictionary<string, string> GetValidatedOptions() {
520
+ ParseCommandLineArguments(out Dictionary<string, string> validatedOptions);
521
+
522
+ if (!validatedOptions.TryGetValue("projectPath", out string _))
523
+ {
524
+ Console.WriteLine("Missing argument -projectPath");
525
+ EditorApplication.Exit(110);
526
+ }
527
+
528
+ if (validatedOptions.TryGetValue("buildTarget", out var buildTarget))
529
+ {
530
+ if (!Enum.IsDefined(typeof(BuildTarget), buildTarget ?? string.Empty))
531
+ {
532
+ Console.WriteLine($"{buildTarget} is not a defined {nameof(BuildTarget)}");
533
+ EditorApplication.Exit(121);
534
+ }
535
+ }
536
+ else if (!validatedOptions.TryGetValue("activeBuildProfile", out string _))
537
+ {
538
+ Console.WriteLine("Missing argument -buildTarget or -activeBuildProfile");
539
+ EditorApplication.Exit(120);
540
+ }
541
+
542
+ if (!validatedOptions.TryGetValue("customBuildPath", out string _))
543
+ {
544
+ Console.WriteLine("Missing argument -customBuildPath");
545
+ EditorApplication.Exit(130);
546
+ }
547
+
548
+ return validatedOptions;
549
+ }
550
+
551
+ private static readonly string[] Secrets =
552
+ {"androidKeystorePass", "androidKeyaliasName", "androidKeyaliasPass"};
553
+
554
+ private static void ParseCommandLineArguments(out Dictionary<string, string> providedArguments) {
555
+ providedArguments = new Dictionary<string, string>();
556
+ string[] args = Environment.GetCommandLineArgs();
557
+
558
+ // Extract flags with optional values
559
+ for (int current = 0, next = 1; current < args.Length; current++, next++)
560
+ {
561
+ // Parse flag
562
+ bool isFlag = args[current].StartsWith("-");
563
+ if (!isFlag) continue;
564
+ string flag = args[current].TrimStart('-');
565
+
566
+ // Parse optional value
567
+ bool flagHasValue = next < args.Length && !args[next].StartsWith("-");
568
+ string value = flagHasValue ? args[next].TrimStart('-') : "";
569
+ bool secret = Secrets.Contains(flag);
570
+ string displayValue = secret ? "*HIDDEN*" : "\"" + value + "\"";
571
+
572
+ // Assign
573
+ Console.WriteLine($"Found flag \"{flag}\" with value {displayValue}.");
574
+ providedArguments.Add(flag, value);
575
+ }
576
+ }
577
+
501
578
  }
502
579
  }
503
580
  #endif
@@ -1,7 +1,10 @@
1
1
  using System;
2
+ using System.Collections.Generic;
2
3
  using UnityEditor;
4
+ using UnityEditor.SceneManagement;
3
5
  using UnityEngine;
4
6
  using UnityEngine.EventSystems;
7
+ using UnityEngine.SceneManagement;
5
8
 
6
9
  namespace Editor.EditorInternal {
7
10
  public class AirshipEditorInternals {
@@ -15,8 +18,23 @@ namespace Editor.EditorInternal {
15
18
  return EditorGUIUtility.GetBoldDefaultFont();
16
19
  }
17
20
 
18
- internal static void ShowObjectSelector(UnityEngine.Object obj, Type objectTypes, UnityEngine.Object objBeingEdited, bool allowSceneObjects) {
19
- ObjectSelector.get.Show(obj, objectTypes,objBeingEdited, allowSceneObjects);
21
+ // internal static void ShowObjectSelector(UnityEngine.Object obj, Type objectTypes, UnityEngine.Object objBeingEdited, bool allowSceneObjects) {
22
+ // ObjectSelector.get.Show(obj, objectTypes,objBeingEdited, allowSceneObjects);
23
+ // }
24
+
25
+ internal static void ShowObjectSelector(UnityEngine.Object obj,
26
+ System.Type requiredType,
27
+ UnityEngine.Object objectBeingEdited,
28
+ bool allowSceneObjects,
29
+ List<int> allowedInstanceIDs = null,
30
+ Action<UnityEngine.Object> onObjectSelectorClosed = null,
31
+ Action<UnityEngine.Object> onObjectSelectedUpdated = null,
32
+ bool showNoneItem = true) {
33
+ ObjectSelector.get.Show(obj, requiredType, objectBeingEdited, allowSceneObjects, allowedInstanceIDs, onObjectSelectorClosed, onObjectSelectedUpdated);
34
+ }
35
+
36
+ internal static Scene GetObjectScene() {
37
+ return default;
20
38
  }
21
39
 
22
40
  internal static UnityEngine.Object DoCustomObjectField(Rect position, GUIContent label,