CLI Utilities
protocol-code-generator
This tool has built in help that you can access like this:
protocol-code-generator --help
If you want information about a special command, instead do:
protocol-code-generator --help generate
Flags | |
| The schema file (.schema) |
| Output file |
| Output directory (can only be used together with --split) |
| |
| |
|
When running the schema generator, it needs to know the location of the schema file and what kind of code it should generate.
It will emit the generated code to stdout
, so you have to pipe that to a text file in order to save it (for example using the >
operator). Here's an example of how it can look:
protocol-code-generator generate --code csharp --ecs unity --schema ./coherence.schema > ./generated/schema.cs
The emitted file should be placed somewhere inside your Unity project.
replication-server
The replication server also has general and specific help.
replication-server --help
replication-server --help serve
Flags | |
| The port to listen to |
| The port to listen for stats scrapers |
| Write network packets to capture files (.packets) |
| The server update frequency |
| The schema file (.schema) |
| Entity snapshot (.yaml) |
| Host address for parent replicator connection |
| If set, the binary_partitioner is used |
| Disconnect timeout (in milliseconds) |
| Use debug streams |
| Maximum number of entities allowed |
| Minimum distance for query change |
To start the server, you need to give it the location of the schema, like this:
replication-server serve --schema ../Assets/coherence/coherence.schema
In the example above we're running the server from the coherence-bin
directory right at the root of your project.
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), frequency
, ip
and port
number.
replication-server serve --min-query-distance 10 --port 32001 --frequency 320 --schema "C:\Users\tadej\Desktop\work\coherence\gamejam-stellar\Assets\Schemas\stellar.schema"
simulation-server
You can run coherence simulation server using
./sim_x86_64 --coherence-simulation-server
persistence-client
The persistence client has general and specific help.
persistence-client serve --help
persistence-client --help serve
Flags | |
| The name of the persistent save file |
| The folder where the save file is written |
| The frequency in which the save file is written, in seconds |
| The host:port to connect to |
| Write network packets to capture files (.packets) |
| The server update frequency |
| The schema file (.schema) |
| Disconnect timeout (in milliseconds) |
| Use debug streams |
| Position of the center of the entity query |
| Radius of entity query |
General flags
| Log level |
| Log output file |
| Enable/disable panic on error |
Last updated