Closed Maesla closed 9 months ago
We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visithttps://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!
Describe the bug
DEVEMOPMENT_BUILD is set in buildinfo but not used in the compilation
To reproduce
Create any code inside the bock
If DEVELOPMENT_BUILD
Debug.Log("Hello world"); //any functionality
endif
Steps to reproduce the behavior:
Expected behavior
I expect to see the effect of the code inside the block
Screenshots
If applicable, add screenshots to help explain your problem.
Your setup (please complete the following information)
Target platform (please complete the following information)
Additional context
I am trying to add some development code inside
If DEVELOPMENT_BUILD
endif
I've seen that MRTK uses it's own buildpipelne, so EditorUserBuildSettings.development is not used in this custom buildpipeline.
The main class is this UnityPlayerBuildTools https://github.com/microsoft/MixedRealityToolkit-Unity/blob/main/Assets/MRTK/Core/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs
In this class, you define different symbols and settings.
Regarding DEVELOPMENT_BUILD, you have two blocks that might affect the symbol
This first one works perfectly. If the buildconfiguration is selected as "debug", DEVELOPMENT_BUILD is defined
The second block is the following:
So, if the build configuration is "release", you inject manually "DEVELOPMENT_BUILD"
But when I create the project on "release", actually "DEVELOPMENT_BUILD" is not defined.
My guessing is that _buildInfo.AppendSymbols("DEVELOPMENTBUILD"); is done on line 76, but PlayerSettings.SetScriptingDefineSymbolsForGroup(buildTargetGroup, buildInfo.BuildSymbols) is done before, in line 57
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/476b77438442c4aff25d3a569d3c9fe90c0c6ce9/Assets/MRTK/Core/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs#L76
https://github.com/microsoft/MixedRealityToolkit-Unity/blob/476b77438442c4aff25d3a569d3c9fe90c0c6ce9/Assets/MRTK/Core/Utilities/BuildAndDeploy/UnityPlayerBuildTools.cs#L57
UnityPlayerBuildTools has changed in 2.8.2 and 3.0 but I don't see any major differences regarding this
So my questions are:
Thank you