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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
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.