Open LocalJoost opened 2 years ago
Hello,
Thanks for this tip! May I ask what version of Visual Studio you tested this on ? I'm struggling to get this working on VS 2022. As such the app builds, but no app launcher.. I do see the glb model is placed into my project/Assets/AppLauncherModel.glb after the Unity build, and this glb file is indeed the one I placed in MRTK3 > Build Settings:
But yeah, no launcher (and no icon, as well) on my Hololens2.
I also see here that the glb asset must be marked as "Content". The picture show in that article is slightly outdated since I have the following:
If I select anything else than "Does not participate in build" for the Item Type, then I end up with a build error, complaining about
error MSB4066: The attribute "xmlns" in element
is unrecognized.
I think I can remove that xmlns reference for VS 2017 and above (as mentioned here, but then I end up with the build error
Assets\AppLauncherModel.glb : fatal error LNK1107: invalid or corrupt file: cannot read at 0x9218
And well, beyond that is out of reach with my modest capabilities.. 😄
Any idea ? Thanks a lot! Arnaud
@ArnaudBBRI what version of Unity do you use? Also - be aware that there are severe limitations as to what GLB files you can use. They can only be like 10000 triangles. I would suggest trying to use a model that we know works - like the MRTK model in my article. For the rest, have a look at this
I use Unity 2021.3.23f1 My 3D model was created with Blender, no more than ~500 triangles, and simple color materials (2 materials). I'll try with the MRTK 3D logo, but where did you find it exactly ? Is it in the MixedRealityToolkit-Unity github ?
Also note, I had to use the Unity glTFast package in order to import the .glb in my project and it being accepted by the MRTK3 Build Settings in Unity.
Thanks!
@ArnaudBBRI Yes, I found it in here. https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/blob/main/org.mixedrealitytoolkit.extendedassets/Models/MRTK_Logo.glb. If you have installed the extended assets package it's already in your app
Ok, tested it. No more luck with this MRTK logo. I also tried to set the "Excluded from build" setting (that I didn't notice previously, so it was left empty) to "No"
Which modifies the vcxproj file like this:
...but it doesn't help either. The only thing I was thinking of is that in here they mark the File Type as Document, which is an option that no longer exists (at least in my VS 2022):
But I digged further, and in fact I do have a compiled scene from the MRTK samples, on the same Unity version, same VS version, and for which Item Type is "Do not participate in build", and in that case it works.
I compared both appxmanifests, the only noticeable difference between the working project (MRTK sample) and the non-working project (mine) was the supported rotations (only landscape for the MRTK sample, multiple for mine). I changed that, didn't help. Also compared the vcxproject files, nothing to be seen there either.
Original article: https://localjoost.github.io/Make-a-3D-HoloLens-app-launcher-appear-above-the-launcher-controls/