Externally Affect PlayCanvas Attribute Parameters

Hey all,

What is the best way to setup the ability to allow someone to affect attribute parameters external to PlayCanvas? We use game templates to serve extremely similar games to multiple clients. I think this potentially goes well beyond the scope of just PlayCanvas but here is an explanation:

Currently the way we setup a game for clients is a developer on the team makes a game with a set of attributes for designers to come in and tweak parameters (Example… a character’s shirt color or a float for their ground speed) and then export the game build to send off to clients. Thus we have multiple version of the same game floating around.

What would be the best way to offload the designer work onto the client so they can make their own? I’d essentially like to expose the parameters on a different webpage and allow them to be able to spin up their own builds. First thing that comes to mind is having a page that just query strings a build but that comes with massive limitations such as the inability to provide textures etc. Are their features in the API that would allow something like this? Never been forced to use the PC API so I’m pretty uneducated on what it is for exactly. Is it possible to reference a game build, affect parameters, then export the build?

Any and all thoughts are appreciated. I know the answer to this probably isn’t very simple. Thanks in advance.

I have a similar situation but with mobile apps. We have a common app that can be branded for many clients. We have a web portal where the clients can login and configure things like colours, images, texts, and feature flags. We provide an endpoint that an app can call to fetch the config eg some json. When the mobile apps starts it fetches the config from the endpoint and then configures itself based on the json.


Okay so you’re saying instead of having multiple builds that the clients are, in effect, spinning up… give every client the same build with the only difference being which endpoint they are grabbing an “attribute json” from. Am I reading that right?

Yes, that’s what I meant. It my case it suits me as it’s easier to maintain one code base.

are you passing the json endpoint in through a query string?

A variation on Kulodo133’s approach is to have the JSON data for the configuration and customisation of the app in the project it self (eg config.json)

You would build a webportal for a generate that has all the options available. The client would click ‘build’ and the server would get the build from PlayCanvas via the REST API (or get build that you’ve downloaded already and stored on your servers), unzip it, replace the config.json with the client’s generated one, re-zip and make it available for the client to download.

1 Like

In my specific app the user has to login and the app is default branded until the user logins in. Each user has an associated config endpoint. After login the config is fetched. The app is unrelated to playcanvas.