public static void appWasRun(NativeXAndroid android, NativeXiOS iOS)
 {
     #if UNITY_ANDROID
     if(android.appId!=null)
     {
         if(Application.platform == RuntimePlatform.Android){
             instance.Call("appWasRun", android.appId);
         }
     }
     #elif UNITY_IPHONE
     if(Application.platform == RuntimePlatform.IPhonePlayer){
         if(null!=iOS.appId)
         {
             uConnectWithAppId(iOS.appId.ToString());
             if(isDebugLogEnabled){
                 Debug.Log("appWasRun has been hit");
             }
         }
     }
     #endif
 }
示例#2
0
 void Start()
 {
     iOS = new NativeXiOS(12198, "TestApp", null, 200, 300, Screen.height/20, Screen.width/2, 100, 200);
     android = new NativeXAndroid(5077, "android.PackName", "TestApp", "Test Pub");
     iOS.actionId = 17;
     android.actionId = 16;
     Debug.Log(iOS.ToString());
     Debug.Log("NativeX - Unity has Started");
     NativeXCore.intitialization(android, iOS);
 }
 public static void intitialization(NativeXAndroid android, NativeXiOS iOS)
 {
     #if UNITY_ANDROID
     //if(android != null){
         if(Application.platform == RuntimePlatform.Android){
             Debug.Log("W3i - Initialization called");
             instance.Call("init", currentAct, android.appId, android.displayName, android.packageName, android.publisherUserId);
         }
     //}else{
     //	Debug.Log("No NativeXAndroid object exists");
     //}
     #elif UNITY_IPHONE
     //if(iOS!=null){
         if(Application.platform == RuntimePlatform.IPhonePlayer){
             uStartWithNameAndApplicationId(iOS.appName, iOS.appId.ToString(), iOS.publisherUserId);
         uSetCoordinates(iOS.bannerX, iOS.bannerY, iOS.bannerHeight, iOS.bannerWidth, iOS.offerWallX, iOS.offerWallY);
             if(isDebugLogEnabled){
                 Debug.Log("initialization has been hit");
             }
         }
     //}else{
     //	Debug.Log("No NativeXiOS object exists.");
     //}
     #endif
     return;
 }