aws / amazon-gamelift-plugin-unity

The Amazon GameLift Plugin for Unity contains libraries and native UI that makes it easier to access GameLift resources and integrate GameLift into your Unity game. You can use the GameLift Unity Plugin to access GameLift APIs and deploy AWS CloudFormation templates for common gaming scenarios.
https://aws.amazon.com/gamelift/getting-started/
Apache License 2.0
81 stars 16 forks source link

Deployment with EditorWindow - Launch Path Incorrect #257

Open nielss94 opened 6 months ago

nielss94 commented 6 months ago

I'm deploying a single-region fleet through the Editor Window of the plugin and it (likely) fails because the fleet cannot be created due to the LaunchPathParameter being incorrect:

Resource handler returned message: "Launch path must begin with '/local/game'.

I can see in the parameters tab in Cloudformation that the LaunchPathParameter is set to 'C:\game\serv.x86_64'. This is my configuration in the Editor Window:

image

Any ideas for temporary solutions? Also, if this is something that needs work, I'd be happy to help :)

levigerber commented 5 months ago

Hello thank you for reaching out! I see that the "Build Operating System" is set to AL2. Have you tried setting it to Windows?

levshaun-amzn commented 3 months ago

Hello. After further investigation, there does seem to be a bug with the plugin when creating a fleet with an Amazon Linux 2 (AL2) Build Operating System.

The DeploymentFormatter class always creates a GetServerGamePath formatted for a Windows Build Operating System. https://github.com/aws/amazon-gamelift-plugin-unity/blob/f5241d697d2d827a55afc3dacc4b0a6ae514741c/Runtime/Core/DeploymentManagement/DeploymentFormatter.cs#L18

The fix would be to modify DeploymentFormatter to accept the BuildOperatingSystem as an argument and use the /local/game/{gameFilePathInBuild} format when BuildOperatingSystem is AMAZON_LINUX_2. https://github.com/aws/amazon-gamelift-plugin-unity/blob/f5241d697d2d827a55afc3dacc4b0a6ae514741c/Editor/Deployment/DeploymentSettings.cs#L466

The Amazon GameLift team will fix this issue as part of our next release. GameLift does not have a timeline for the next release, so you can unblock your development in the meantime by modifying the plugin's code yourself.