Search Unity

Resolved no udp sdk initialization detected

Discussion in 'Unity Distribution Portal (UDP)' started by gwtw2013, Sep 11, 2020.

  1. gwtw2013

    gwtw2013

    Joined:
    Oct 16, 2018
    Posts:
    6
    Hi
    ive been trying to use UDP and ive taken care of everything but this last part seems to be unfixable.
    i run my apk on a phone but steal says no udp sdk initialization detected.
    My game doesnt have any IAP. its free.
    i found that i should implement UDP initialization code. but i dont know how to and where to put that.
     
  2. villeHelin

    villeHelin

    Joined:
    Mar 27, 2013
    Posts:
    40
    I just woke up, so I might miss something, but shouldn't this script take care of the UDP SDK initialization? Just attach it to any GameObject in your scene...

    1. using UnityEngine;
    2. using UnityEngine.UDP;

    3. public class UDPManager: MonoBehaviour, IInitListener
    4. {
    5. void Awake()
    6. {
    7. StoreService.Initialize(this);
    8. }
    9. public void OnInitialized(UserInfo userInfo)
    10. {
    11. Debug.Log("Initialization succeeded");
    12. // You can call the QueryInventory method here
    13. // to check whether there are purchases that haven’t be consumed.
    14. }

    15. public void OnInitializeFailed(string message)
    16. {
    17. Debug.Log("Initialization failed: " + message);
    18. }
    19. }
     
    SamOYUnity3D and gwtw2013 like this.