-
I have some troubles to transfer object with object property(vector3) in JS to unity. I want to do something like that: JS: let object = JSON.stringify( await ...(...Game.ScriptName.Create($(object))); c#: I have TestObject class: [Serializable] and in the ScriptName: public void Create(TestObject testObject){ how can I do that? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Hey, Hmm - looks like there is a bug. I will take a look |
Beta Was this translation helpful? Give feedback.
-
Fixed by 3fd5dd2 |
Beta Was this translation helpful? Give feedback.
-
No, GET is the only method supported. Originally the use case was to be able to peek and poke directly from a browser so anything more sophisticated wasn't required and I liked the simplicity. However I can see the limitation and it should be relatively straightforward to add. I would keep the same path format but allow named parameters, something like.
Pass the request body as an extra parameter when creating the query. Then when it's resolving the function arguments, you just need to add some extra logic to grab the contents of the body when you see a This isn't something I have time to do but I am happy to review a pull request. |
Beta Was this translation helpful? Give feedback.
Fixed by 3fd5dd2