Search Issue Tracker
By Design
Votes
0
Found in
2019.4
2019.4.22f1
2020.3
2021.1
2021.2
Issue ID
1322579
Regression
No
[OSX] Symbol definitions are not detected (greyed out) in code editor when a Script is inside an UPM package installed via git
How to reproduce:
1. Open the attached project
2. In the Project Window, navigate to Packages->Example Package->Scripts
3. Open the "ExampleUsage.cs" Script in a code editor
4. In the code editor, inspect the branching of the symbol define
Expected result: Unity symbol definitions are detected and the active code is highlighted
Actual result: Unity symbol definitions are not detected and the active code is greyed out
Reproducible with: 2019.4.24f1, 2020.3.3f1, 2021.1.2f1, 2021.2.0a12
Couldn't test with: 2018.4.33f1 (Assemblies throw errors)
Tested with:
- Rider (2020.3.2, Build #RD-203.6682.21)
- Visual Studio (8.6.5)
Note: The code is executed correctly but the defines are shown incorrectly
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
- Audio Mixer does not change volume when lowering volume on an Audio Mixer loaded from AssetBundles
- Error “Value cannot be null. Parameter name: key UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)” thrown and Addressables build fails when "Include in Build" is disabled and using Addressables For Android package
- “error CS0433: The type 'CodeBinaryOperatorType' exists in both 'System.CodeDom and 'System" compilation errors are thrown when opening a specific project
- Metal Vertex Shader warning is being thrown when creating a VR Template Project
- Asset database warning is thrown when declaring font variable in the USS text file
Resolution Note:
This is actually by design: by default git packages don't have their project generation turned on, and so the code editor does not know which defines are enabled.
This can be changed in editor preferences: In editor preferences, check "git packages" in "generate .csproj file for" and regenerate projects. This fixes the issue.