Search Issue Tracker
Third Party Issue
Votes
0
Found in
2019.4
2020.3
2021.1
2021.2
2022.1
2022.1.0a11
Issue ID
1370747
Regression
No
Local Package project files are generated incorrectly when the Package is added by relative file path
How to reproduce:
1. Open the project in the attached folder (RelativePackageTest.zip)
2. In the Project view, go to Packages/Graphics Tests Framework/Runtime and open "GraphicsTestCase.cs"
3. Add the #define directive line "#if UNITY_EDITOR" as the first line of the script and save
4. In the Project view, go to the Assets folder and open "ScriptOutsidePackage.cs"
5. Add the #define directive line "#if UNITY_EDITOR" as the first line of the script and save
6. Go to the Editor and observe the Console
Expected result: the #define directive is available for both scripts, two "#endif directive expected" errors are thrown for both of the scripts
Actual result: the #define directive is not available for the script in the Package, only one "error CS1027: #endif directive expected" is thrown for ScriptOutsidePackage.cs
Reproducible with: 2019.4.31f1, 2020.3.20f1, 2021.1.25f1, 2021.2.0b16, 2022.1.0a12
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
- Crash on AudioMixer::GetFMODChannelGroup when entering Play Mode in a specific project
- Prefabs with "Flags" enum properties result in "IndexOutOfRangeException" when trying to commit/revert
- The Camera first person mode in Cameras overlay is greyed out and not clickable when the Editor is restarted with the Game View focused
- Scene View doesn't select the Canvas when it's clicked with the View Tool
- Transform fields are impossible to edit when Inspector window is resized
Resolution Note:
The issue comes from Player projects being generated and the user has to pick up the right context in rider to show the code as if compiled for editor.