Now we've added some game logic to interact with our
HealthPickup entity we should test our changes.
We advise using a test-iterate cycle when developing with the GDK for Unity. You can take advantage of the quick iteration time afforded by running multiple workers in your Unity Editor.
Step 1. In your Unity Editor, launch a local deployment of your game by selecting SpatialOS > Local launch or using the shortcut
Ctrl + L/
Cmd + L.
Step 2. Open the
FPS-Development Scene in your Unity Editor. The Scene file is located in
Step 3. Disable the
SimulatedPlayerCoordinatorWorker prefab in the Scene. This will prevent any simulated player clients from spawning.
Step 3. Press Play in your Unity Editor to play the game.
You'll know that your previous changes have worked if you can see a
HealthPickup entity in the inspector, and find a floating health pack when running around in-game. Currently it just floats there. If you walk into it, nothing happens. Let's fix that!
Step 4. Before you move on, in the terminal window that's running the SpatialOS process, enter Ctrl+C or stop the process.
Updated about a year ago