This repository contains basic sample projects for using the Metaplay SDK.
For a full list of all Metaplay samples and their descriptions, see the Sample Projects page in the documentation.
To run the samples, you'll need to get the Metaplay SDK first:
-
Create an account in the Metaplay Developer Portal.
-
Install the Metaplay CLI.
-
Download the Metaplay SDK using the CLI:
samples$ metaplay init sdk --sdk-version=38
Follow these steps to run any of the Unity-based samples in this repository. HelloBlazorWasm runs in the browser instead of Unity — see Running HelloBlazorWasm below.
-
Start the sample project server:
Samples/<Sample>$ metaplay dev server
-
Check out the the sample project's LiveOps Dashboard:
- The Dashboard is available at http://localhost:5550.
-
Run the project in Unity:
- Open the sample project (
Samples/<Sample>) in Unity. - Open Unity menu Metaplay → Environment Configs, and set Active Environment to Localhost to ensure the client connects to the locally running server.
- Press Play in Unity to run the client within the Unity Editor.
- Open the sample project (
HelloBlazorWasm is a preview sample whose client is written in C# with Blazor WebAssembly and runs entirely in the browser, so it has no Unity project and the Unity step above does not apply. It also needs its serializer assembly generated before the client is run, and connects to the server over WebSocket rather than TCP.
See Samples/HelloBlazorWasm/README.md for its build and run steps.