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
- Fixing Message Loss in UMPE During Domain Reload
- The Editor freezes when ScheduleReadOnly of IJobParallelForTransform with dependency is used
- Text is truncated in the Inspector when the display scale is set to 150%
- CancellationTokenSource(<timeout>) has incorrect cancellation status when used in WebGL Player
- VFX property value names are cut off when properties with 'Arc' are viewed in the VFX Blackboard
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.