Sites

Menu
These are the docs for 12.0, an old version of SpatialOS. The docs for this version are frozen: we do not correct, update or republish them. 14.5 is the newest →

spatial process_schema generate

Generates code and output for one of the target languages.

Synopsis

Generates worker-specific code from the schema.

Use the ‘–language’ flag to generate code for a specific language.

The input directory is searched for .schema files, which should define a (possibly partial) entity component schema in the SpatialOS schema language.

The .schema files are compiled via an intermediate protobuf representation to produce API code that can be used by workers and behaviours to create, read and write the state of entities in a SpatialOS simulation.

For more information on defining schemas, see the SpatialOS documentation.

spatial process_schema generate

Options

      --cachePath string     Path to store intermediate data in. (default ".spatialos/schema_codegen_cache")
  -d, --dependency value     Library directory containing .schema files. Like --input, but no code is generated for these files. Can be specified multiple times. (default [])
      --force                Regenerate all code, even if sources haven't changed.
  -i, --input value          Input directory containing .schema files. Can be specified multiple times. (default [])
  -L, --language string      Language to generate code for. Supported values are (ast_proto,ast_json,cpp,cpp_dynamic,csharp,java,scala,javascript,typescript). To generate code for different languages into different locations, run the command multiple times. The language flag is required.
  -o, --output string        Output directory for generated code. The directory will be fully cleaned before code generation.
      --protoc_path string   Path to override the 'protoc' command.
  -R, --repository value     Repository directory containing subdirectories with schema dependencies. Equivalent to adding --dependency for each immediate subdirectory of the specified repository directory. Can be specified multiple times. (default [])

SEE ALSO

Search results

Was this page helpful?

Thanks for letting us know!

Thanks for your feedback

Need more help? Ask on the forums