Basic Additive Room
Last updated
Last updated
This example shows in a simple way how to use the room system with multiple scenes and rooms.
First of all, in order for the scenes in the project to work, we need to add scenes via build settings.
Then we need to add tags and layers for object interaction and control.
And then you can start the game by pressing the play button.
For example, run 2 builds for clients and 1 build for servers, and start one of them by clicking on the server section on the HUD to become a server.
Start the others by clicking on the client section. Then, you can create a room and join through the HUD for the Room system.
Contents:
Basic Character Controller (you can move it with wasd)
Basic Camera Controller (You can rotate the camera by moving the mouse left and right.)
Score System
It keeps the user id and points in a sync dictionary and prints the current data to the screen via the UI when this directory changes.
Coin Spawn System
It creates coins in a certain number of random locations on the server and keeps the number of coins constant (if there is a decrease, it creates the required amount in a random location).
Room Player Spawn for additive room
Performs character creation or deletion operations for the client as a result of the client joining or leaving the room.