Exemplo n.º 1
0
        public static AdGameobject Instance()
        {
            if (instance == null)
            {
                GameObject go = new GameObject("TGSDK");
                go.hideFlags = HideFlags.HideAndDontSave;
                DontDestroyOnLoad(go);

                instance = go.AddComponent <AdGameobject>();
            }
            return(instance);
        }
Exemplo n.º 2
0
 public static void Initialize()
 {
     if (init)
     {
         return;
     }
     AdGameobject.Instance();
     init = true;
     try
     {
         _TGSDK_setScreenSize((double)Screen.width, (double)Screen.height);
         _TGSDK_initializeWithInfoPList();
     }
     catch (Exception e)
     {
         Debug.LogWarning(e);
     }
 }
Exemplo n.º 3
0
 public static void Initialize(string appid, string channelid)
 {
     if (init)
     {
         return;
     }
     AdGameobject.Instance();
     init = true;
     try
     {
         _TGSDK_setScreenSize((double)Screen.width, (double)Screen.height);
         _TGSDK_initializeWithChannel(appid, channelid);
     }
     catch (Exception e)
     {
         Debug.LogWarning(e);
     }
 }