Web Build issue (with C++ script)

Flax Engine 1…12
Following the steps on the C++ Scripting webpage with a New Project.
Attaching C++ script works fine in Editor, the Log message is displayed. However, when trying to create a Web Build, the error message below shows up.
On the other hand, Web Build works fine for a New Project with C# scripts (no errors displayed).


[ 00:04:56.132 ]: [Info] Stack trace:
[ 00:04:56.132 ]: [Error] Exception: Could not find a part of the path 'C:\Program Files (x86)\Flax\Flax_1.12\Source\Platforms\Web\Binaries\Data\check_browser_version.js'.
[ 00:04:56.138 ]: [Info]    at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.ReadAllText(String path, Encoding encoding)
   at Flax.Build.Platforms.WebToolchain.CreateBinary(TaskGraph graph, BuildOptions options, String outputFilePath) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Platforms\Web\WebToolchain.cs:line 370
   at Flax.Build.Platforms.WebToolchain.LinkFiles(TaskGraph graph, BuildOptions options, String outputFilePath) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Platforms\Web\WebToolchain.cs:line 471
   at Flax.Build.Builder.LinkNativeBinary(BuildData buildData, BuildOptions buildOptions, String outputPath) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\NativeCpp\Builder.NativeCpp.cs:line 369
   at Flax.Build.Builder.BuildModuleInner(BuildData buildData, Module module, BuildOptions moduleOptions, Boolean withApi) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\NativeCpp\Builder.NativeCpp.cs:line 552
   at Flax.Build.Builder.BuildModule(BuildData buildData, Module module) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\NativeCpp\Builder.NativeCpp.cs:line 418
   at Flax.Build.Builder.BuildTargetNativeCpp(RulesAssembly rules, TaskGraph graph, Target target, Dictionary`2 buildContext, Toolchain toolchain, TargetConfiguration configuration, Boolean isBuildingReference, Boolean skipBuild) in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\NativeCpp\Builder.NativeCpp.cs:line 942
   at Flax.Build.Builder.BuildTargets() in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Build\Builder.cs:line 372
   at Flax.Build.Program.Main() in C:\Flax\FlaxEngine\Source\Tools\Flax.Build\Program.cs:line 157
[ 00:04:56.140 ]: [Info] Total time: 00:00:01.9360365
[ 00:04:56.169 ]: [Error] Failed to run build tool, result: 1

Thanks for reporting this! I’ll look into it

New package should fix it. Uninstall Web from Launcher and install it again so it will work fine.

Thanks for the fix! It’s a great sample project for both Web Build and also as a C++ project. :+1: