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
- Tile Palette grid is moved after entering Play Mode
- Tile Palette Edit mode turns off in Play Mode
- The Editor crashes when Generating Font Atlas in the Font Asset Creator with “9999999999” padding and 256x256 Atlas Resolution
- [iOS] An “ArgumentNullException” error is thrown when GetIntroductoryPriceDictionary() method is called
- Font Import Settings documentation page is missing when the documentation button is pressed in the Inspector window
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.