Search Issue Tracker
By Design
Votes
2
Found in
5.5.2f1
Issue ID
895546
Regression
No
MonoDevelop is not finding references when define symbols used
Repro steps:
1. Open attached project.
2. Open Target.cs script with MonoDevelop
3. Make sure only Target.cs tab is open
4. Press "Find References" on Test method
Expected result: 4 references found.
Actual result: No references found.
Reproduced on :
5.2.4f1 , 5.6.0f1 , 2017.1.0a3.
MonoDevelop versions: 4.0.1 , 5.9.6.
By design because:
"It is not finding a reference from any code that is not being compiled and it is treating #ifdef code as non-existing."
Notes:
Referencing code has to be in #if UNITY_EDITOR or another unity defined statement to reproduce this issue.
When scripts are open in MonoDevelop editor - references are found correctly in those scripts.
Visual Studio finds references as expected.
Comments (1)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
ZuuksDev1
Apr 28, 2017 07:16
no it is an actual bug!
when using define symbols (!)inversed status it is working reverse way.
1. Add "!CustomDefine" from player settings (notice ! sign)
2. Use "#if !CustomDefine" from scripts (it is true in this case)
3. Close defined script
4. Find references from target function
Result: References finding is successful.