Hello,
We are porting our existing game to MS Store (PC only).
We are using Microsoft GDK Package (https://discussions.unity.com/t/unity-and-microsoft-announce-the-microsoft-gdk-packages-for-unity-for-unity-2021-and-2022-lts/).
Windows computer,
Unity 2021.3.14f1
Windows SDK 10.0.22621.3233 (10.1.22621.3233 written below)
Windows SDK 10.0.26100.1 (10.1.26100.1 written below)
- We are trying to build with “Create Microsoft Store Package” set to true, and build fails with error:
BuildFailedException: FAILED - 'makepkg.exe pack ...' (3):
Stderr:
StoreLogo was not found: C:\Users\cguser17\Downloads\proj_build_dir\StoreLogo.png.
Square150x150Logo was not found: C:\Users\cguser17\Downloads\proj_build_dir\Square150x150Logo.png.
Square44x44Logo was not found: C:\Users\cguser17\Downloads\proj_build_dir\Square44x44Logo.png.
SplashScreenImage was not found: C:\Users\cguser17\Downloads\proj_build_dir\SplashScreenImage.png.
Square480x480Logo was not found: C:\Users\cguser17\Downloads\proj_build_dir\Logo480.png.
Missing logo file - Error Code: 0x80070002
We see that correct icons are generated in Assets/ folder of our Unity project.
But they are not copied to proj_build_dir (build dir) during build.
We made a temporary fix by copying icons in post-process to built project dir.
Then a next error arised during build:
Failed to get string resources from a resources.pri file for this package
Please make sure that your resources.pri contains references to string resources and is located in the same directory as your appxmanifest.xml or MicrosoftGame.config.
Strings expected to have a localized version: ms-resource:PackageTitle, ms-resource:PackageDescription, ms-resource:PackageTitle, ms-resource:PackageDescription
We fixed it also by copying resources.pri to built project dir.
Do we need to copy generated icons and resources.pri to build dir manually in our own postprocess?
Or this is a bug in com.unity.microsoft.gdk.tools and icons should be copied by package code?
- Also looks like there are an issue with
com.unity.microsoft.gdk.tools/Editor/GdkPostBuild.cs
It has a callbackOrder = 0, and executed before other post-processes in project.
So we couldn’t execute our own post-process to copy icons and resources.pri before GdkPostBuild.
To allow our own post-process to copy icons and resources.pri to built project dir before GdkPostBuild does it job we added com.unity.microsoft.gdk.tools as embedded package and changed callback order of GdkPostBuild to 2000 in source code.
This way GdkPostBuild executing after our post-process.
This is an inconvenient solution that is difficult to maintain because the plugin becomes difficult to update.
Can you please increase callbackOrder to some high value in package code?
Should we report a bug on this on Unity’s issuetracker?