Hello everyone.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Options
Grey syntax color issue in `#if !UNITY_EDITOR ~ #endif` in VS 2015.
Hi,
Every code between #if !UNITY_EDITOR && UNITY_METRO
and #endif
becomes grey in VS 2015 Update 3. How do I bring the color back? They are colored in VS CODE but not in VS(Visual Studio).
Update
Is this true that this logic is by its product design? Read this
0
Best Answer
-
Optionstrzy ✭✭✭The macro UNITY_EDITOR is defined, indicating the project is being built to run inside the Unity editor. Hence, the code here is inactive and the IDE helpfully points that out by making it gray.
The code will be active when you build an app project (for deployment on the actual device). What you can probably do is build the project as if for deployment, then open up that solution file (rather than the solution you are using now). It will still point at the same source files, so you can edit them using that solution. I think this should then show the code as active.Bart
http://trzy.org5
Answers
did you open this code through Unity?
@Xarthisius: Yes. I opened the code by clicking the
.sln
which is created by Unity.The code will be active when you build an app project (for deployment on the actual device). What you can probably do is build the project as if for deployment, then open up that solution file (rather than the solution you are using now). It will still point at the same source files, so you can edit them using that solution. I think this should then show the code as active.
Bart
http://trzy.org
When you build a standalone project for deployment, the macro is no longer defined and the compiler will see the code, and the IDE will be aware of that.
Bart
http://trzy.org
What you are actually seeing the the PDC (Platform Dependent Compilation) macro. I believe it is "as designed" and there are some cases where if the conditions is not met, it will not un-grey.
You can check the Unity docs on PDC here > https://docs.unity3d.com/Manual/PlatformDependentCompilation.html
@trzy, @MattFedoCSG : Thank you for your replies.
I understand why they are grey. I want the syntax color back so I can easily code.
It's not only the color that's bothering. You can't jump to definition of properties and methods either.
Bart
http://trzy.org
@trzy & @MattFedoCSG: Thank you for your answers and apologies for the late reply. Your solutions worked for me