Improbable Icon

SpatialOS Forums

Failed to generate code from schema. Unity

Followed all the instructions in the getting started FPS project and opening it causes the "Failed to generate code from schema error. Console has about 30 errors with missing .schema “Input file does not exist or is not accessible”. Then also type or namespace errors for Vector3Extensions.cs

Half the options in the SpatialOS menu are missing.

spatial setup install-dependencies installs Microsoft Visual C Redstributable. It succeeds. I restart, do diagnose and it says there is no Microsoft Visual C++ redistributable installed.

Unity 2019.1.3

Any help for getting it work? Spent a few hours trying to get it working with no luck. Not a pleasant introduction.

Hi @Mitch,

Would you be able to run spatial diagnose --log_level=debug > diagnose.log and send me the output along with your Unity Editor log?

(feel free to directly message these to me if you want to avoid posting them here)

Hi @Mitch ,

Thank you for sending over those log files.

With regards to the Microsoft Visual C++ Redstributable, it looks like you have versions 11.0.61030, 12.0.30501 & 12.0.40660 installed but the minimum version required is 14.
This version of the redstributable is shipped with Visual Studio 2017, which is the recommended IDE for the GDK, but our docs could definitely be improved here to highlight the requirement.
I’ll raise this internally to get the docs ammended, in the meantime, would you be able to install Visual Studio 2017?

It appears that no Microsoft Visual C++ (MSVC) Redistributable is installed. This does not account for installed Redistributables with a major version number other than 14.

The code generation failure is unfortunatley a known issue on our side due to a path escaping bug.
The good news though is that a fix is already written and included in version 0.2.4 which we’re expecting to make available later today.

Hopefully those will fix your builds, but please let me know if you encounter any other issues.


I do already have C++ 14 and Visual Studio 2017. Not sure why it shows I don’t.

I moved the project folder to one without spaces and all errors went away. Was a smooth and pleasant experience setting it up.

Thank you for your quick help!

Hi @Mitch, I’m glad that was able to fix it for you and I’m sorry again for the inconvenience!

I’ll also let the appropriate team know about the redistributable issue so that they can look into it, but hopefully it shouldn’t block you from continuing with SpatialOS.

1 Like