CLI

Command-line interface tools explained

Found in <package-root>/.Runtime/<platform>/.

protocol-code-generator

General help flags

protocol-code-generator --help

Argument
Help

--log-level=LOG-LEVEL-STRING

Log level. Values: Trace, Debug, Info, Warning, Error, Panic

Output format of the log. Values: plain, json.

--log-file=LOG-FILE-STRING

Log output file

--panic-on-error

Enable/disable panic on error

Code Generation

protocol-code-generator --help generate

  -d, --schema=STRING                 The schema file (.schema).
  -o, --output=STRING                 Output file.
      --output-dir=STRING             Output directory (can only be used together with --split).
  -c, --code=STRING                   Which language to generate code for.
  -e, --ecs=STRING                    Which flavour of ECS to generate code for.
      --split                         Split into files.
      --debugoutput                   Insert debug output in generated code.
      --sync=STRING                   Path to Unity generated JSON file for creating the generated.schema file.
      --emit-empty                    Emit empty baked scripts. Useful to avoid possible compile errors.
      --namespace-suffix=STRING       Namespace suffix to use for generated code.

Replication Server

replication-server --help serve

To start the Server, you need to give it the location of the schema.

You can copy the CLI commands to start the replication server form coherence Hub > Servers tab_._

__

You can also define other parameters like min-query-distance (the minimum distance the LiveQuery needs to move for the Replicator to recognize a change), send and receive frequency, ip and port number.

Minimal parameters set is presented in the example below:

replication-server serve --port 32001 --signalling-port 32002 --send-frequency 20 --recv-frequency 60 --web-support --env dev --schema "/Users/coherence/unity/Coherence.Toolkit/Toolkit.schema,/Users/coherence/MyProject/Library/coherence/Gathered.schema"

replication-server --help listen

Persistence Client

persistence-client --help serve

Last updated

Was this helpful?