The following instructions cover Windows and macOS operating systems unless otherwise stated.
The Locator is a SpatialOS service that you use to connect your client-worker instances to cloud deployments using authentication.
Use the Locator connection workflow in the following cases:
- To connect client-worker instances to cloud deployments using Launcher-provided identity tokens. This scenario is Windows-only.
- To connect client-worker instances to cloud deployments using custom authentication.
- You can’t use the Launcher on Linux.
The Launcher is a built-in, point-and-click, desktop-only authentication service for connecting client-worker instances to cloud deployments. When you use the Launcher to launch a client-worker instance from the Console, the Launcher creates a login token so the client-worker instance can connect to the running cloud deployment by default.
Login tokens are only valid for 15 minutes.
For information on how to use the Launcher, see the Launcher documentation.
You can implement
ClientTravel in code or on the command line. Use
ClientTravel when you want to change which deployment a client-worker instance is connected to.
This functionality requires your own authorization code. If you do not have your own authentication service yet, see the development authentication flow documentation on how to use
ClientTravel to connect your client-worker instance to a cloud deployment.
Using the Locator is very similar to using the Receptionist, except it has different URL options. You must add the Locator as host and specify the appropriate options. The Locator uses the client authentication flow.
Add the options
login. For more options, see Map travel URL options.
FURL TravelURL; TravelURL.Host = TEXT("locator.improbable.io"); TravelURL.AddOption(TEXT("locator")); TravelURL.AddOption(TEXT("playeridentity=MY_PLAYER_IDENTITY_TOKEN")); TravelURL.AddOption(TEXT("login=MY_LOGIN_TOKEN")); PlayerController->ClientTravel(TravelURL.ToString(), TRAVEL_Absolute, false /*bSeamless*/);
By default, the client-worker instance connects to the Locator hosted at
locator.improbable.io. To change this, use the
-locatorHost command-line argument to specify the new host.
An alternative option is to trigger the Locator by passing in command-line arguments when you start your game. The first argument is the travel URL, and the other arguments specify how to connect to the deployment. Only the
+playerIdentityToken and the
+loginToken arguments are mandatory.
<MY_GAME_EXECUTABLE> connect.to.spatialos +playerIdentityToken <MY_PLAYER_IDENTITY_TOKEN> +loginToken <MY_LOGIN_TOKEN> +locatorHost locator.improbable.io
2020-07-14 Page updated with editorial review: removed references to Playtest Hub.
2020-06-15 Page added with editorial review
Updated about a year ago