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

Deployment Management

-

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)

  1. 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.

  2. 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);

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.