Search Unity

  1. The 2022.1 beta is now available for testing. To find out what's new, have a look at our 2022.1 beta blog post.
    Dismiss Notice

GF repository?

Discussion in 'Game Foundation' started by YourWaifu, Oct 5, 2020.

  1. YourWaifu

    YourWaifu

    Joined:
    Oct 4, 2015
    Posts:
    11
    Hey, do you plan to open sources in a public repository?

    I need to make some changes to the API of wallets and would like to fork the repository~


    Thanks.
     
  2. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    400
    Hi @YourWaifu,

    Thanks for your interest in Game Foundation and the Wallet system. Unfortunately I'm not aware of any current plans to open source the repository. I'm curious though what sort of changes you're interested in making to the wallet API? Maybe I can help brainstorm other ways the existing Wallet system can meet your needs, or can add them to our list of feature requests?
     
  3. YourWaifu

    YourWaifu

    Joined:
    Oct 4, 2015
    Posts:
    11
    @erika_d,
    Change wallet balance type from long to decimal~
     
  4. erika_d

    erika_d

    Unity Technologies

    Joined:
    Jan 20, 2016
    Posts:
    400
    Thanks for that info @YourWaifu! As a potential workaround could you keep the value in long, and then divide by 100 (or whatever gives the number of decimal places you want) when displaying the value to users? (i.e 1032 becomes 10.32) That had sorta been our thinking when we decided to go with storing currency as longs.
     
  5. tony_c-unity3d

    tony_c-unity3d

    Unity Technologies

    Joined:
    Jul 18, 2019
    Posts:
    29
    Great idea @erika_d! Another workaround might be to use 2 currencies to encode both the whole number and the decimal portion as separate values, assuming you need more accuracy and/or larger numbers. ex: Currency: "coins" and currency: "coins_dec" could be used together to determine the final total of coins with high precision. Erika's solution is much easier to use and likely covers your use case @YourWaifu, but in case you needed functionality closer to that of decimal, perhaps 2 longs would suffice.

    Best of luck and please let us know if you have any other questions.
     
    erika_d likes this.
unityunity