Iâm currently facing the issue of my (production) build not going through. The assets do not get compressed, the rest seems to work though. As a workaround I currently have to export (not publish!) from the export component again which gets the assets compressed. Then i copy the assets/* into dist/assets/
Looking at the build.log, thereâs this warning (ending with âabortingâ) and âBuild pipeline task did not succeedâ right afterwards which is is a bit suspicious.
WARN: [needle-buildpipeline] Output directory not found/created at âS:\xxxx\myproject-web\dist/assetsâ - abortingâŠ
[needle-buildpipeline] - Build pipeline task did not succeed.
Using Unity 2022.3.62f2 and NE 4.10.4-beta (but the problem exists for at least some versions <=4.9).
Edit: Clarified the second export is from the export component. Added versions in use.
It looks like the build pipeline isnât finding or creating the expected assets output folder (dist/assets), which stops the asset compression step from running. In many projects this stems from configuration issues or file system permission problems.
Here are a few steps you can try:
âą Verify your Needle Engine configuration (usually in needle.config.json). For example, a common setup is to have âbuildDirectoryâ set to âdistâ and âassetsDirectoryâ set to âassetsâ (as shown in our sample config at nextjs-sampleâneedle.config.json.md and (docs/needle-config-json.html)). This means your build expects the assets to end up in dist/assets. Double-check that these paths match your project structure.
âą Ensure that during the build process your system has the necessary permissions to write and create directories in your target location. On Windows (your S:\ drive), a permissions issue could prevent automatic directory creation.
âą Try cleaning your build output (delete the dist folder) and run a fresh build. Sometimes a stale or corrupted build directory can cause unexpected issues.
âą If you still face this issue, consider manually creating the dist/assets folder as a temporary workaround or check if your build options (such as using production build with asset compression) require additional tools (e.g., toktx for texture compression).
If none of these help, it might be worth sharing more details (such as the full project configuration via âCopy Project Info Into Clipboardâ in Unity) so we can investigate further. Feel free to follow up with additional log details or settings!
Hope this helps.
1 replies left - Become PRO for more replies. thread_EPWfWdOnhR0LrS7tJtUHgxGN Reply to this post directly if you need further help (bottom right button)
Iâve tried the same with 4.11.0 (and weeks ago multiple <=4.9 versions) all with the same outcome.
Hereâs the 4.11.0 build log, I saw a few more (hopefully relevant) lines:
[needle-buildpipeline] Waiting for output directory to be created⊠(S:\xxxx\myproject-web\dist/assets)
[âŠ]
[needle-buildpipeline] Max wait time exceeded - abortingâŠ
WARN: [needle-buildpipeline] Output directory not found/created at âS:\xxxx\myproject-web\dist/assetsâ - abortingâŠ
[needle-buildpipeline] - Build pipeline task did not succeed.
Look at that: It really is a timing problem, the log is not lying. The html/css transformation of the rest of the project takes a while (maybe 30s).
I blindly added some zeros in build-pipeline.js:
const maxEndTime = startWaitTime + 120_000;
/** wait until the output directory exists
* @param {number} iteration
* @returns {Promise<boolean>}
*/
function waitForOutputDirectory(iteration) {
function increaseMaxWaitTime(debugLog) {
maxOutputDirectoryCreatedWaitTime = Date.now();
let maxWaitTime = 10_00000;
if (process.env.CI) {
maxWaitTime += 50_00000;
}
maxOutputDirectoryCreatedWaitTime += maxWaitTime;
if (debugLog) {
log(`Increased max wait time by ${maxWaitTime / 1000}sec until ${new Date(maxOutputDirectoryCreatedWaitTime).toISOString()}`);
}
}
There are a few images and fonts but also lots (and LOTS) of legacy css which first is mostly purged. The setup could be nicer but it will have to do for now.