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.
Comments (2)
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Package signature validation unexpectedly return an invalid signature status if the validation check is done after the code signing certificate validaty range has passed
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
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);