Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Solved] Unity IAP : How can I turn off these messages?

Discussion in 'Unity IAP' started by onHead, Nov 1, 2017.

Thread Status:
Not open for further replies.
  1. onHead

    onHead

    Joined:
    Feb 11, 2016
    Posts:
    17
    I am using Unity IAP in my game.

    When I run on an android device, below message come in 'Android Monitor' of 'Android Studio'

    I/UnityIAP: Billing service connected.
    I/UnityIAP: invoking callback
    I/UnityIAP: Checking for in-app billing 3 support.
    I/UnityIAP: In-app billing version 3 supported for xxx.xxx……..
    I/UnityIAP: Subscriptions AVAILABLE.
    I/UnityIAP: VR supported.
    I/UnityIAP: onIabSetupFinished: 0
    I/UnityIAP: Requesting 16 products
    I/UnityIAP: QueryInventory: 16
    I/UnityIAP: invoking callback
    I/UnityIAP: Querying owned items, item type: inapp
    I/UnityIAP: Package name: xxx.xxx……..
    I/UnityIAP: Calling getPurchases with continuation token: null
    I/UnityIAP: Owned items response: 0
    I/UnityIAP: Sku is owned: xxxxxxxxx

    How can I turn off these messages?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    May I ask what impact these messages are having? They are the expected logging output of IAP like most apps have. If might be able to justify the reason other than cosmetic, I can check with the team if there is a error level/verbose setting/flag
     
  3. onHead

    onHead

    Joined:
    Feb 11, 2016
    Posts:
    17

    I do not want to expose these messages like 'SKU' to users in game distribution.
    UnityIAP In addition to UnityADS etc... also send a lot of messages.

    Why not give developers the option to turn off messages?
     
  4. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Understood, but might you be able to elaborate a bit more, why are the SKU, etc messages harmful? The more information we have, the better case we can make to set the priority. We would need to change core code to make this happen. I checked with the team here, and we will look into the possibility of silencing the logs in a future release.
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Upon additional discussion, you could try the following:

    Code (CSharp):
    1. Debug.logger.logEnabled = false;
    and/or

    Code (CSharp):
    1. Debug.logger.filterLogType = LogType.Warning;
    It may vary with the different IAP supported stores however.
     
  6. onHead

    onHead

    Joined:
    Feb 11, 2016
    Posts:
    17
    I'm already using the code below, but I can not turn off the log I want


    Code (CSharp):
    1.  
    2. void Awake()    {
    3.         #if UNITY_EDITOR
    4.         Debug.logger.logEnabled = true;
    5.         Debug.logger.filterLogType = LogType.Log;
    6.         #else
    7.         Debug.logger.logEnabled = false;
    8.         Debug.logger.filterLogType = LogType.Error;
    9.         #endif
    10. }
     
  7. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    @onHead Understood, the logging is done in the Unity engine, so we don't have a lot of control over the logging from the IAP component.
     
Thread Status:
Not open for further replies.