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
- ScrollView speed is slower when entering Play mode
- UI Builder elements disappear and "Semantic - Unknown template name" error appears when changes to "Template" parameter are saved
- Renderers outside Light Probe hull use incorrect Ambient Probe values when "Renderer Light Probe Selection" is set to "Use Ambient Probe" and "Light Probes" on Mesh is set to "Blend Probes"
- ArgumentNullException error occurs when selecting a Camera in the Hierarchy with the Scene view open
- Clicking 'Open Editor Log' through the Console fails to open redirected Logs when relative Log files exist outside of the Project root
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);