This is a very simple "unity server" that doesn't do much other than show how the SDK works in Unity.
This example is working on
Unity Editor: Unity 2018.4.2f1 or later
OS: Windows 10 Pro or MacOS
There are a few steps.
Check out these instructions.
- Open this folder with UnityEditor.
- Hit a
Build Tool/Build Server
menu item in the menu bar.- The Builds are created in a
Builds/Server
Folder.
- The Builds are created in a
$ make build-image
$ kubectl create -f gameserver.yaml
- Open this folder with UnityEditor.
- Hit a
Build Tool/Build Client
menu item in the menu bar.
-
Run
Builds/Client/UnitySimpleClient.exe
. -
Set
Address
andPort
text fields to GameServer's one. You can see these with the following command.$ kubectl get gs NAME STATE ADDRESS PORT NODE AGE unity-simple-server-z7nln Ready 192.168.*.* 7854 node-name 1m
-
Hit a
Change Server
Button. -
Set any text to a center text filed and hit a
Send
button.- The Client will send the text to the Server.
When a Server receives a text, it will send back "Echo : $text" as an echo. And an SDK API will be executed in a Server by the following rules.
Sending Text(Client) SDK API(Server) Allocate Allocate() Label $1 $2 SetLabel($1, $2) Annotation $1 $2 SetAnnotation($1, $2) Shutdown Shutdown()