Search Unity

Feature Request Remove log message when currency not found

Discussion in 'Economy' started by MiTschMR, Aug 8, 2022.

  1. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    493
    Is it possible to remove the informational log message when a currency was not found?

    The provided economy item key doesn't exist in the fetched configuration.
    UnityEngine.Debug:Log (object)
    Unity.Services.Economy.EconomyRemoteConfig:GetEconomyItemWithKeyWithoutRefresh (string) (at Library/PackageCache/com.unity.services.economy@2.0.4/Runtime/EconomyRemoteConfig.cs:57)
    Unity.Services.Economy.EconomyRemoteConfig/<GetEconomyItemWithKeyUsingRefreshAsync>d__12:MoveNext () (at Library/PackageCache/com.unity.services.economy@2.0.4/Runtime/EconomyRemoteConfig.cs:49)
    System.Threading.Tasks.TaskCompletionSource`1<bool>:TrySetResult (bool)
    Unity.Services.Economy.EconomyRemoteConfig:EconomyConfigFetchCompletionHandler (Unity.Services.RemoteConfig.ConfigResponse) (at Library/PackageCache/com.unity.services.economy@2.0.4/Runtime/EconomyRemoteConfig.cs:223)
    Unity.Services.RemoteConfig.RuntimeConfig:HandleConfigResponse (Unity.Services.RemoteConfig.ConfigResponse) (at Library/PackageCache/com.unity.remote-config-runtime@3.1.3/Runtime/RuntimeConfig.cs:101)
    Unity.Services.RemoteConfig.ConfigManagerImpl:HandleConfigResponse (string,Unity.Services.RemoteConfig.ConfigResponse) (at Library/PackageCache/com.unity.remote-config-runtime@3.1.3/Runtime/ConfigManagerImpl.cs:548)
    Unity.Services.RemoteConfig.ConfigManagerImpl/<>c__DisplayClass46_0:<DoRequest>b__0 (UnityEngine.AsyncOperation) (at Library/PackageCache/com.unity.remote-config-runtime@3.1.3/Runtime/ConfigManagerImpl.cs:538)
    UnityEngine.AsyncOperation:InvokeCompletionEvent ()
     
  2. EllieF_Unity

    EllieF_Unity

    Unity Technologies

    Joined:
    Nov 27, 2020
    Posts:
    39
    Hi MiTschMR,

    Sorry to keep you waiting for a response. I have spoken to the developers and they have told me that, unfortunately, it is not possible to remove that log message in future versions of the SDK.
     
  3. MiTschMR

    MiTschMR

    Joined:
    Aug 28, 2018
    Posts:
    493
    Thanks for the response, but if I may ask, why? The message has 0 relevance, because you either get an exception when trying to set anything on a non-existing currency or item or you get null when getting, which you can check against.

    That's just ridiculous, sorry...
     
  4. EllieF_Unity

    EllieF_Unity

    Unity Technologies

    Joined:
    Nov 27, 2020
    Posts:
    39
    Thanks for your response. The message was initially intended to notify developers as early as possible that there was something that may cause issues further down the line in the application's lifecycle. The SDK developers felt that it was important for this notification to be present which is why they were originally against removing the message.

    I forwarded this feedback to them and they found that they actually agreed with you line of reasoning and have re-considered their stance. They will be removing the message in a future release. I will update you when I have more idea of a timeline with regards to this change being released.
     
    MiTschMR likes this.