{"record":{"id":"2ab0a08098148c0d","repo":"BabylonJS/Babylon.js","slug":"no-particle-systems-were-produced-by-the-node-part","errorCode":null,"errorMessage":"No particle systems were produced by the node particle system.","messagePattern":"No particle systems were produced by the node particle system\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/dev/inspector-v2/src/extensions/quickCreate/particles.tsx","lineNumber":76,"sourceCode":"                system.start();\n                resolve(system);\n            }, 0);\n        });\n    };\n\n    const handleCreateNodeAsync = async () => {\n        let nodeParticleSet;\n        const snippetId = nodeParticleSystemSnippetId.trim();\n        if (snippetId) {\n            nodeParticleSet = await NodeParticleSystemSet.ParseFromSnippetAsync(snippetId);\n            nodeParticleSet.name = nodeParticleSystemName;\n        } else {\n            nodeParticleSet = NodeParticleSystemSet.CreateDefault(nodeParticleSystemName);\n        }\n        const particleSystemSet = await nodeParticleSet.buildAsync(scene);\n        const systems = particleSystemSet.systems;\n        if (systems.length === 0) {\n            throw new Error(\"No particle systems were produced by the node particle system.\");\n        }\n        for (const system of systems) {\n            system.name = nodeParticleSystemName;\n        }\n        particleSystemSet.start();\n        return systems[0];\n    };\n\n    return (\n        <QuickCreateSection>\n            {/* CPU Particle System */}\n            <QuickCreateItem selectionService={selectionService} label=\"CPU Particle System\" onCreate={handleCreateCPUAsync}>\n                <TextInputPropertyLine label=\"Name\" value={cpuParticleSystemName} onChange={(value) => setCpuParticleSystemName(value)} />\n                <SpinButtonPropertyLine\n                    label=\"Capacity\"\n                    value={cpuParticleSystemCapacity}\n                    onChange={(value) => setCpuParticleSystemCapacity(value)}\n                    min={1}","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/inspector-v2/src/extensions/quickCreate/particles.tsx#L58-L94","documentation":"NodeParticleSystemSet.buildAsync(scene) compiles the node particle set into concrete particle systems. The library expects a successfully built set to yield at least one system; if the produced array is empty the build effectively yielded nothing usable, so the extension throws instead of returning an invalid/empty result. This guards downstream code that assumes systems[0] exists.","triggerScenarios":"Calling buildAsync on a NodeParticleSystemSet (including CreateDefault) that compiles to zero systems — e.g. a custom/loaded node graph with no emitter blocks wired to output, or a default set failing to expand on the current engine.","commonSituations":"Loading a serialized node particle set JSON that was hand-edited or exported from an incompatible Babylon version; building a programmatically constructed set before all required blocks were added; engine/scene not fully ready when buildAsync resolves; version mismatch between the node particle editor export and runtime library.","solutions":["Verify the node particle set graph has a complete, connected emitter/output chain before calling buildAsync.","Wait for scene.whenReadyAsync() and ensure the engine is initialized before building the set.","Re-export the node particle set with a matching Babylon.js version (node particle system API changed across versions).","Log particleSystemSet.systems length and the set's block graph to find why compilation produced no systems; fall back to NodeParticleSystemSet.CreateDefault to confirm the runtime itself works."],"exampleFix":"// before\nconst set = NodeParticleSystemSet.Parse(serializedJson, scene);\nconst particleSystemSet = await set.buildAsync(scene); // throws if 0 systems\n\n// after\nawait scene.whenReadyAsync();\nconst particleSystemSet = await set.buildAsync(scene);\nif (particleSystemSet.systems.length === 0) {\n  console.warn(\"Node particle set produced no systems; using default\");\n  const fallback = await NodeParticleSystemSet.CreateDefault(\"default\").buildAsync(scene);\n  fallback.start();\n}\nelse {\n  particleSystemSet.start();\n}","handlingStrategy":"validation","validationCode":"const particleSystemSet = await nodeParticleSet.buildAsync(scene);\nif (!particleSystemSet || particleSystemSet.systems.length === 0) {\n  throw new Error(\"Node particle set built zero systems\");\n}","typeGuard":"function hasSystems(set: { systems: unknown[] }): set is { systems: [unknown, ...unknown[]] } {\n  return Array.isArray(set?.systems) && set.systems.length > 0;\n}","tryCatchPattern":"try {\n  const systems = await buildNodeParticles(scene);\n  systems[0].name = name;\n} catch (e) {\n  if (e instanceof Error && e.message.includes(\"No particle systems\")) {\n    rebuildWithDefaultSet(scene);\n  } else {\n    throw e;\n  }\n}","preventionTips":["Validate the node graph has emitter/output blocks before buildAsync.","Call buildAsync after scene.whenReadyAsync().","Pin Babylon.js versions consistent with the node particle set exporter.","Assert systems.length > 0 in automated tests for particle assets."],"tags":["particles","node-material","babylonjs"],"backgroundTag":"empty-build-result","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}