Search Issue Tracker

Fixed

Fixed in 2021.3.28f1, 2022.3.3f1, 2023.1.1f1, 2023.2.0a18

Votes

9

Found in

2020.3.46f1

2021.3.21f1

2022.2.9f1

2023.1.0b9

2023.2.0a6

2024.1.0a1

Issue ID

UUM-30952

Regression

No

BuildPipeline.BuildPlayer ignores BuildPlayerOptions.locationPathName and attempts to build to the cached folder

--

-

Reproduction steps:
1. Open the “BuildPlayerCache” project, and open the “Scene1" scene
2. File → Build StandaloneWindows
3. File → Build And Run, and select “Player1” as the folder
4. Close the Player, and delete the “Player1" folder
5. File → Build StandaloneWindows, and observe the Console

Expected result: “Player2” build succeeded
Actual result: “Player2” build failed because “Player1” does not exist

Reproduced in: 2020.3.46f1, 2021.3.21f1, 2022.2.9f1, 2023.1.0b9, 2023.2.0a6

Reproduced using: Windows 10
Not reproduced using: macOS 13.2.1 (Intel)

Full error:
DirectoryNotFoundException: The path D:/BuildPlayerCache/Player1 does not exist.
NiceIO.NPath+WindowsFileSystem.Directory_GetFiles (NiceIO.NPath path, System.String filter, System.IO.SearchOption searchOptions) (at <5894d11b90944d1ebef5d2c59e539009>:0)
NiceIO.NPath.Files (System.String filter, System.Boolean recurse) (at <5894d11b90944d1ebef5d2c59e539009>:0)
NiceIO.NPath.Contents (System.String filter, System.Boolean recurse) (at <5894d11b90944d1ebef5d2c59e539009>:0)
NiceIO.NPath.Contents (System.Boolean recurse) (at <5894d11b90944d1ebef5d2c59e539009>:0)
UnityEditor.WindowsStandalone.WinPlayerPostProcessor.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTarget target) (at C:/build/output/unity/unity/PlatformDependent/WinPlayer/Extensions/Managed/WinPlayerPostProcessor.cs:57)
UnityEditor.PostprocessBuildPlayer.PrepareForBuild (UnityEditor.BuildOptions options, UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target) (at <5894d11b90944d1ebef5d2c59e539009>:0)
UnityEditor.BuildPipeline:BuildPlayer(BuildPlayerOptions)
Builder:BuildWindows() (at Assets/Editor/Builder.cs:16)

  1. Resolution Note (fix version 2023.2.0a18):

    Build Pipeline: Fixes edge case where using the BuildPipeline.BuildPlayer APIs on Windows can fail, when a previously used build folder has been deleted.

  2. Resolution Note (fix version 2023.1.1f1):

    Fixed in 2023.1.1f1 the edge case where using the BuildPipeline.BuildPlayer APIs on Windows can fail when a previously used build folder has been deleted

  3. Resolution Note (fix version 2022.3.3f1):

    Fixed edge case where using the BuildPipeline.BuildPlayer APIs on Windows can fail, when a previously used build folder has been deleted.

  4. Resolution Note (fix version 2021.3.28f1):

    Fixes edge case where using the BuildPipeline.BuildPlayer APIs on Windows can fail, when a previously used build folder has been deleted.

Comments (6)

  1. pointcache

    Jun 18, 2023 21:28

    I mean 2020.3.48

  2. pointcache

    Jun 18, 2023 20:37

    This is insane. Why is this present in the 2022.3.48f?

  3. cmdexecutor

    Jun 14, 2023 05:11

    can't believe this is still on LTS versions. The entire build process seems to be outstandingly bugged on LTS versions.

  4. ZoopTEK

    Jun 07, 2023 04:58

    This broke our build pipeline, and now requires a silly jank fix. Sorry, but this is quite disappointing.

  5. ted05051997

    Apr 27, 2023 05:08

    Come on man, can't even build to the correct folder.

  6. Sabrino

    Apr 13, 2023 06:10

    Come on man, suddenly I can't even build to the correct folder.

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.