Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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:
    31
    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.