diff --git a/Source/Engine/GraphicsDevice/WebGPU/GraphicsDeviceWebGPU.Build.cs b/Source/Engine/GraphicsDevice/WebGPU/GraphicsDeviceWebGPU.Build.cs index 0a56770a4..59c241664 100644 --- a/Source/Engine/GraphicsDevice/WebGPU/GraphicsDeviceWebGPU.Build.cs +++ b/Source/Engine/GraphicsDevice/WebGPU/GraphicsDeviceWebGPU.Build.cs @@ -1,5 +1,6 @@ // Copyright (c) Wojciech Figat. All rights reserved. +using System; using System.IO; using Flax.Build.NativeCpp; using Flax.Build.Platforms; @@ -23,6 +24,9 @@ public class GraphicsDeviceWebGPU : GraphicsDeviceBaseModule { base.Setup(options); + if (!EmscriptenSdk.Instance.IsValid) + throw new Exception("Cannot build WebGPU for Web without Emscripten SDK. Check environment variable 'EMSDK'."); + var port = "--use-port=emdawnwebgpu:cpp_bindings=false"; options.OutputFiles.Add(port); options.CompileEnv.CustomArgs.Add(port);