Skip to content

Commit 2e4f8b1

Browse files
authored
Merge pull request #559 from UltraStar-Deluxe/anst/unity-upgrade
Upgrade Unity to 6000.2.9f1, fix security issue, fix Android build
2 parents 2187644 + 885da77 commit 2e4f8b1

44 files changed

Lines changed: 294 additions & 219 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NukeBuild/Build.cs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,24 @@ public enum UnityProject
5858
{
5959
BuildMainGame("BuildMacOS");
6060
});
61+
62+
Target BuildMainGameAndroidApk => _ => _
63+
.Executes(() =>
64+
{
65+
BuildMainGame("BuildAndroidApk");
66+
});
67+
68+
Target BuildAndRunMainGameAndroidApk => _ => _
69+
.Executes(() =>
70+
{
71+
BuildMainGame("BuildAndRunAndroidApk");
72+
});
73+
74+
Target BuildMainGameSignedAndroidAppBundle => _ => _
75+
.Executes(() =>
76+
{
77+
BuildMainGame("BuildSignedAndroidAppBundle");
78+
});
6179

6280
Target BuildCompanionAppAndroidApk => _ => _
6381
.Executes(() =>
@@ -112,7 +130,11 @@ public enum UnityProject
112130
mainGameNuGetPackagesSourceFolder,
113131
mainGameNuGetPackagesTargetFolder,
114132
SearchOption.AllDirectories,
115-
"*.dll");
133+
"NHyphenator.dll",
134+
"Opportunity.LrcParser.dll",
135+
"System.Linq.Dynamic.Core.dll",
136+
"System.Text.Encoding.CodePages.dll"
137+
);
116138
});
117139

118140
Target RestoreMainGameDependencies => _ => _
@@ -133,12 +155,12 @@ public enum UnityProject
133155
// Download new packages
134156
DotNet($"build {GetNuGetPackagesProjectFolder(companionAppDir)}");
135157

136-
// Copy libraries for companion app
158+
// Move libraries for companion app
137159
DirectoryUtils.MoveFiles(
138160
companionAppNuGetPackagesSourceFolder,
139161
companionAppNuGetPackagesTargetFolder,
140162
SearchOption.AllDirectories,
141-
"*.dll");
163+
"RandomFriendlyNameGenerator.dll");
142164
});
143165

144166
Target RestoreCompanionAppDependencies => _ => _

UltraStar Play Companion/Packages/manifest.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
"com.darrentsung.dtcompiletimetracker": "https://github.com/DarrenTsung/DTCompileTimeTracker.git",
99
"com.singularitygroup.hotreload": "git+https://gitlab.hotreload.net/root/hot-reload-releases.git#1.12.5",
1010
"com.unity.2d.sprite": "1.0.0",
11-
"com.unity.ide.rider": "3.0.36",
12-
"com.unity.ide.visualstudio": "2.0.23",
13-
"com.unity.inputsystem": "1.14.0",
14-
"com.unity.mobile.android-logcat": "1.4.5",
15-
"com.unity.nuget.newtonsoft-json": "3.2.1",
16-
"com.unity.test-framework": "1.5.1",
17-
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10",
11+
"com.unity.ide.rider": "3.0.38",
12+
"com.unity.ide.visualstudio": "2.0.25",
13+
"com.unity.inputsystem": "1.14.2",
14+
"com.unity.mobile.android-logcat": "1.4.6",
15+
"com.unity.nuget.newtonsoft-json": "3.2.2",
16+
"com.unity.test-framework": "1.6.0",
17+
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.11",
1818
"com.unity.ugui": "2.0.0",
1919
"com.unity.ui.builder": "2.0.0",
2020
"com.unity.vectorgraphics": "2.0.0-preview.25",

UltraStar Play Companion/Packages/packages-lock.json

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"dependencies": {}
6666
},
6767
"com.unity.ide.rider": {
68-
"version": "3.0.36",
68+
"version": "3.0.38",
6969
"depth": 0,
7070
"source": "registry",
7171
"dependencies": {
@@ -74,16 +74,16 @@
7474
"url": "https://packages.unity.com"
7575
},
7676
"com.unity.ide.visualstudio": {
77-
"version": "2.0.23",
77+
"version": "2.0.25",
7878
"depth": 0,
7979
"source": "registry",
8080
"dependencies": {
81-
"com.unity.test-framework": "1.1.9"
81+
"com.unity.test-framework": "1.1.31"
8282
},
8383
"url": "https://packages.unity.com"
8484
},
8585
"com.unity.inputsystem": {
86-
"version": "1.14.0",
86+
"version": "1.14.2",
8787
"depth": 0,
8888
"source": "registry",
8989
"dependencies": {
@@ -92,14 +92,14 @@
9292
"url": "https://packages.unity.com"
9393
},
9494
"com.unity.mobile.android-logcat": {
95-
"version": "1.4.5",
95+
"version": "1.4.6",
9696
"depth": 0,
9797
"source": "registry",
9898
"dependencies": {},
9999
"url": "https://packages.unity.com"
100100
},
101101
"com.unity.nuget.newtonsoft-json": {
102-
"version": "3.2.1",
102+
"version": "3.2.2",
103103
"depth": 0,
104104
"source": "registry",
105105
"dependencies": {},
@@ -122,7 +122,7 @@
122122
"url": "https://packages.unity.com"
123123
},
124124
"com.unity.test-framework": {
125-
"version": "1.5.1",
125+
"version": "1.6.0",
126126
"depth": 0,
127127
"source": "builtin",
128128
"dependencies": {
@@ -132,7 +132,7 @@
132132
}
133133
},
134134
"com.unity.toolchain.win-x86_64-linux-x86_64": {
135-
"version": "2.0.10",
135+
"version": "2.0.11",
136136
"depth": 0,
137137
"source": "registry",
138138
"dependencies": {
@@ -282,7 +282,8 @@
282282
"com.unity.modules.ui": "1.0.0",
283283
"com.unity.modules.imgui": "1.0.0",
284284
"com.unity.modules.jsonserialize": "1.0.0",
285-
"com.unity.modules.hierarchycore": "1.0.0"
285+
"com.unity.modules.hierarchycore": "1.0.0",
286+
"com.unity.modules.physics": "1.0.0"
286287
}
287288
},
288289
"com.unity.modules.unitywebrequest": {

UltraStar Play Companion/ProjectSettings/ProjectSettings.asset

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ PlayerSettings:
7070
androidStartInFullscreen: 1
7171
androidRenderOutsideSafeArea: 0
7272
androidUseSwappy: 1
73+
androidDisplayOptions: 1
7374
androidBlitType: 0
7475
androidResizeableActivity: 0
7576
androidDefaultWindowWidth: 1920
@@ -86,6 +87,7 @@ PlayerSettings:
8687
muteOtherAudioSources: 0
8788
Prepare IOS For Recording: 0
8889
Force IOS Speakers When Recording: 0
90+
audioSpatialExperience: 0
8991
deferSystemGesturesMode: 0
9092
hideHomeButton: 0
9193
submitAnalytics: 1
@@ -132,6 +134,7 @@ PlayerSettings:
132134
switchNVNMaxPublicSamplerIDCount: 0
133135
switchMaxWorkerMultiple: 8
134136
switchNVNGraphicsFirmwareMemory: 32
137+
switchGraphicsJobsSyncAfterKick: 1
135138
vulkanNumSwapchainBuffers: 3
136139
vulkanEnableSetSRGBWrite: 0
137140
vulkanEnablePreTransform: 0
@@ -140,7 +143,7 @@ PlayerSettings:
140143
loadStoreDebugModeEnabled: 0
141144
visionOSBundleVersion: 1.0
142145
tvOSBundleVersion: 1.0
143-
bundleVersion: 1.3.2
146+
bundleVersion: 1.3.3
144147
preloadedAssets:
145148
- {fileID: 0}
146149
- {fileID: 0}
@@ -170,19 +173,19 @@ PlayerSettings:
170173
androidMaxAspectRatio: 2.1
171174
androidMinAspectRatio: 1
172175
applicationIdentifier:
173-
Android: com.melodymania.MelodyManiaCompanion
174-
Standalone: com.melodymania.MelodyManiaCompanion
175-
iPhone: com.melodymania.MelodyManiaCompanion
176+
Android: com.ultrastar.UltraStarPlayCompanion
177+
Standalone: com.ultrastar.UltraStarPlayCompanion
178+
iPhone: com.ultrastar.UltraStarPlayCompanion
176179
buildNumber:
177180
Bratwurst: 0
178181
Standalone: 0
179182
VisionOS: 0
180183
iPhone: 0
181184
tvOS: 0
182185
overrideDefaultApplicationIdentifier: 1
183-
AndroidBundleVersionCode: 29004210
186+
AndroidBundleVersionCode: 29378586
184187
AndroidMinSdkVersion: 23
185-
AndroidTargetSdkVersion: 35
188+
AndroidTargetSdkVersion: 36
186189
AndroidPreferredInstallLocation: 1
187190
aotOptions:
188191
stripEngineCode: 1
@@ -274,13 +277,16 @@ PlayerSettings:
274277
AndroidTargetArchitectures: 3
275278
AndroidSplashScreenScale: 0
276279
androidSplashScreen: {fileID: 0}
277-
AndroidKeystoreName: F:/Dev/Keys/MelodyMania.keystore
278-
AndroidKeyaliasName: melodymania-upload-key
280+
AndroidKeystoreName: C:/Dev/Keys/UltraStarPlay.keystore
281+
AndroidKeyaliasName: ultrastarplay-upload-key
279282
AndroidEnableArmv9SecurityFeatures: 0
280283
AndroidEnableArm64MTE: 0
281284
AndroidBuildApkPerCpuArchitecture: 0
282285
AndroidTVCompatibility: 0
283286
AndroidIsGame: 1
287+
androidAppCategory: 3
288+
useAndroidAppCategory: 1
289+
androidAppCategoryOther:
284290
AndroidEnableTango: 0
285291
androidEnableBanner: 1
286292
androidUseLowAccuracyLocation: 0
@@ -550,6 +556,7 @@ PlayerSettings:
550556
iPhone: 1
551557
tvOS: 1
552558
m_BuildTargetGroupLightmapEncodingQuality: []
559+
m_BuildTargetGroupHDRCubemapEncodingQuality: []
553560
m_BuildTargetGroupLightmapSettings: []
554561
m_BuildTargetGroupLoadStoreDebugModeSettings: []
555562
m_BuildTargetNormalMapEncoding: []
@@ -944,3 +951,4 @@ PlayerSettings:
944951
androidVulkanDenyFilterList: []
945952
androidVulkanAllowFilterList: []
946953
androidVulkanDeviceFilterListAsset: {fileID: 0}
954+
d3d12DeviceFilterListAsset: {fileID: 0}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
m_EditorVersion: 6000.1.0f1
2-
m_EditorVersionWithRevision: 6000.1.0f1 (9ea152932a88)
1+
m_EditorVersion: 6000.2.9f1
2+
m_EditorVersionWithRevision: 6000.2.9f1 (e0c4e791ab71)

UltraStar Play/Assets/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
VERSION.txt
22

3+
########################################
4+
## Files generated by Build Report Inspector https://docs.unity3d.com/Packages/com.unity.build-report-inspector@0.3/manual/index.html
5+
BuildReports/
6+
BuildReports.meta
7+
38
########################################
49
## Files generated by Unity
510
Resources/PerformanceTestRun*.json

UltraStar Play/Assets/Common/AiTools/SpeechRecognition/DummyWhisper.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
#if UNITY_ANDROID
2-
3-
using System;
1+
using System;
42
using System.Collections.Generic;
53
using System.Threading.Tasks;
64
using UnityEngine;
@@ -63,5 +61,3 @@ public class WhisperResultTimestamp
6361
public TimeSpan End { get; set; }
6462
}
6563
}
66-
67-
#endif

UltraStar Play/Assets/Common/CompanionClientConnections/CompanionClientHandler.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ private void HandleJsonMessageFromClient(string json)
6969
switch (messageType)
7070
{
7171
case CompanionAppMessageType.BeatPitchEvents:
72-
BeatPitchEventsDto beatPitchEventsDto = JsonConverter.FromJson<BeatPitchEventsDto>(json);
72+
// Use UnityEngine.JsonUtility for better performance. There can be hundreds of messages per second such that Newtonsoft.Json is too slow in this case.
73+
BeatPitchEventsDto beatPitchEventsDto = JsonUtility.FromJson<BeatPitchEventsDto>(json);
7374

7475
UpdateJitterStats(beatPitchEventsDto);
7576

UltraStar Play/Assets/Common/Graphics/BackgroundsDynamic/BackgroundShader.shader

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ Shader "UltraStar Play/Background Shader"
3232
[Header(Animation)]
3333
[Space]
3434
_TransitionTime ("Transition Time", Range(0,1)) = 0
35+
36+
// _MainTex is not really used. Unity expects this property to set the texture of RawImage component that has been added to the Canvas.
37+
[NoScaleOffset][HideInInspector] _MainTex ("Main Texture", 2D) = "white" {}
3538
}
3639
SubShader
3740
{

UltraStar Play/Assets/Common/Graphics/BackgroundsDynamic/[bg-dynamic] particles.mat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MonoBehaviour:
1212
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
1313
m_Name:
1414
m_EditorClassIdentifier:
15-
version: 9
15+
version: 10
1616
--- !u!21 &2100000
1717
Material:
1818
serializedVersion: 8
@@ -31,7 +31,7 @@ Material:
3131
- _ALPHABLEND_ON
3232
- _FLIPBOOKBLENDING_OFF
3333
- _GRADIENT_RADIAL
34-
m_LightmapFlags: 0
34+
m_LightmapFlags: 6
3535
m_EnableInstancingVariants: 0
3636
m_DoubleSidedGI: 0
3737
m_CustomRenderQueue: 3000

0 commit comments

Comments
 (0)