From d97cb906de8f2e6deb037409e4cdcb9874a639a7 Mon Sep 17 00:00:00 2001 From: katboi01 <59540382+katboi01@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:58:45 +0100 Subject: [PATCH] Sync fork (#73) * Improved UI layout and live vocals * New Live Compatibility * Android build support * Update build.yml * Fix issues with the new version of the game * add config button * Improve performance * bug fix, new uma compatibility --------- Co-authored-by: CroakFang <1605296300@qq.com> --- .github/workflows/build.yml | 62 +- .../Plugins/System.Windows.Forms.dll.meta | 45 +- .../StandalongFileBrowser.runtime.asmdef | 4 +- .../Animations/Controller.controller | 2 +- Assets/Scenes/Version2.unity | 612 ++++++++++++++---- Assets/Scripts/Config.cs | 14 +- .../VMDRecorder/UnityCameraVMDRecorder.cs | 2 +- Assets/Scripts/Manifest/ManifestDB.cs | 8 +- Assets/Scripts/UmaAssetManager.cs | 18 +- Assets/Scripts/UmaContainerCharacter.cs | 7 +- .../UmaDatabase/UmaDatabaseController.cs | 26 +- .../Scripts/UmaDatabase/UmaDatabaseEntry.cs | 27 +- Assets/Scripts/UmaViewerBuilder.cs | 52 +- Assets/Scripts/UmaViewerDownload.cs | 104 ++- Assets/Scripts/UmaViewerGlobalShader.cs | 4 + Assets/Scripts/UmaViewerMain.cs | 8 + Assets/Scripts/UmaViewerUI.cs | 24 + .../umamusume/Gallop/FaceDrivenKeyTarget.cs | 56 +- .../Gallop/Live/Cutt/LiveTimelineControl.cs | 3 +- .../Live/Cutt/LiveTimelineMotionSequence.cs | 21 +- .../Scripts/umamusume/Gallop/Live/Director.cs | 44 +- ProjectSettings/ProjectSettings.asset | 25 +- UserSettings/EditorUserSettings.asset | 20 +- 23 files changed, 919 insertions(+), 269 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2650e35..146ffc5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Windows Player +name: Build Windows Player and Android APK on: push: @@ -7,10 +7,9 @@ on: workflow_dispatch: jobs: - buildWindowsPlayer: - name: build Windows Player + buildForPlatform: + name: build Player runs-on: ubuntu-latest - strategy: fail-fast: false matrix: @@ -21,13 +20,13 @@ jobs: unityVersion: - 2020.3.24f1 targetPlatform: - - StandaloneWindows64 # Build a Windows 64-bit standalone. - + - Android # Build an Android APK. + - StandaloneWindows64 # Build a Windows 64-bit standalone steps: - uses: actions/checkout@v2 with: lfs: true - + - uses: game-ci/unity-builder@v2 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -38,15 +37,37 @@ jobs: projectPath: ${{ matrix.projectPath }} unityVersion: ${{ matrix.unityVersion }} targetPlatform: ${{ matrix.targetPlatform }} - - - uses: actions/upload-artifact@v4 - with: - name: Build - path: build - name: Zip Binary + if: matrix.targetPlatform == 'StandaloneWindows64' run: zip -r UmaViewer_${{ matrix.targetPlatform }}.zip build/${{ matrix.targetPlatform }}/* + - name: Upload Artifact for Android + if: matrix.targetPlatform == 'Android' + uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }}/* + + - name: Upload Artifact for Windows + if: matrix.targetPlatform == 'StandaloneWindows64' + uses: actions/upload-artifact@v4 + with: + name: Build-${{ matrix.targetPlatform }} + path: UmaViewer_StandaloneWindows64.zip + + createRelease: + needs: buildForPlatform + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Download Artifacts + uses: actions/download-artifact@v4 + with: + path: build/ + - name: Create Release id: create_release uses: actions/create-release@v1 @@ -58,13 +79,22 @@ jobs: draft: false prerelease: false - - name: Upload Release Asset - id: upload-release-asset + - name: Upload Windows Release Asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./UmaViewer_${{ matrix.targetPlatform }}.zip + asset_path: ./build/Build-StandaloneWindows64/UmaViewer_StandaloneWindows64.zip asset_name: UmaViewer.zip - asset_content_type: application/zip + asset_content_type: application/zip + + - name: Upload Android Release Asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build/Build-Android/UmaViewer.apk + asset_name: UmaViewer.apk + asset_content_type: application/vnd.android.package-archive diff --git a/Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll.meta b/Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll.meta index cd42442..2484c27 100644 --- a/Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll.meta +++ b/Assets/Plugins/StandaloneFileBrowser/Plugins/System.Windows.Forms.dll.meta @@ -11,6 +11,23 @@ PluginImporter: isExplicitlyReferenced: 0 validateReferences: 1 platformData: + - first: + : Any + second: + enabled: 0 + settings: + Exclude Android: 1 + Exclude Editor: 0 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 + Exclude Win: 0 + Exclude Win64: 0 + - first: + Android: Android + second: + enabled: 0 + settings: + CPU: ARMv7 - first: Any: second: @@ -19,9 +36,35 @@ PluginImporter: - first: Editor: Editor second: - enabled: 0 + enabled: 1 settings: + CPU: AnyCPU DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: None + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: None + - first: + Standalone: Win + second: + enabled: 1 + settings: + CPU: x86 + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: x86_64 - first: Windows Store Apps: WindowsStoreApps second: diff --git a/Assets/Plugins/StandaloneFileBrowser/StandalongFileBrowser.runtime.asmdef b/Assets/Plugins/StandaloneFileBrowser/StandalongFileBrowser.runtime.asmdef index d54326a..a08ab7c 100644 --- a/Assets/Plugins/StandaloneFileBrowser/StandalongFileBrowser.runtime.asmdef +++ b/Assets/Plugins/StandaloneFileBrowser/StandalongFileBrowser.runtime.asmdef @@ -3,7 +3,9 @@ "rootNamespace": "", "references": [], "includePlatforms": [], - "excludePlatforms": [], + "excludePlatforms": [ + "Android" + ], "allowUnsafeCode": false, "overrideReferences": false, "precompiledReferences": [], diff --git a/Assets/Resources/Animations/Controller.controller b/Assets/Resources/Animations/Controller.controller index 9633184..c709ca6 100644 --- a/Assets/Resources/Animations/Controller.controller +++ b/Assets/Resources/Animations/Controller.controller @@ -299,7 +299,7 @@ AnimatorController: m_Behaviours: [] m_BlendingMode: 0 m_SyncedLayerIndex: -1 - m_DefaultWeight: 0 + m_DefaultWeight: 1 m_IKPass: 0 m_SyncedLayerAffectsTiming: 0 m_Controller: {fileID: 9100000} diff --git a/Assets/Scenes/Version2.unity b/Assets/Scenes/Version2.unity index b86a044..aaf930a 100644 --- a/Assets/Scenes/Version2.unity +++ b/Assets/Scenes/Version2.unity @@ -2827,7 +2827,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &92965282 @@ -3008,13 +3008,14 @@ RectTransform: - {fileID: 2122030934} - {fileID: 2073237536} - {fileID: 1226114733} + - {fileID: 324606079} m_Father: {fileID: 1704906816} m_RootOrder: 15 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 141.5, y: -997.18} - m_SizeDelta: {x: 283, y: 250} + m_AnchoredPosition: {x: 141.5, y: -1022.18} + m_SizeDelta: {x: 283, y: 300} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &93905315 MonoBehaviour: @@ -3752,6 +3753,85 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 117553839} m_CullTransparentMesh: 1 +--- !u!1 &122810128 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 122810129} + - component: {fileID: 122810131} + - component: {fileID: 122810130} + m_Layer: 5 + m_Name: Text + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &122810129 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122810128} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1030902992} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &122810130 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122810128} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} + m_FontSize: 25 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 1 + m_MaxSize: 40 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: Open Config +--- !u!222 &122810131 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 122810128} + m_CullTransparentMesh: 1 --- !u!1 &123935076 GameObject: m_ObjectHideFlags: 0 @@ -3847,78 +3927,6 @@ MonoBehaviour: m_EffectColor: {r: 0, g: 0, b: 0, a: 1} m_EffectDistance: {x: 2, y: 2} m_UseGraphicAlpha: 1 ---- !u!1 &127647251 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 127647252} - - component: {fileID: 127647254} - - component: {fileID: 127647253} - m_Layer: 5 - m_Name: RightSide - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &127647252 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 127647251} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: - - {fileID: 1648089198} - m_Father: {fileID: 733646225} - m_RootOrder: 1 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &127647253 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 127647251} - m_Enabled: 0 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 0 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 4 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 1 - m_ChildControlHeight: 1 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 ---- !u!222 &127647254 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 127647251} - m_CullTransparentMesh: 1 --- !u!1 &133579702 GameObject: m_ObjectHideFlags: 0 @@ -7530,7 +7538,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 255, y: -45.000244} + m_AnchoredPosition: {x: 255, y: -45.000122} m_SizeDelta: {x: 270, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &270183827 @@ -9043,6 +9051,51 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 320695832} m_CullTransparentMesh: 1 +--- !u!1 &324606078 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 324606079} + - component: {fileID: 324606080} + m_Layer: 5 + m_Name: OpenConfg + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &324606079 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 324606078} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1030902992} + m_Father: {fileID: 93905314} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 283, y: -275} + m_SizeDelta: {x: 283, y: 50} + m_Pivot: {x: 1, y: 0.5} +--- !u!222 &324606080 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 324606078} + m_CullTransparentMesh: 1 --- !u!1 &325988833 GameObject: m_ObjectHideFlags: 0 @@ -24245,7 +24298,6 @@ GameObject: - component: {fileID: 733646225} - component: {fileID: 733646227} - component: {fileID: 733646226} - - component: {fileID: 733646228} m_Layer: 5 m_Name: TopBar m_TagString: Untagged @@ -24264,15 +24316,14 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - - {fileID: 1200264883} - - {fileID: 127647252} + - {fileID: 1459486867} m_Father: {fileID: 1300114664} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 60} + m_AnchoredPosition: {x: -40, y: 0} + m_SizeDelta: {x: -79.999756, y: 60} m_Pivot: {x: 0.5, y: 1} --- !u!114 &733646226 MonoBehaviour: @@ -24312,32 +24363,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 733646224} m_CullTransparentMesh: 1 ---- !u!114 &733646228 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 733646224} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 30649d3a9faa99c48a7b1166b86bf2a0, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Padding: - m_Left: 5 - m_Right: 0 - m_Top: 0 - m_Bottom: 0 - m_ChildAlignment: 4 - m_Spacing: 0 - m_ChildForceExpandWidth: 1 - m_ChildForceExpandHeight: 1 - m_ChildControlWidth: 1 - m_ChildControlHeight: 1 - m_ChildScaleWidth: 0 - m_ChildScaleHeight: 0 - m_ReverseArrangement: 0 --- !u!1 &736156571 GameObject: m_ObjectHideFlags: 0 @@ -28691,7 +28716,7 @@ Transform: m_LocalScale: {x: 2.2068965, y: 2.2068965, z: 2.2068965} m_Children: [] m_Father: {fileID: 2005720242} - m_RootOrder: 2 + m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &859804981 GameObject: @@ -30654,7 +30679,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 380, y: -45.000244} + m_AnchoredPosition: {x: 380, y: -45.000122} m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &931406427 @@ -31042,7 +31067,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 255, y: -45.000244} + m_AnchoredPosition: {x: 255, y: -45.000122} m_SizeDelta: {x: 270, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &952551665 @@ -33373,6 +33398,139 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1027345406} m_CullTransparentMesh: 1 +--- !u!1 &1030902991 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1030902992} + - component: {fileID: 1030902995} + - component: {fileID: 1030902994} + - component: {fileID: 1030902993} + m_Layer: 5 + m_Name: Button + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1030902992 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1030902991} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 122810129} + m_Father: {fileID: 324606079} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 0, y: 0} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1030902993 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1030902991} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1030902994} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1564959567} + m_TargetAssemblyTypeName: UmaViewerUI, umamusume + m_MethodName: OpenConfig + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 1 + m_CallState: 2 +--- !u!114 &1030902994 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1030902991} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 9a444f34ba8719a4083a94891d66b364, type: 3} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 2 +--- !u!222 &1030902995 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1030902991} + m_CullTransparentMesh: 1 --- !u!1 &1035592436 GameObject: m_ObjectHideFlags: 0 @@ -33448,7 +33606,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1040294592 @@ -37982,8 +38140,9 @@ GameObject: - component: {fileID: 1200264883} - component: {fileID: 1200264885} - component: {fileID: 1200264884} + - component: {fileID: 1200264886} m_Layer: 5 - m_Name: LeftSide + m_Name: Content m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -37996,7 +38155,7 @@ RectTransform: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1200264882} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: @@ -38007,13 +38166,13 @@ RectTransform: - {fileID: 695996365} - {fileID: 399621054} - {fileID: 1690552082} - m_Father: {fileID: 733646225} + m_Father: {fileID: 2090219184} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -0.00024414062, y: 0} + m_SizeDelta: {x: 0, y: 60} m_Pivot: {x: 0, y: 1} --- !u!114 &1200264884 MonoBehaviour: @@ -38047,6 +38206,20 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1200264882} m_CullTransparentMesh: 1 +--- !u!114 &1200264886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1200264882} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 3245ec927659c4140ac4f8d17403cc18, type: 3} + m_Name: + m_EditorClassIdentifier: + m_HorizontalFit: 1 + m_VerticalFit: 0 --- !u!1 &1201479098 GameObject: m_ObjectHideFlags: 0 @@ -38566,7 +38739,7 @@ RectTransform: m_AnchorMin: {x: 1, y: 1} m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 80, y: 45} + m_SizeDelta: {x: 80, y: 60} m_Pivot: {x: 1, y: 1} --- !u!114 &1210994111 MonoBehaviour: @@ -46273,8 +46446,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -29.999878} - m_SizeDelta: {x: 300, y: -60.000233} + m_AnchoredPosition: {x: 0, y: -46.499878} + m_SizeDelta: {x: 300, y: -93.00023} m_Pivot: {x: 1, y: 0.5} --- !u!114 &1453791885 MonoBehaviour: @@ -46344,6 +46517,82 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1453791883} m_CullTransparentMesh: 1 +--- !u!1 &1459486866 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1459486867} + - component: {fileID: 1459486870} + - component: {fileID: 1459486868} + m_Layer: 5 + m_Name: Scroll View + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1459486867 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1459486866} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 2090219184} + m_Father: {fileID: 733646225} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 2.5, y: 0} + m_SizeDelta: {x: -4.9999695, y: 60} + m_Pivot: {x: 0.5, y: 1} +--- !u!114 &1459486868 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1459486866} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Content: {fileID: 1200264883} + m_Horizontal: 1 + m_Vertical: 0 + m_MovementType: 2 + m_Elasticity: 0.1 + m_Inertia: 1 + m_DecelerationRate: 0.135 + m_ScrollSensitivity: 1 + m_Viewport: {fileID: 2090219184} + m_HorizontalScrollbar: {fileID: 0} + m_VerticalScrollbar: {fileID: 0} + m_HorizontalScrollbarVisibility: 2 + m_VerticalScrollbarVisibility: 2 + m_HorizontalScrollbarSpacing: -3 + m_VerticalScrollbarSpacing: -3 + m_OnValueChanged: + m_PersistentCalls: + m_Calls: [] +--- !u!222 &1459486870 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1459486866} + m_CullTransparentMesh: 1 --- !u!1 &1460100587 GameObject: m_ObjectHideFlags: 0 @@ -47837,7 +48086,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!224 &1525688469 stripped @@ -48552,7 +48801,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1558324558 @@ -50595,14 +50844,14 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 859804982} - m_Father: {fileID: 127647252} - m_RootOrder: 0 + m_Father: {fileID: 2005720242} + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 1, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 1, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: -60} m_SizeDelta: {x: 300, y: 33} - m_Pivot: {x: 1, y: 0} + m_Pivot: {x: 1, y: 1} --- !u!114 &1648089199 MonoBehaviour: m_ObjectHideFlags: 0 @@ -52120,7 +52369,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1678768231 @@ -52454,7 +52703,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!222 &1684693616 @@ -52824,7 +53073,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 380, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1699478760 @@ -55143,7 +55392,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 255, y: -45.000244} + m_AnchoredPosition: {x: 255, y: -45.000122} m_SizeDelta: {x: 270, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1765749874 @@ -60372,7 +60621,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 400, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &1970310175 @@ -61950,6 +62199,7 @@ RectTransform: m_Children: - {fileID: 1300114664} - {fileID: 1210994110} + - {fileID: 1648089198} - {fileID: 859153092} m_Father: {fileID: 0} m_RootOrder: 2 @@ -64187,6 +64437,96 @@ MonoBehaviour: m_OnValueChanged: m_PersistentCalls: m_Calls: [] +--- !u!1 &2090219183 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2090219184} + - component: {fileID: 2090219187} + - component: {fileID: 2090219186} + - component: {fileID: 2090219185} + m_Layer: 5 + m_Name: Viewport + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2090219184 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090219183} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1200264883} + m_Father: {fileID: 1459486867} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 5, y: 0} + m_SizeDelta: {x: -15, y: 0} + m_Pivot: {x: 0, y: 1} +--- !u!114 &2090219185 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090219183} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 31a19414c41e5ae4aae2af33fee712f6, type: 3} + m_Name: + m_EditorClassIdentifier: + m_ShowMaskGraphic: 0 +--- !u!114 &2090219186 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090219183} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 0.02745098} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 1 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &2090219187 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2090219183} + m_CullTransparentMesh: 1 --- !u!1 &2091332065 GameObject: m_ObjectHideFlags: 0 @@ -65775,7 +66115,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 400, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &2129326814 @@ -66997,7 +67337,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 0, y: -45.000244} + m_AnchoredPosition: {x: 0, y: -45.000122} m_SizeDelta: {x: 255, y: -90} m_Pivot: {x: 0, y: 0.5} --- !u!114 &2146564492 diff --git a/Assets/Scripts/Config.cs b/Assets/Scripts/Config.cs index 7fca2db..6fddd74 100644 --- a/Assets/Scripts/Config.cs +++ b/Assets/Scripts/Config.cs @@ -12,6 +12,9 @@ public class Config public string LanguageTip = "Affects Uma names on the list. Language options: 0 - En, 1 - Jp"; public Language Language = Language.En; + public string DownloadMissingResourcesTip = "true/false. automatically download missing files, which may require a VPN."; + public bool DownloadMissingResources = true; + public string MainPathTip = "Path to game folder, eg. D:/Backup/Cygames/umamusume"; public string MainPath = ""; @@ -86,10 +89,18 @@ public class Config public Config() { - //TODO: Updating config file Version = Application.version; MainPath = $@"{Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "Low"}\Cygames\umamusume"; + if (Application.isMobilePlatform) + { + WorkMode = WorkMode.Standalone; + DownloadMissingResources = true; + MainPath = Application.persistentDataPath; + Instance = this; + return; + } + if (!File.Exists(configPath)) { File.WriteAllText(configPath, JsonUtility.ToJson(this, true)); @@ -99,6 +110,7 @@ public class Config try { JsonUtility.FromJsonOverwrite(File.ReadAllText(configPath), this); + File.WriteAllText(configPath, JsonUtility.ToJson(this, true)); } catch (Exception ex) { diff --git a/Assets/Scripts/Exporters/VMDRecorder/UnityCameraVMDRecorder.cs b/Assets/Scripts/Exporters/VMDRecorder/UnityCameraVMDRecorder.cs index 609db9b..fb1a181 100644 --- a/Assets/Scripts/Exporters/VMDRecorder/UnityCameraVMDRecorder.cs +++ b/Assets/Scripts/Exporters/VMDRecorder/UnityCameraVMDRecorder.cs @@ -379,7 +379,7 @@ public class UnityCameraVMDRecorder : MonoBehaviour binaryWriter.Write(boneNameBytes, 0, boneNameBytes.Length); binaryWriter.Write(new byte[boneNameLength - boneNameBytes.Length], 0, boneNameLength - boneNameBytes.Length); - byte[] frameNumberByte = BitConverter.GetBytes((ulong)(frame.frameIndex/2)); + byte[] frameNumberByte = BitConverter.GetBytes((ulong)(frame.frameIndex / 2)); //Set 30 FPS binaryWriter.Write(frameNumberByte, 0, intByteLength); Vector3 position = frame.Position * WorldScaleFix; diff --git a/Assets/Scripts/Manifest/ManifestDB.cs b/Assets/Scripts/Manifest/ManifestDB.cs index d9ecc92..2ccf43a 100644 --- a/Assets/Scripts/Manifest/ManifestDB.cs +++ b/Assets/Scripts/Manifest/ManifestDB.cs @@ -17,7 +17,7 @@ public class ManifestDB private bool isError; public ManifestDB() { - string DBPath = $"{Config.Instance.MainPath}\\meta_umaviewer"; + string DBPath = $"{Config.Instance.MainPath}/meta_umaviewer"; ManifestDB.DBPath = DBPath; if (!File.Exists(DBPath)) { @@ -186,7 +186,7 @@ public class ManifestDB yield break; } - var masterPath = $"{Path.GetDirectoryName(DBPath)}\\master\\master_umaviewer.mdb"; + var masterPath = $"{Path.GetDirectoryName(DBPath)}/master/master_umaviewer.mdb"; var masterDir = Path.GetDirectoryName(masterPath); callback?.Invoke($"Checking master.mdb", UIMessageType.Default); @@ -347,10 +347,6 @@ public class ManifestDB { return entry; } - else - { - return entry; - } } return platformEntrys[0]; } diff --git a/Assets/Scripts/UmaAssetManager.cs b/Assets/Scripts/UmaAssetManager.cs index c1afd42..bc7c820 100644 --- a/Assets/Scripts/UmaAssetManager.cs +++ b/Assets/Scripts/UmaAssetManager.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.IO; using System.Linq; using UnityEngine; -using static UnityEngine.Rendering.VirtualTexturing.Debugging; public class UmaAssetManager : MonoBehaviour @@ -55,14 +54,25 @@ public class UmaAssetManager : MonoBehaviour SearchAB(Main, entry, ref result); } + var percent_num = result.Count / 100; for (int i = 0; i < result.Count; i++) - { - var exist = LoadAB(result[i]); - if (!exist) + { + var entry = result[i]; + if (!entry.IsAssetBundle) { + var file = entry.FilePath; // trigger download OnLoadProgressChange?.Invoke(i, result.Count, null); yield return null; } + else + { + var exist = LoadAB(result[i]); + if (!exist && i % percent_num == 0) + { + OnLoadProgressChange?.Invoke(i, result.Count, null); + yield return null; + } + } } OnLoadProgressChange?.Invoke(-1, result.Count, null); diff --git a/Assets/Scripts/UmaContainerCharacter.cs b/Assets/Scripts/UmaContainerCharacter.cs index dfb7dc1..4d23f86 100644 --- a/Assets/Scripts/UmaContainerCharacter.cs +++ b/Assets/Scripts/UmaContainerCharacter.cs @@ -803,8 +803,11 @@ public class UmaContainerCharacter : UmaContainer var tex = ab.LoadAsset("tex_chr_tear00"); StaticTear_L = table["tearmesh_l"] as GameObject; StaticTear_R = table["tearmesh_r"] as GameObject; - StaticTear_L.GetComponent().material.mainTexture = tex; - StaticTear_R.GetComponent().material.mainTexture = tex; + if (StaticTear_L && StaticTear_R) + { + StaticTear_L.GetComponent().material.mainTexture = tex; + StaticTear_R.GetComponent().material.mainTexture = tex; + } } switch (m.shader.name) diff --git a/Assets/Scripts/UmaDatabase/UmaDatabaseController.cs b/Assets/Scripts/UmaDatabase/UmaDatabaseController.cs index a158d7a..f152c53 100644 --- a/Assets/Scripts/UmaDatabase/UmaDatabaseController.cs +++ b/Assets/Scripts/UmaDatabase/UmaDatabaseController.cs @@ -54,15 +54,15 @@ public class UmaDatabaseController { if(Config.Instance.WorkMode == WorkMode.Standalone) { - if(!File.Exists($@"{Config.Instance.MainPath}\meta_umaviewer")) throw new Exception(); - metaDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}\meta_umaviewer;"); - masterDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}\master\master_umaviewer.mdb;"); + if(!File.Exists($@"{Config.Instance.MainPath}/meta_umaviewer")) throw new Exception(); + metaDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}/meta_umaviewer;"); + masterDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}/master/master_umaviewer.mdb;"); } else { - if (!File.Exists($@"{Config.Instance.MainPath}\meta")) throw new Exception(); - metaDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}\meta;"); - masterDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}\master\master.mdb;"); + if (!File.Exists($@"{Config.Instance.MainPath}/meta")) throw new Exception(); + metaDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}/meta;"); + masterDb = new SqliteConnection($@"Data Source={Config.Instance.MainPath}/master/master.mdb;"); } metaDb.Open(); @@ -133,7 +133,7 @@ public class UmaDatabaseController Debug.LogError($"Error caught while reading Entry : \n {e}"); } - if (entry != null) { + if (entry != null && !meta.ContainsKey(entry.Name)) { meta.Add(entry.Name, entry); } @@ -160,9 +160,17 @@ public class UmaDatabaseController sqlite_cmd.CommandText = sql; using var sqlite_datareader = sqlite_cmd.ExecuteReader(); var result = new DataTable(); - result.Load(sqlite_datareader); - foreach (DataRow row in result.Rows) + for (int i = 0; i < sqlite_datareader.FieldCount; i++) { + result.Columns.Add(sqlite_datareader.GetName(i), sqlite_datareader.GetFieldType(i)); + } + while (sqlite_datareader.Read()) + { + DataRow row = result.NewRow(); + for (int i = 0; i < sqlite_datareader.FieldCount; i++) + { + row[i] = sqlite_datareader[i]; + } dr.Add(row); } } diff --git a/Assets/Scripts/UmaDatabase/UmaDatabaseEntry.cs b/Assets/Scripts/UmaDatabase/UmaDatabaseEntry.cs index 32ed3df..51ece4d 100644 --- a/Assets/Scripts/UmaDatabase/UmaDatabaseEntry.cs +++ b/Assets/Scripts/UmaDatabase/UmaDatabaseEntry.cs @@ -2,7 +2,8 @@ using UnityEngine; using System.Linq; using System.Collections.Generic; -using static UnityEngine.Rendering.VirtualTexturing.Debugging; +using System; +using Object = UnityEngine.Object; public class UmaDatabaseEntry { @@ -16,12 +17,27 @@ public class UmaDatabaseEntry { get { - var path = $"{Config.Instance.MainPath}\\dat\\{Url.Substring(0, 2)}\\{Url}"; - if (Config.Instance.WorkMode == WorkMode.Standalone && !File.Exists(path)) + if (Config.Instance.DownloadMissingResources && !File.Exists(Path)) { DownloadAsset(this); } - return path; + return Path; + } + } + + public string Path + { + get + { + return $"{Config.Instance.MainPath}/dat/{Url.Substring(0, 2)}/{Url}"; + } + } + + public bool IsAssetBundle + { + get + { + return string.IsNullOrEmpty(System.IO.Path.GetExtension(Name)); } } @@ -42,8 +58,7 @@ public class UmaDatabaseEntry //TODO Make it async public static void DownloadAsset(UmaDatabaseEntry entry) { - var path = $"{Config.Instance.MainPath}\\dat\\{entry.Url.Substring(0, 2)}\\{entry.Url}"; - UmaViewerDownload.DownloadAssetSync(entry, path, delegate (string msg, UIMessageType type) + UmaViewerDownload.DownloadAssetSync(entry, delegate (string msg, UIMessageType type) { UmaViewerUI.Instance.ShowMessage(msg, type); }); diff --git a/Assets/Scripts/UmaViewerBuilder.cs b/Assets/Scripts/UmaViewerBuilder.cs index cf2c7a9..22c89a8 100644 --- a/Assets/Scripts/UmaViewerBuilder.cs +++ b/Assets/Scripts/UmaViewerBuilder.cs @@ -1,5 +1,6 @@ using CriWareFormats; using Gallop; +using Gallop.Live; using NAudio.Wave; using System; using System.Collections; @@ -658,36 +659,39 @@ public class UmaViewerBuilder : MonoBehaviour public void LoadLive(LiveEntry live, List characters) { - UmaSceneController.LoadScene("LiveScene", - delegate () + characters.ForEach(a => + { + if (a.CharaEntry == null || a.CostumeId == "") + { + a.CharaEntry = Main.Characters[Random.Range(0, Main.Characters.Count / 2)]; + a.CostumeId = "0002_00_00"; + } + });//fill empty + + UmaAssetManager.PreLoadAndRun(Director.GetLiveAllVoiceEntry(live.MusicId, characters), + delegate + { + UmaSceneController.LoadScene("LiveScene", + delegate { GameObject MainLive = Instantiate(LiveControllerPrefab); - Gallop.Live.Director mController = MainLive.GetComponentInChildren(); + Director mController = MainLive.GetComponentInChildren(); mController.live = live; mController.IsRecordVMD = UI.isRecordVMD; mController.RequireStage = UI.isRequireStage; List transferObjs = new List() { - MainLive, - GameObject.Find("ViewerMain"), - GameObject.Find("Directional Light"), - GameObject.Find("GlobalShaderController"), - GameObject.Find("AudioManager") + MainLive, + GameObject.Find("ViewerMain"), + GameObject.Find("Directional Light"), + GameObject.Find("GlobalShaderController"), + GameObject.Find("AudioManager") }; // Move the GameObject (you attach this in the Inspector) to the newly loaded Scene transferObjs.ForEach(o => SceneManager.MoveGameObjectToScene(o, SceneManager.GetSceneByName("LiveScene"))); mController.Initialize(); - characters.ForEach(a => - { - if (a.CharaEntry == null || a.CostumeId == "") - { - a.CharaEntry = Main.Characters[Random.Range(0, Main.Characters.Count/2)]; - a.CostumeId = "0002_00_00"; - } - });//fill empty - var actual_member_count = mController._liveTimelineControl.data.worksheetList[0].charaMotSeqList.Count; if (actual_member_count > characters.Count) { @@ -707,15 +711,15 @@ public class UmaViewerBuilder : MonoBehaviour LiveViewerUI.Instance.CurrentLyrics = Lyrics; } }, - delegate () + delegate { - Gallop.Live.Director.instance.InitializeUI(); - Gallop.Live.Director.instance.InitializeTimeline(characters, UI.LiveMode); - Gallop.Live.Director.instance.InitializeMusic(live.MusicId, characters); - Gallop.Live.Director.instance.Play(); + Director.instance.InitializeUI(); + Director.instance.InitializeTimeline(characters, UI.LiveMode); + Director.instance.InitializeMusic(live.MusicId, characters); + Director.instance.Play(); LiveViewerUI.Instance.RecordingUI.SetActive(Gallop.Live.Director.instance.IsRecordVMD); - } - ); + }); + }); } //Use decrypt function diff --git a/Assets/Scripts/UmaViewerDownload.cs b/Assets/Scripts/UmaViewerDownload.cs index 7b32b7c..6b55c59 100644 --- a/Assets/Scripts/UmaViewerDownload.cs +++ b/Assets/Scripts/UmaViewerDownload.cs @@ -1,14 +1,29 @@ using System; using System.Collections; +using System.Collections.Generic; using System.IO; using UnityEngine; using UnityEngine.Networking; +using static UmaViewerUI; +using System.Threading.Tasks; +using System.Threading; public class UmaViewerDownload : MonoBehaviour { public static string MANIFEST_ROOT_URL = "https://prd-storage-app-umamusume.akamaized.net/dl/resources/Manifest"; public static string GENERIC_BASE_URL = "https://prd-storage-game-umamusume.akamaized.net/dl/resources/Generic"; +#if UNITY_ANDROID && !UNITY_EDITOR + public static string ASSET_BASE_URL = "https://prd-storage-game-umamusume.akamaized.net/dl/resources/Android/assetbundles/"; +#else public static string ASSET_BASE_URL = "https://prd-storage-game-umamusume.akamaized.net/dl/resources/Windows/assetbundles/"; +#endif + + private const int maxConcurrentDownloads = 30; + private static SemaphoreSlim semaphore = new SemaphoreSlim(maxConcurrentDownloads); + private static List downloadCoroutines = new List(); + private static int CurrentCoroutinesCount = 0; + private static WaitUntil downloadWaitUntil = new WaitUntil(() => CurrentCoroutinesCount < maxConcurrentDownloads); + private static List downloadTasks = new List(); public static IEnumerator DownloadText(string url, System.Action callback) { @@ -27,9 +42,9 @@ public class UmaViewerDownload : MonoBehaviour } } - public static void DownloadAssetSync(UmaDatabaseEntry entry,string path, Action callback = null) + public static void DownloadAssetSync(UmaDatabaseEntry entry, Action callback = null) { - string baseurl = (string.IsNullOrEmpty(Path.GetExtension(entry.Name)) ? GetAssetRequestUrl(entry.Url) : GetGenericRequestUrl(entry.Url)); + string baseurl = entry.IsAssetBundle ? GetAssetRequestUrl(entry.Url) : GetGenericRequestUrl(entry.Url); using UnityWebRequest www = UnityWebRequest.Get(baseurl); www.SendWebRequest(); @@ -42,10 +57,91 @@ public class UmaViewerDownload : MonoBehaviour else { Debug.Log("saving " + entry.Url); - Directory.CreateDirectory(Path.GetDirectoryName(path)); - File.WriteAllBytes(path, www.downloadHandler.data); + Directory.CreateDirectory(Path.GetDirectoryName(entry.Path)); + File.WriteAllBytes(entry.Path, www.downloadHandler.data); } } + + public static IEnumerator DownloadAssets(List entrys, Action callback = null) + { + callback?.Invoke(0, entrys.Count, "DownLoading"); + var percent_num = entrys.Count / 100; + for(int i = 0; i < entrys.Count; i++) + { + var entry = entrys[i]; + yield return downloadWaitUntil; + if(i % percent_num == 0) + { + callback?.Invoke(i, entrys.Count, "DownLoading"); + } + CurrentCoroutinesCount++; + semaphore.WaitAsync(); + downloadCoroutines.Add(Instance.StartCoroutine(DownloadTask(entry))); + } + } + + public static IEnumerator DownloadTask(UmaDatabaseEntry entry) + { + if (!File.Exists(entry.Path)) + { + string baseurl = (string.IsNullOrEmpty(Path.GetExtension(entry.Name)) ? GetAssetRequestUrl(entry.Url) : GetGenericRequestUrl(entry.Url)); + using (UnityWebRequest www = UnityWebRequest.Get(baseurl)) + { + yield return www.SendWebRequest(); + if (www.result != UnityWebRequest.Result.Success) + { + if (Instance) + { + Instance.ShowMessage($"Failed to download resources : {www.error}", UIMessageType.Error); + } + } + else + { + Directory.CreateDirectory(Path.GetDirectoryName(entry.Path)); + File.WriteAllBytes(entry.Path, www.downloadHandler.data); + CurrentCoroutinesCount--; + } + } + } + else + { + CurrentCoroutinesCount--; + } + + } + + public static async void DownloadAssets(IEnumerable entrys) + { + downloadTasks.Clear(); + foreach (var entry in entrys) + { + await semaphore.WaitAsync(); + downloadTasks.Add(DownloadTask(entry, semaphore)); + } + await Task.WhenAll(downloadTasks); + } + + public static async Task DownloadTask(UmaDatabaseEntry entry, SemaphoreSlim semaphore) + { + if (!File.Exists(entry.Path)) + { + string baseurl = (string.IsNullOrEmpty(Path.GetExtension(entry.Name)) ? GetAssetRequestUrl(entry.Url) : GetGenericRequestUrl(entry.Url)); + using UnityWebRequest www = UnityWebRequest.Get(baseurl); + www.SendWebRequest(); + await Task.Run(() => { while (!www.isDone) { } }); + if (www.result != UnityWebRequest.Result.Success) + { + Debug.LogError(www.error); + } + else + { + Debug.Log("saving " + entry.Url); + Directory.CreateDirectory(Path.GetDirectoryName(entry.Path)); + File.WriteAllBytes(entry.Path, www.downloadHandler.data); + } + } + semaphore.Release(); + } public static string GetManifestRequestUrl(string hash) { diff --git a/Assets/Scripts/UmaViewerGlobalShader.cs b/Assets/Scripts/UmaViewerGlobalShader.cs index db25e43..a4c2bdc 100644 --- a/Assets/Scripts/UmaViewerGlobalShader.cs +++ b/Assets/Scripts/UmaViewerGlobalShader.cs @@ -121,6 +121,10 @@ public class UmaViewerGlobalShader : MonoBehaviour Shader.SetGlobalFloatArray("_DirtRate", _DirtRate); Shader.SetGlobalColor("_AmbientColor", _AmbientColor); + #if UNITY_ANDROID + Shader.SetGlobalFloat("_GlobalFarClipLog", 1f); + Shader.SetGlobalFloat("_GlobalVertexDepthLinear", 1f); + #endif } diff --git a/Assets/Scripts/UmaViewerMain.cs b/Assets/Scripts/UmaViewerMain.cs index 57d32da..6d3c20f 100644 --- a/Assets/Scripts/UmaViewerMain.cs +++ b/Assets/Scripts/UmaViewerMain.cs @@ -33,6 +33,7 @@ public class UmaViewerMain : MonoBehaviour Application.targetFrameRate = 120; AbList = UmaDatabaseController.Instance.MetaEntries; + if (AbList == null) return; var chara_3d = AbList.Where(ab => ab.Value.Type == UmaFileType._3d_cutt).Select(ab => ab.Value).ToList(); AbChara = chara_3d.FindAll(ab => ab.Name.StartsWith(UmaDatabaseController.CharaPath)); AbMotions = chara_3d.FindAll(ab => ab.Name.StartsWith(UmaDatabaseController.MotionPath)); @@ -44,10 +45,17 @@ public class UmaViewerMain : MonoBehaviour private IEnumerator Start() { + if (AbList == null) yield break; Dictionary enNames = new Dictionary(); Dictionary mobNames = new Dictionary(); var loadingUI = UmaSceneController.instance; + if(Config.Instance.WorkMode == WorkMode.Standalone && AbList != null) + { + var ablist = new List(AbList.Values); + yield return UmaViewerDownload.DownloadAssets(ablist, UmaSceneController.instance.LoadingProgressChange); + } + //Main chara names (En only) if (Config.Instance.Language == Language.En) { diff --git a/Assets/Scripts/UmaViewerUI.cs b/Assets/Scripts/UmaViewerUI.cs index 07c801f..d3702e1 100644 --- a/Assets/Scripts/UmaViewerUI.cs +++ b/Assets/Scripts/UmaViewerUI.cs @@ -1,5 +1,7 @@ using Gallop; +#if !UNITY_ANDROID || UNITY_EDITOR using SFB; +#endif using System; using System.Collections; using System.Collections.Generic; @@ -171,6 +173,9 @@ public class UmaViewerUI : MonoBehaviour UmaAssetManager.OnLoadedBundleClear += LoadedAssetsClear; PoseManager.LoadLocalPoseFiles(); +#if UNITY_ANDROID && !UNITY_EDITOR + canvasScaler.referenceResolution = new Vector2(1280, 720); +#endif } private void OnDestroy() @@ -1396,6 +1401,7 @@ public class UmaViewerUI : MonoBehaviour public void ChangeDataPath() { + #if !UNITY_ANDROID || UNITY_EDITOR var path = StandaloneFileBrowser.OpenFolderPanel("Select Folder", Config.Instance.MainPath, false); if (path != null && path.Length > 0 && !string.IsNullOrEmpty(path[0])) { @@ -1405,6 +1411,21 @@ public class UmaViewerUI : MonoBehaviour Config.Instance.UpdateConfig(); } } + #endif + } + + public void OpenConfig() + { + #if !UNITY_ANDROID || UNITY_EDITOR + if (File.Exists(Config.configPath)) + { + Process.Start(new ProcessStartInfo() + { + FileName = Config.configPath, + UseShellExecute = true + }); + } + #endif } public void ChangeOutlineWidth(float val) @@ -1418,6 +1439,7 @@ public class UmaViewerUI : MonoBehaviour public void ShowMessage(string msg, UIMessageType type) { + if (!MessageText) return; MessageText.text += type switch { UIMessageType.Error => string.Format("{0}\n", msg), @@ -1432,6 +1454,7 @@ public class UmaViewerUI : MonoBehaviour public void ExportModel() { + #if !UNITY_ANDROID || UNITY_EDITOR var container = Builder.CurrentUMAContainer; if (container) { @@ -1442,6 +1465,7 @@ public class UmaViewerUI : MonoBehaviour ModelExporter.ExportModel(container, path); } } + #endif } public void ToggleVisible(GameObject go) diff --git a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs index 025c024..225d9f0 100644 --- a/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs +++ b/Assets/Scripts/umamusume/Gallop/FaceDrivenKeyTarget.cs @@ -954,37 +954,49 @@ namespace Gallop if (updateInfo_.effect != null) { var info = updateInfo_.effect; - var cheektype = info.cheekType; - for (int i = 0; i < CheekMorph.BindProperties.Count; i++) + if (CheekMorph != null) { - CheekMorph.BindProperties[i].Value = (cheektype - 1 == i ? 1 : 0); + var cheektype = info.cheekType; + for (int i = 0; i < CheekMorph.BindProperties.Count; i++) + { + CheekMorph.BindProperties[i].Value = (cheektype - 1 == i ? 1 : 0); + } } - var mangatype = info.mangameIndex; - if (mangatype == 0) + if (MangaMorph != null) { - HasManga = false; - MangaMorph.BindProperties[1].Value = mangatype; - } - else - { - HasManga = true; - MangaMorph.BindProperties[0].Value = mangatype - 1; - MangaMorph.BindProperties[1].Value = 1; + var mangatype = info.mangameIndex; + if (mangatype == 0) + { + HasManga = false; + MangaMorph.BindProperties[1].Value = mangatype; + } + else + { + HasManga = true; + MangaMorph.BindProperties[0].Value = mangatype - 1; + MangaMorph.BindProperties[1].Value = 1; + } } - var tearfulEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrTearful) > 0; - var tearfultype = tearfulEnable ? info.tearyType : 0; - StaticTearMorph.BindProperties.ForEach(p => p.Value = tearfultype); - - var shaderEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrFaceShadowVisible) > 0; - if (shaderEnable) + if (StaticTearMorph != null) { - ShadeMorph.BindProperties[0].Value = Mathf.MoveTowards(ShadeMorph.BindProperties[0].Value, 1, Time.deltaTime * 2); + var tearfulEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrTearful) > 0; + var tearfultype = tearfulEnable ? info.tearyType : 0; + StaticTearMorph.BindProperties.ForEach(p => p.Value = tearfultype); } - else + + if (ShadeMorph != null) { - ShadeMorph.BindProperties[0].Value = 0; + var shaderEnable = ((int)info.attribute & LiveTimelineKeyFacialEffectData.kAttrFaceShadowVisible) > 0; + if (shaderEnable) + { + ShadeMorph.BindProperties[0].Value = Mathf.MoveTowards(ShadeMorph.BindProperties[0].Value, 1, Time.deltaTime * 2); + } + else + { + ShadeMorph.BindProperties[0].Value = 0; + } } ChangeMorphEffect(); } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs index 7ac451c..0715388 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineControl.cs @@ -5,7 +5,6 @@ using UnityEngine; using static RootMotion.FinalIK.IKSolverVR; using System.Linq; using System.IO; -using static UnityEngine.Rendering.VirtualTexturing.Debugging; using static Gallop.Live.Cutt.LiveTimelineDefine; namespace Gallop.Live.Cutt @@ -355,7 +354,7 @@ namespace Gallop.Live.Cutt MulFrame.Add(mulframe); } - if (currentFrame % 2 == 0) RecordUma?.Invoke(); + if (currentFrame % 2 == 0) RecordUma?.Invoke(); //Set 30 FPS } } diff --git a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineMotionSequence.cs b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineMotionSequence.cs index e95c472..f7bc156 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineMotionSequence.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Cutt/LiveTimelineMotionSequence.cs @@ -72,7 +72,10 @@ namespace Gallop.Live.Cutt { foreach (var key in _currentKey.thisList) { - _tempAnim.AddClip(key.clip, key.clip.name); + if(key.clip != null) + { + _tempAnim.AddClip(key.clip, key.clip.name); + } } } _tempAnim.wrapMode = WrapMode.Clamp; @@ -122,13 +125,15 @@ namespace Gallop.Live.Cutt double interval = (currentTime - arg.FrameSecond) * arg.playSpeed; float currentAnimationTime = (float)(start + interval); - var state = _tempAnim[anim.name]; - state.enabled = true; - state.weight = 1; - state.time = arg.loop ? Mathf.Repeat(currentAnimationTime, state.length) : currentAnimationTime; - _tempAnim.Sample(); - state.enabled = false; - + if (anim) + { + var state = _tempAnim[anim.name]; + state.enabled = true; + state.weight = 1; + state.time = arg.loop ? Mathf.Repeat(currentAnimationTime, state.length) : currentAnimationTime; + _tempAnim.Sample(); + state.enabled = false; + } _prevIndex = _curIndex; } _prevFrameAnimationTime = currentTime; diff --git a/Assets/Scripts/umamusume/Gallop/Live/Director.cs b/Assets/Scripts/umamusume/Gallop/Live/Director.cs index 2a725e0..ddd1efe 100644 --- a/Assets/Scripts/umamusume/Gallop/Live/Director.cs +++ b/Assets/Scripts/umamusume/Gallop/Live/Director.cs @@ -376,7 +376,11 @@ namespace Gallop.Live if (_syncTime == false) { - if (liveMusic.sourceList[0].time > 0.01) + if(liveMusic.sourceList.Count == 0) + { + _syncTime = true; + } + else if (liveMusic.sourceList[0].time > 0.01) { _liveCurrentTime = liveMusic.sourceList[0].time; _syncTime = true; @@ -545,6 +549,44 @@ namespace Gallop.Live UnityCameraVMDRecorder.SaveLiveCameraVMD(live, ExitTime, frames); } + + public static List GetLiveAllVoiceEntry(int songid, List characters) + { + List entryList = new List (); + for (int i = 0; i < characters.Count; i++) + { + if (characters[i].CharaEntry.Name != "") + { + var charaid = characters[i].CharaEntry.Id; + + var entry = UmaViewerMain.Instance.AbSounds.FirstOrDefault(a => a.Name.Contains(string.Format(VOCAL_PATH, songid, charaid)) && a.Name.EndsWith("awb")); + if (entry == null) + { + List entries = new List(); + foreach (var random in UmaViewerMain.Instance.AbSounds.Where(a => (a.Name.Contains(string.Format(RANDOM_VOCAL_PATH, songid)) && a.Name.EndsWith("awb")))) + { + entries.Add(random); + } + if (entries.Count > 0) + { + entry = entries[UnityEngine.Random.Range(0, entries.Count - 1)]; + } + } + + if (entry != null) + { + entryList.Add(entry); + } + } + } + + var bgEntry = UmaViewerMain.Instance.AbSounds.FirstOrDefault(a => a.Name.Contains(string.Format(SONG_PATH, songid)) && a.Name.EndsWith("awb")); + if (bgEntry != null) + { + entryList.Add(bgEntry); + } + return entryList; + } } } \ No newline at end of file diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset index 84c4de9..03ff35f 100644 --- a/ProjectSettings/ProjectSettings.asset +++ b/ProjectSettings/ProjectSettings.asset @@ -3,7 +3,7 @@ --- !u!129 &1 PlayerSettings: m_ObjectHideFlags: 0 - serializedVersion: 23 + serializedVersion: 22 productGUID: 466286cbc59748b4ca46e7b05d5929c2 AndroidProfiler: 0 AndroidFilterTouchesWhenObscured: 0 @@ -67,7 +67,7 @@ PlayerSettings: androidStartInFullscreen: 1 androidRenderOutsideSafeArea: 1 androidUseSwappy: 0 - androidBlitType: 0 + androidBlitType: 2 androidResizableWindow: 0 androidDefaultWindowWidth: 1920 androidDefaultWindowHeight: 1080 @@ -86,7 +86,7 @@ PlayerSettings: submitAnalytics: 1 usePlayerLog: 1 bakeCollisionMeshes: 0 - forceSingleInstance: 0 + forceSingleInstance: 1 useFlipModelSwapchain: 1 resizableWindow: 1 useMacAppStoreValidation: 0 @@ -148,9 +148,8 @@ PlayerSettings: useHDRDisplay: 0 D3DHDRBitDepth: 0 m_ColorGamuts: 00000000 - targetPixelDensity: 392 + targetPixelDensity: 395 resolutionScalingMode: 1 - resetResolutionOnWindowResize: 0 androidSupportedAspectRatio: 1 androidMaxAspectRatio: 2.1 applicationIdentifier: @@ -248,8 +247,8 @@ PlayerSettings: AndroidTargetDevices: 0 AndroidSplashScreenScale: 0 androidSplashScreen: {fileID: 0} - AndroidKeystoreName: - AndroidKeyaliasName: + AndroidKeystoreName: D:/Work/UnityProject/long.keystore + AndroidKeyaliasName: 1605296300 AndroidBuildApkPerCpuArchitecture: 0 AndroidTVCompatibility: 0 AndroidIsGame: 1 @@ -419,8 +418,8 @@ PlayerSettings: m_GraphicsJobMode: 0 m_BuildTargetGraphicsAPIs: - m_BuildTarget: AndroidPlayer - m_APIs: 15000000 - m_Automatic: 1 + m_APIs: 0b000000 + m_Automatic: 0 - m_BuildTarget: iOSSupport m_APIs: 10000000 m_Automatic: 1 @@ -430,6 +429,9 @@ PlayerSettings: - m_BuildTarget: WebGLSupport m_APIs: 0b000000 m_Automatic: 1 + - m_BuildTarget: WindowsStandaloneSupport + m_APIs: 02000000 + m_Automatic: 1 m_BuildTargetVRSettings: - m_BuildTarget: Standalone m_Enabled: 0 @@ -594,11 +596,8 @@ PlayerSettings: switchNetworkInterfaceManagerInitializeEnabled: 1 switchPlayerConnectionEnabled: 1 switchUseNewStyleFilepaths: 0 - switchUseLegacyFmodPriorities: 1 switchUseMicroSleepForYield: 1 - switchEnableRamDiskSupport: 0 switchMicroSleepForYieldTime: 25 - switchRamDiskSpaceSize: 12 ps4NPAgeRating: 12 ps4NPTitleSecret: ps4NPTrophyPackPath: @@ -757,7 +756,6 @@ PlayerSettings: metroFTAName: metroFTAFileTypes: [] metroProtocolName: - vcxProjDefaultLanguage: XboxOneProductId: XboxOneUpdateKey: XboxOneSandboxId: @@ -801,7 +799,6 @@ PlayerSettings: m_VersionName: apiCompatibilityLevel: 6 activeInputHandler: 0 - windowsGamepadBackendHint: 0 cloudProjectId: framebufferDepthMemorylessMode: 0 qualitySettingsNames: [] diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index c37bfc3..fe0c37a 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -6,32 +6,32 @@ EditorUserSettings: serializedVersion: 4 m_ConfigSettings: RecentlyUsedScenePath-0: - value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7624cd1e2d154e0cfd090a0ee44b21021205b31b1ff6040a - flags: 0 - RecentlyUsedScenePath-1: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7624cd1e2d154e10f40c1a0ee24b2f0d170bfe1a1eed5e061fcc0cdc flags: 0 - RecentlyUsedScenePath-2: + RecentlyUsedScenePath-1: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c2133771312dfd1a471ef8021e12 flags: 0 - RecentlyUsedScenePath-3: + RecentlyUsedScenePath-2: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c21337712c3afe0f0c4bc51b020e0307fe0f1db1051d18d101 flags: 0 - RecentlyUsedScenePath-4: + RecentlyUsedScenePath-3: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23662d26f2f0312ccfe625fde22870031d27c2133771313ee01e000afa4b3a021f00f40016b1051d18d101 flags: 0 - RecentlyUsedScenePath-5: + RecentlyUsedScenePath-4: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7623e63144172a70d303044bc51c03051640e80018eb09 flags: 0 - RecentlyUsedScenePath-6: + RecentlyUsedScenePath-5: value: 224247031146466b011b0b2b1e30102219180c07233c2f3f23663b3aece13811c9a809cdc217100f7634dd152f71370ddb214943de021e4b230bfc0d05f61f1d588b0dcb13dc06 flags: 0 - RecentlyUsedScenePath-7: + RecentlyUsedScenePath-6: value: 22424703114646680e1c05320430102019041d651e3d282424241814ebfa3937adc22ee8ea2a33390a01ea3201701431fb1e10 flags: 0 - RecentlyUsedScenePath-8: + RecentlyUsedScenePath-7: value: 22424703114646680e0b0227036c731900122b292926237e38271427fb flags: 0 + RecentlyUsedScenePath-8: + value: 22424703114646680e0b0227036c6b150503563f22213229 + flags: 0 RecentlyUsedScenePath-9: value: 22424703114646680e0b0227036c691504041125227a68252320092a flags: 0