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
- After converting a Built-in project to URP render texture related errors are spammed that can lead to Game view being rendered on top of Scene view
- UI Builder slider value lags and stutters when sliding/modifying certain property values
- "Reset UI Builder Layout" functionality inconsistently changes Canva Size when "Match Game View" is enabled/disabled
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
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.