Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct here to familiarize yourself with the rules and how to post constructively.

  2. Unity 2022.1 is now available as the latest Tech release.
    Dismiss Notice
  3. Improve your project's performance with our new guide on profiling in Unity.
    Dismiss Notice

Error pushing and pulling floats?

Discussion in 'Unity Remote Config' started by MoltoAssets, Sep 13, 2020.

  1. MoltoAssets

    MoltoAssets

    Joined:
    Dec 2, 2017
    Posts:
    3
    I have been trying to figure out if I am doing something wrong here but got to resort to this forum to point me in the right direction.

    1: Have a unity remote config set up and setting up two float values. It works as I can push and pull values as bools, ints etc. my problem is floats.

    2: I also am not mixing the dev and release just to be clear. I can test pushing and pulling. what throws me off is the "punctation" in a float.

    3: If i on the webpage (dev console) insert a 33.15 or say 55.75 - it gives me a 0 in the "Unity remote config tab" when pulling. In other words. Not working (i just get zero in the fields) - but I do not get any errors in console. If i donwload the file and look - it has the values - so this is happening during/after transfer.

    4: If i try to enter the keys in the manager inside unity, i can ENTER 33.15 and 55.75 - but when i try to push them - i get an error:

    Failed to push remote config: HTTP/1.1 400 Bad Request. Error message:
    {"message":"MalformedRequestContentRejection: Malformed JSON request body.","code":400}


    5: If I try using an f at the end (for float) - it just reverts to zero in the field. Fine enough.

    6: If I try swapping the punctation from "." to "," it fails (because I am in a non US region I thought maybe this is the source). No fix there.

    In short: Is there a bug with pushing/pulling float values back and forth? Or am I missing a vital piece of the puzzle? I do not see anywhere where it says you can only use float with whole numbers (and that would make no sense). But darned if I can get this to behave. Any help would be appreciated as I am sure this works. I just dont know where to look any more.

    The reason I tried flipping the "dot" in bullet 6 over was that sometimes software is tested in America and works fine but when moving to another region that uses other setups, the dot gets swapped to a comma - but the error wont show up when not testing in a different region. In a json setting an extra comma would typically be a culprit here.

    using 2019.4.4f1 FYI

    Cheers!
     
    Last edited: Sep 13, 2020
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    13,371
    Please use the latest Preview package, this is a known issue with earlier versions. In Package Manager, select Show Preview Packages under the Advanced dropdown.
     
    MoltoAssets likes this.
unityunity