Search Issue Tracker
Fixed in 5.5.0
Votes
0
Found in
3.0.0b5
Issue ID
369773
Regression
No
Unity uses absolute paths and not relative paths for storing build directory
To Reproduce:
1) Create a test project
2) Build the project in a subfolder of the project.
3) Now close that project, quit Unity
4) Clone the project folder.
5) Open and build again. The folder for the previous project is presented, not the current one.
Expected:
1. To use a path relative to the project folder when building.
2. If the path is not available, it should show open on the project folder by default.
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
- [Happy Harvest] #ThunderLabel text is "\u26C8" instead of "⛈"
- Warning “New Sprite Atlas: There is a mismatch in secondary textures of sprites compared to WhiteUnit, wasting texture space and potentially break draw call batching. Affected Sprites are (Flag)“ is thrown when packing Atlas with Sprite Atlas V2
- Sprite Editor dropdown text is cut-off for options with longer text
- Sprite Editor can't be scrolled horizontally using the trackpad gesture
- BRG picking skips BatchDrawCommandProcedural when selecting the GameObject in the scene
monroe-e
Sep 13, 2016 23:43
@tessellation - I also have observed that this bug fix caused the issue you're referencing. The XCProject class assumes that it's receiving a full path, but now it might not. The core of the issue is that the OnPostProcessBuild method's path will be sent as a relative path (the second argument) if the build directory is underneath the project's top level directory, whereas before it was sent as a full path all the time. You can fix it like you did there, or fix it in the OnPostProcessBuild that creates the XCProject by modifying the path to be a full path.
tessellation
Aug 31, 2016 07:41
I believe this change broke the BuildPostProcess step in the UnityAds code that is currently in the Asset Store. My fix was to modify Line 68 of Standard Assets/Editor/UnityAds/XCodeEditor/XCProject.cs to be the following code:
if (Path.IsPathRooted(filePath))
this.projectRootPath = filePath;
else
this.projectRootPath = Path.GetFullPath(filePath);