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
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)
Comments (7)
-
StinkySteak
May 08, 2024 02:51
Is there some workaround at the moment rather than upgrading my unity? Im on unity 2021.3.21. I dont want my packages to be updated...
-
pointcache
Jun 18, 2023 21:28
I mean 2020.3.48
-
pointcache
Jun 18, 2023 20:37
This is insane. Why is this present in the 2022.3.48f?
-
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.
-
ZoopTEK
Jun 07, 2023 04:58
This broke our build pipeline, and now requires a silly jank fix. Sorry, but this is quite disappointing.
-
ted05051997
Apr 27, 2023 05:08
Come on man, can't even build to the correct folder.
-
Sabrino
Apr 13, 2023 06:10
Come on man, suddenly I can't even build to the correct folder.
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
- GfxDevice::UpdateBufferRanges when running UIBuilder tests
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
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.
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
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.
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.