GPF Docs

Install

Install

Install GPF in 10 minutes

1. Download the Package

2. Run Tests Locally

Tested using Unity 2021.3

1.Create a new Unity 2021.3 project in Unity

2.Double click the downloaded package and import all to create a new project with GPF installed.

3.Goto GPF -> Project Settings and set the backend type to Simulated

4.Open Unity Test Runner by going to Window > General > Test Runner.

5.Right click and run all of tests.

3. Install Tools

Now that we have GPF installed in our project and can develop locally, we want to give GPF the ability to rollout real backends. To set up the backend you will need:

ToolVerification commandExpected VersionInstall Link
AWS CLIaws --version2.0 or laterGet AWS CLI
.NET 7.0 SDKdotnet --list-sdks7.0(exactly)Get .NET 7.0 SDK

4. Set up your AWS Account

Game Plumbing Framework uses Amazon Web Services (AWS) to make deploying backends quick and easy. You will need an AWS account if you want to create a multiplayer experience.

a.Create an IAM user. Put this user in the Admin Group. Then create access keys for that user

b.Download and configure the keys for that user onto your development machine.

5. Register your AWS account ID with us

We use your AWS ID to ensure the stack is installed on the intended account and to track registrations. It will be stored securely. It will not be shared.




Upon submitting we will email you a key.

6. Configure Unity for Remote Mode

Within the Unity Editor, Go to GPF -> Stack Manager , select the AWS Profile that we just configured, and paste your key into the API Key field.

7. Deploy It!

As a quick sanity check to make sure everything has been setup properly, try to deploy a stack by selecting a region and Stack Name just to check. Pressing Deploy New should kick off a 3-5 minute deploy process and will look like this when complete.


Once deployed, you can look at the stack in your AWS console inside of CloudFormation.


Congrats on deploying your GPF Remote Stack!


You will have to redeploy your stack whenever you change a ServerObject and want to test it remotely.

This table explains how to configure future deploys.

FieldDescription
RegionAllows you to choose the AWS region you want your stack to run in.
Stack NameAny Unique name for this stack. For example, it could be your game name concatenated with the developer name.
Use DNSWhether or not to use a Domain Name Server for the api. If you have one, use it.
Choose DomainIf you clicked "Use DNS" you will have to specify a domain.
SubdomainIf you clicked "Use DNS" you will have to specify a sub-domain.
Choose CertIf you clicked "Use DNS" you will have to specify a certificate.
Advanced-vCpuFargate vCpu setting. Learn more here https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html
Advanced- memoryFargate memory setting. Learn more here https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html
Advanced - Enable RESTYou can create REST endpoints using GPF. The port used for these calls does not accept public traffic by default. Enabling REST will allow public traffic to hit REST endpoints you build into your ServerObjects.
Advanced - Clear storage on deployWhether the server should clear all data on deployment. This can be save a little time on development environments and prevent chasing bugs that wont ever exist in production environments. This might even be ok for Alpha releases if players understand their accounts will be wiped time to time, but never a completely live game.
Advanced - Send Exceptions to clientWhether the server should send exceptions to the client. This is helpful for debugging but turning this setting on in prod will result in a security vulnerability.
Server Log LevelWhat level the server should log at.
Limit AuthServersConfigure which Auth servers to include on the server.
Environment VariablesConfigure environment variables that ServerObjects will have access to.

8. Run Unit Tests Remotely

We will now run all of our unit tests again, but remotely, on the stack we just deployed.

1.In the Unity Editor, go to GPF -> Settings and flip Backend Type to Fargate

2.Run the unit tests in Test Runner again. They should take a longer time since simulation time is and messages have to go over the network.

3.When the tests have all run you can look into your AWS console to see activity. You should be able to find the stack under CloudFormation. Clicking on resources in CloudFormation will let you go straight to the ECSCluster where you can view logs.

4.Reset remote state using GPF -> Settings-> Stack Manager.

© 2023 Launch It Labs INC