playcanvas / playcanvas-sync

Real-time synchronization of files between PlayCanvas and your local machine
https://playcanvas.com/
MIT License
75 stars 19 forks source link

Add pow2 setting #57

Closed mathiassoeholm closed 1 year ago

mathiassoeholm commented 2 years ago

closes #56

Not working yet unfortunately. For some reason the pow2 field results in a 400 bad request with the following message:

{
    "error": "pow2: not supported field"
}

even though I can see that the editor uses the same API endpoint 🤔

mathiassoeholm commented 2 years ago

Now obviously I don't have access to the serverside code, but is there anything there which might explain why I'm seeing this error?

It isn't a documented field: https://developer.playcanvas.com/en/user-manual/api/asset-update/ but the editor appears to be using a field with that name as you pointed out @yaustar.

yaustar commented 2 years ago

Having a look through the server code and it looks like we have an explicit list of fields that are permitted via the public API. I will take a look at adding pow2 or at least use the user settings in the project

yaustar commented 2 years ago

I've created an internal PR adding pow2 property to the public API on create/update API paths

yaustar commented 1 year ago

@mathiassoeholm Sorry about the wait, I've added the pow2 param to the asset create and update REST APIs in the last Editor release :)

Preview of docs: https://github.com/playcanvas/developer.playcanvas.com/pull/449

mathiassoeholm commented 1 year ago

Thanks @yaustar, I really appreciate the effort! 😊

It works perfectly 👍

yaustar commented 1 year ago

Tested the branch locally on a test project, looks good!