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

Prime31 Unity Plugins Officially Live! [CLOSED]

Discussion in 'iOS and tvOS' started by prime31, Aug 27, 2010.

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

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    We are very proud to present our first 6 plugins for immediate use in your games. All our plugins are true Unity plugins that are designed to be dead simple to use. Setup takes just minutes so you can keep adding features to your games without any hassle. The first batch of plugins available for immediate download is:
    • iAd
    • Mobclix
    • DeviceMotion (Gyroscope support)
    • MediaPlayer (iPod audio support)
    • StoreKit (In App Purchasing)
    • CoreLocation (GPS location and compass)
    We have 2 more plugins in the final stages of testing and documenting: AudioRecording for easy access to the microphone and GameKit Bluetooth support. If you have any plugin requests, don't hesitate to let us know and we will put it on our list. The more votes it gets, the higher up the list it goes. We appreciate any and all feedback so please don't hesitate to contact us and let us know what's on your mind.


    Plugin Site
    Documentation Site
     
  2. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    Snagged a few of these. Thanks so much!
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Please do post back and let me know if they were easy enough to use, the documentation made sense, examples were clear, etc.

    Thanks!
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    So, the AudioRecorder plugin release had to be delayed due to Unity seemingly not having the ability to load an audio file from disk that was not included in the project file. We should all file feature requests to get this ability (unless I'm just really tired and missing something here). Well, the AudioRecorder plugin now has a brother that will be included in the package: AudioPlayer plugin. This will be a native audio player that can play files out of your documents directory or the standard iPhone bundle. I have to write double the docs now and test twice as much code but it should be ready by Sunday at the latest.

    The GameKit plugin now has a demo and just needs some documentation and it is ready to go as well. More on this in the next couple days.
     
  5. Deleted User

    Deleted User

    Guest

    Good Work!

    Could i suggest a video player plug-in?

    We had a lot of problems with iOS 4 video playback and auto orientation !

    Thank you.

    Andrea
     
  6. Pyroman311

    Pyroman311

    Joined:
    Aug 14, 2010
    Posts:
    87
    I'll have to pick some of these up when my project nears completion...


    Will these prices stay the same? Please say yes....haha.
     
  7. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    How compatible is each of these with Open Feint? I ask becuase the other ad plugin does not work with OF...(I can't get them to play together at least.)
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    These are all true plugins that don't use AppController categories which means they are fully compatible with OpenFeint. You only run into problems with the PlayerPref hack-type plugins (that are not really plugins at all as defined by Unity).

    To use any of these plugins with OpenFeint simply rename the OpenFeint PostprocessBuildPlayer to PostprocessBuildPlayer_OpenFeint and you are good to go.
     
  9. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    Where is it in your StoreKit sample project I would change the product ID I set up in iTunes Connect? I am wondering if it is the StoreKitGUIManager.cs script where the line that reads:

    string productIdentifiers = "anotherProduct,t,testProduct";

    Is this correct? And if so what is the format I need to use? I know for a quick start, your customers would love for you to make a comment line explaining where to put in their information if they want to test the sample themselves quickly to see it work.

    If this is not correct... where can I put in my Bundle ID and Product ID? And what is the format?

    I am VERY EAGER to get this working as I have tried for months to get other solutions working to no avail.
     
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Logic Twilight, all the code in the StoreKitGUIManager.cs is examples of calling each of the StoreKit plugin functions. The productIdentifiers should be a list of the exact product ID's you enter into iTunesConnect separated by commas. Your bundle ID goes in the normal Unity location in the Player Settings.

    For the full documentation along with comments for each method check out the documentation page: StoreKit Documentation
     
  11. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    I guess I need to be more specific in my question... is this the product ID WITHOUT the bundle identifier?

    Basically what I would love an answer to is... How can I take your sample edit it to simply attempt to purchase a non-consimable single product ID?

    I think your documentation lacks a simple explanation of where your scripts get the "com.MyCompanyName.ProductName.IAP_Product_ID" info from. In other words again, where is it I can edit the variable value in one central location (if your example does this) in your sample to make a simple purchase attempt?

    I have already set up my IAP in iTunes Connect btw, and I was not referring to the bundle ID for the app in Unity... I was only referring to the variables that need to be edited in your sample that send the bundle ID and product name to the iTunes Store servers.
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Logic Twilight, the docs don't go into much detail on the iTunesConnect side of things because Apple does an excellent job of that. ProductIdentifier's are quite literally a copy/paste of the exact product ID you entered into iTunesConnect. Anytime the StoreKit plugin has a variable named productIdentifer it must be the exact one from there. The following image is the test application from iTunesConnect that is represented in the sample scene: image link

    So, to purchase 1 of the first product in the image above it would simply be:
    Code (csharp):
    1.  StoreKitBinding.purchaseProduct( 'anotherProduct', 1 )
    That's all there is to it. The IAP sandbox server has been really shaky lately and quite slow to update. My test products often took over 24 hours before I could do test purchases on them. You also need to be certain that you always log out of your App Store account before testing IAP (Settings -> Store -> Sign Out). The docs have some good info that I got from an Apple rep as well with regard to testing. As suggested by the Apple rep, sometimes you have to reboot your phone as well to get the sandbox purchases to work.

    I forgot to mention, ALWAYS watch the logs in the Xcode debugger. The plugins print some useful information in there so that you can figure out what your issues might be.
     
  13. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    OK... you just cleared up a BIG thing... see, to someone who didn't know you had 3 different products set up for your 1 app... it looks like you were referring to 3 different needed arguments like product name, qauntity and maybe some other needed argument... especially with the naming being "Another Product", then "t" (looks like an Integer variable for quantity or something)... this totally threw me off. I suggest that you either make this clear in your script notation or better yet change this to "Product1, Product2, Product3" or MANY customers will end up as confused as I was. I also suggest you make notes in your code that says "// PUT YOUR PRODUCT ID(s) HERE" where applicable with maybe an example line just below it like "// string productIdentifiers = "Product1,Product2,Product3"; I am actually VERY familiar with setting up IAP's on Apple's servers and have tried for months to get it working... maybe I was always hitting the reported Apple Server problems?

    As for other feedback you would be interested in... your documentation for your plugins doesn't give the developer any starting point and followed through instruction in many ways... I mean it needs to have somewhere in it instructions of where to start and how to continue making your solution work in their implementations. Throwing out just a list of method's with argument explanations like Apple does is very confusing... it gives the user no direction as to where to start... what to copy and paste and where... without step by step instructions, its just like throwing a bunch of tinkertoys down for someone else to figure out. One thing Unity has in there documentation that is NEEDED by most non-super-advanced programmers is EXAMPLE CODE SAMPLES THAT JUST WORK ALREADY (with whatever needed changes outlined with simple instructions).

    Prime31 can turn this ->':cry:' into this ->':D' ... how?

    I know most developers are going to use a simple single non-consumable one-time full upgrade... it might be very beneficial (I know it would have been for me) to make a sample project that simply...

    1-Checks to see if this one-time upgrade purchase can be made from the device.
    2-Reports a message if the purchase was ever made already for that app on that device.
    3-IF NO PURCHASE WAS EVER MADE, then offers a button to make the purchase if it was not ever made on that device.
    4-Shows the progress of the purchase attempt.

    This was what I was hoping for when I heard about your plugin. If you can deliver such an example... I would love you FOREVER! MANY PEOPLE WILL LOVE YOU FOREVER!
     
  14. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    OH WOW! I HAVE TO SAY I LOVE YOU!!! After clearing up the multiple product ID's misunderstanding... I GOT IT TO WORK AND I LOVE YOU I LOVE YOU I LOVE YOU!

    YOU HAVE JUST MADE ME A VERY HAPPY MAN DUDE!

    YOU ROCK YOU ROCK YOU ROCK!

    Everything worked perfectly! I totally am a satisfied Prime31 customer!

    !!!!! PEOPLE, GET THIS PLUGIN MAKE SOME APPLE REVENUE FOR A CHANGE !!!!!

    GREAT GOING PRIME31 !!!!!!!! My clients will be very happy too! :D :D

    AGAIN I LOVE YOU! (Actually I love everyone, BUT I LOVE YOU MORE!)
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Logic Twilight, the example you seek for the most part will be below. Hopefully it will turn :cry: into :D. The StoreKit plugin in particular is quite difficult to provide a drop in working example because it is so flexible, fully app specific and a good portion of the setup is in iTunesConnect. I leave the implementation details of creating a gui as an exercise to the user as it is quite game specific. The code may have a few errors because I am just typing it in untested but it should be really close. The code can be placed in Awake or Start or wherever else it makes sense for your game. It is well commented and illustrates the situation you asked for.

    One caveat is that there is no way to show progress. All you can do is send off a request and wait for a response from Apple's servers.

    Code (csharp):
    1.  
    2. // Make sure the user can actually make payments before showing a buy now button
    3. // If they can't, early out because we have nothing more to do here
    4. if( !StoreKitBinding.canMakePayments() )
    5.     return;
    6.  
    7. // Listen for the event when a user purchases a product successfully
    8. StoreKitManager.purchaseSuccessful += onPurchaseSuccessful;
    9.  
    10. // Check for first launch and if it doesn't exist display a button
    11. // and see if the user already bought this product
    12. if( !PlayerPrefs.HasKey( "firstLaunch" ) )
    13. {
    14.       // Set the firstLaunch flag so that we only restoreCompletedTransactions once
    15.       PlayerPrefs.SetInt( "firstLaunch", 1 );
    16.      
    17.      // This could be an existing user who reinstalled after a delete
    18.      // so lets check to see if they bought this product.
    19.      // This is async, so if the user bought anything the purchaseSuccessful
    20.      // event will get triggered and we should give them the product at that time
    21.      StoreKitBinding.restoreCompletedTransactions();
    22.  
    23.      // Show a buy now button in your gui that can be removed later if
    24.      // you find that the user already bought this product
    25. }
    26.  
    27. // This gets triggered when a user touches the Buy Now button
    28. public void onTouchBuyNowButtion()
    29. {
    30.      // Kick off a product purchase because the user wants to buy this product
    31.      StoreKitManager.purchaseProduct( "SOME_PRODUCT_ID_HERE", 1 );
    32. }
    33.  
    34.  
    35. // Callback for when a product is purchased
    36. public void onPurchaseSuccessful( string productIdentifier, string receipt, int quantity )
    37. {
    38.       // Alright!  We got a sale!  Give them what they bought.
    39.       // Hide the buy now button
    40. }
    41.  
     
  16. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    READ THIS!!!! - STOREKIT USERS !!!!!!!!!!!!!!!!!!!!!!!!!!!
    -----------------------------------------------------------------------------------------
    Here's an important thing I just found! Even if you are connecting just fine with Apple's servers... if you try to purchase a Product ID that doesn't exist (isn't active and working in your In App Purchase settings)... Apple's Server responds saying "Cannot connect to iTunes Store"! The way I found this is to make product 1 in your example correctly match my own real settings and to leave product 2 as you defined in your example (which doesn't exist in my config)... when I purchase product 1... everything works fine... but when I try to purchase Product 2... it says it cannot connect every time!

    I have tried getting IAP's to work for many months and always got THE SAME ERROR MESSAGE... that it "cannot connect to iTunes Store"! I have also talked to MANY other developers that GAVE UP because of the same error!... I BET THIS IS THE MAIN PROBLEM EVERYONE IS HAVING!
     
  17. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    Unfortunately I know nothing of C Sharp (Only JavaScript) and a straight copy paste just gave a parsing error in Unity (no other specific debugging clues). I then made sure to use the standard wrapper that Unity makes when creating a new script...

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. public class IAPScript : MonoBehaviour {
    5.  
    6.     // Use this for initialization
    7.     void Start () {
    8.  
    9. // Make sure the user can actually make payments before showing a buy now button
    10. // If they can't, early out because we have nothing more to do here
    11. if( !StoreKitBinding.canMakePayments() )
    12.     return;
    13.  
    14. // Listen for the event when a user purchases a product successfully
    15. StoreKitManager.purchaseSuccessful += onPurchaseSuccessful;
    16.  
    17. // Check for first launch and if it doesn't exist display a button
    18. // and see if the user already bought this product
    19. if( !PlayerPrefs.HasKey( "firstLaunch" ) )
    20. {
    21.       // Set the firstLaunch flag so that we only restoreCompletedTransactions once
    22.       PlayerPrefs.SetInt( "firstLaunch", 1 );
    23.      
    24.      // This could be an existing user who reinstalled after a delete
    25.      // so lets check to see if they bought this product.
    26.      // This is async, so if the user bought anything the purchaseSuccessful
    27.      // event will get triggered and we should give them the product at that time
    28.      StoreKitBinding.restoreCompletedTransactions();
    29.  
    30.      // Show a buy now button in your gui that can be removed later if
    31.      // you find that the user already bought this product
    32. }
    33.  
    34. // This gets triggered when a user touches the Buy Now button
    35. public void onTouchBuyNowButtion()
    36. {
    37.      // Kick off a product purchase because the user wants to buy this product
    38.      StoreKitManager.purchaseProduct( "SOME_PRODUCT_ID_HERE", 1 );
    39. }
    40.  
    41.  
    42. // Callback for when a product is purchased
    43. public void onPurchaseSuccessful( string productIdentifier, string receipt, int quantity )
    44. {
    45.       // Alright!  We got a sale!  Give them what they bought.
    46.       // Hide the buy now button
    47. }
    48.  
    49.  
    50.  
    51.  
    52.    
    53.     }
    54.    
    55.     // Update is called once per frame
    56.     void Update () {
    57.    
    58.     }
    59. }
    60.  
    with this I got these errors...

    Assets/Editor/IAPScript.cs(35,6): error CS1525: Unexpected symbol `public'


    Assets/Editor/IAPScript.cs(19,1): warning CS0642: Possible mistaken empty statement


    Assets/Editor/IAPScript.cs(56,14): error CS0116: A namespace can only contain types and namespace declarations

    and yet another parsing error reported as:


    Assets/Editor/IAPScript.cs(59,1): error CS8025: Parsing error

    Can we get a corrected script if it's not too much to ask?

    Is it possible to have a JavaScript example?

    Again, I LOVE YOU!
     
  18. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    I don't use UnityScript (JavaScript) at all in Unity so unfortunately I can't convert the script easily. I can read UnityScript just find but the I don't know the syntax for nuances such as events and other .NET/Mono features. Here is a working C# script though:

    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4.  
    5. public class IAPScript : MonoBehaviour
    6. {
    7.  
    8.     // Use this for initialization
    9.     void Start()
    10.     {
    11.         // Make sure the user can actually make payments before showing a buy now button
    12.         // If they can't, early out because we have nothing more to do here
    13.         if( !StoreKitBinding.canMakePayments() )
    14.             return;
    15.  
    16.         // Listen for the event when a user purchases a product successfully
    17.         StoreKitManager.purchaseSuccessful += onPurchaseSuccessful;
    18.  
    19.         // Check for first launch and if it doesn't exist display a button
    20.         // and see if the user already bought this product
    21.         if( !PlayerPrefs.HasKey( "firstLaunch" ) )
    22.         {
    23.               // Set the firstLaunch flag so that we only restoreCompletedTransactions once
    24.               PlayerPrefs.SetInt( "firstLaunch", 1 );
    25.  
    26.              // This could be an existing user who reinstalled after a delete
    27.              // so lets check to see if they bought this product.
    28.              // This is async, so if the user bought anything the purchaseSuccessful
    29.              // event will get triggered and we should give them the product at that time
    30.              StoreKitBinding.restoreCompletedTransactions();
    31.            
    32.              // Show a buy now button in your gui that can be removed later if
    33.              // you find that the user already bought this product
    34.         }
    35.     }
    36.    
    37.    
    38.     // This gets triggered when a user touches the Buy Now button
    39.     public void onTouchBuyNowButtion()
    40.     {
    41.          // Kick off a product purchase because the user wants to buy this product
    42.          StoreKitBinding.purchaseProduct( "SOME_PRODUCT_ID_HERE", 1 );
    43.     }
    44.    
    45.  
    46.     // Callback for when a product is purchased
    47.     public void onPurchaseSuccessful( string productIdentifier, string receipt, int quantity )
    48.     {
    49.           // Alright!  We got a sale!  Give them what they bought.
    50.           // Hide the buy now button
    51.     }
    52. }
     
  19. domodes

    domodes

    Joined:
    May 18, 2009
    Posts:
    51
    Uprise, include some sort of volume level detection (maybe even pitch, etc.) if that's possible. :)
     
  20. Logistic-Win

    Logistic-Win

    Joined:
    Apr 4, 2009
    Posts:
    107
    Again, You Rock... the all in one single purchase script worked! Thank you for all your help... you really came through for us! :p
     
  21. Superwaugi (Artcue)

    Superwaugi  (Artcue)

    Joined:
    Jul 28, 2009
    Posts:
    17
    Wow, that`s great news! :D
    We were waiting for a InAppPurchase (Storekit)! So as soon as we get our Unity 3.0 and new Unity Pro IPhone Version we can start?
    Or does it also work with Iphone Pro 1.7?
    Your prices are also moderate...so we will buy from you for sure :)
    Social Networking tools would also be nice for the Iphone. There is a Twitter Tool which should work also for Iphone from unityprefabs.com but the Facebookintegration does not work for Iphone...so this would be marvelous!
    All the best from Vienna!
    Superwaugi
     
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Superwaugi, most of the plugins have been tested on Unity 1.7 Pro and worked without issue. The only downside is that the test scenes included wont work due to incompatibilities between Unity 1.7 and 3.0. The scenes usually pretty simple and can be reconstructed by just drag and dropping a few scripts on empty game objects.

    @domodes, I just added metering support to the AudioRecorder plugin so you can get average and peak power while recording. This should be going live today.
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The next 2 plugins are live! GameKit with Voice Chat and an AudioRecorder and AudioPlayer plugin. For more info see this thread: new plugin thread
     
  24. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    Hi, I bought the Mobclix plugin and am having trouble understanding a couple of things.

    First, how would I integrate this into an app that is already serving iAds? I don't see anything on the Mobclix site or in the SDK about this. I already have iAds running, and integrating Mobclix with iAds was the reason I bought the plugin.

    Second, I'm using Unity 1.7 Advanced, and had to remove GUIManager.cs script from the project to clear Unity error messages (I assumed this was part of the demo scene).

    I manually called the functions from my own script, built from Unity to XCode, replaced a few missing Frameworks(?), and built to the device (iPhone 4).

    The app loads fine but when the ad is supposed to display I get a message that "An error has occurred." After clicking the link, I get a message from Mobclix to "Check to see if ads of this size are enabled for your application on the developer dashboard."

    Is this message related to the plugin or my Mobclix setup? As far as I can tell I have everything correct in my Mobclix dashboard.

    Thanks for any help.
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cheezorg, you will first want to remove all your iAd related code. You can serve up iAd's through Mobclix. In the Mobclix portal you can configure it to push both Mobclix and iAds ads to your application. Once it is setup server side, be sure to add your Mobclix application ID to the MobclixApplicationId.txt file in the Editor/Mobclix directory.

    You can delete the entire testSupport directory because it just contains a sample scene that won't work in Unity 1.7 anyway due to the .scene file changes.

    From there, the only code you need to add to your project is the following:
    Code (csharp):
    1. MobclixBinding.mobclixInitializeWithApplicationId( "YOUR_APP_ID_HERE" );
    2. MobclixBinding.mobclixShowBanner( true );
     
  26. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    Thanks for your quick response.

    I actually started on a fresh test project so there was no iAd code in there (just this packacge and nothing else), and double checked that I entered the app code correctly in MobclixApplicationId.txt and in MobclixBinding.mobclixInitializeWithApplicationId.

    I can't find where in the Mobclix portal to set iAd preferences, but will keep looking...
     
  27. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    OK, I figured out the problem! I hadn't gone through the settings in the Services tab in the Mobclix dashboard. Everything is working flawlessly.

    Pretty dumb mistake on my part. D'oh!
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    In your defense, the Mobclix website, API and docs aren't exactly the best around. I mean, why do they need the app ID in the info.plist file AND passed to the unit function? Isn't one enough?
     
  29. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Just bought your MobClix product... integrated in seconds and works a treat, thanks, except the ads do not rotate to the device orientation.

    I have used your prefab, as well as integrating it all via your API into my game, and though my device orients correctly, Mobclix Ad never re-orients after initial orientation :(

    Any ideas?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Seon, There was an update that went live a few hours ago with autorotation added. If you dont see a method MobclixBinding.rotateToOrientation in the MobclixAdapter.cs file's update method then you are using the old version. Redownload the plugin and please let me know if that takes care of it for you.
     
  31. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    I have the latest version that has that function.... it just doesn't work :(

    Ad never rotates.
     
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    What version of Unity are you using?
     
  33. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Ok, Ad is now rotating.. seems (for me anyway) that I have to rotate Ad before I rotate device. Other way round isnt working, though I cant seem to work out why.
     
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Seon, that sounds quite odd. I will try to reproduce on my end. Everything works as expected on an iPhone 4 and an iPod Touch 2G for me.
     
  35. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Ok, once again I spoke too soon.... it has nothing to do with order, but it still isnt working for me with what I need to do. This is what I am doing...

    Code (csharp):
    1. if( iPhoneSettings.screenOrientation != ( iPhoneScreenOrientation )Input.deviceOrientation )
    2. {
    3.     // Allow rotating to landscape left/right
    4.     if( Input.deviceOrientation == DeviceOrientation.LandscapeLeft || Input.deviceOrientation == DeviceOrientation.LandscapeRight )
    5.     {
    6.         if( Input.deviceOrientation == DeviceOrientation.LandscapeLeft)
    7.             MobclixBinding.rotateToOrientation( DeviceOrientation.Portrait );
    8.         else
    9.             MobclixBinding.rotateToOrientation( DeviceOrientation.PortraitUpsideDown );
    10.                    
    11.         iPhoneSettings.screenOrientation = ( iPhoneScreenOrientation )Input.deviceOrientation;
    12.                
    13.     }
    14. }
    Basically I need the ads on left or right of device in portrait mode based on landscape left/right on device.

    Device = LandscapeLeft - Ad Portrait (bottom)
    Device = LandScapeRight - Ad PortraitUpSideDown (bottom)

    But this isnt working :(

    If I leave it how you had it, it rotates fine, but my ad is not where I need it.

    Cheers :)
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Seon, interesting. So you are trying to have the ads be in a different orientation than the phone. I had not ever seen that before and didn't build it into the plugin. Will Apple even accept a game with sideways ads? I can't imagine them allowing iAds to be sideways. Have you ever seen one in the App Store before?

    Regardless of all that, I cooked up a solution that should work for you. Check your email for an updated plugin. There is one bit of trickery you need to do on the Unity side due to the very forceful way Unity handles rotation that I detailed in the email.
     
  37. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Not sure about iAds, but I have seen Games with sideways ads before... hence my idea of doing it :)

    Your new version works a treat! Great timing and great customer support!

    Cheers :)
     
  38. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    About the Gamekit plugins with bluetooth. Is there a way to use the Unity Editor as a bluetooth client for dev purposes?
     
  39. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The only way to test GameKit sessions is on the actual iDevices.
     
  40. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Prime - you really need your own forum. :)
     
  41. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    If the chatter gets too loud I'll put one up for sure. :D
     
  42. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    [MODE IRONIC ON] I want this guy to stop making plugins, all the real programmers don't need this amateur stuff, a real man do his own programming code and don't trust the code from third parties
    [MODE IRONIC OFF]

    Damn, the gamekit plugin looks really nice, now I need to think in any game to use it ;)
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Eskema, I've got the game idea for you already. Take your tutorial series with the cute little airplanes and let the white ones (the bad guys) be controlled by GameKit-connected players.

    It actually is pretty fun hooking up an iPad, an iPod touch and an iPhone and playing around with GameKit. The only downside is that I only have 2 hands and I havent learned to use my iPad with my feet yet...
     
  44. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    Damn, really nice idea, start over in C# (buaghh!!!) and add multiplayer game with your plugin, I will do it (totally serious here)
     
  45. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Hey Prime, Are you digging into Game Center now?
     
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    I started perusing the preliminary docs, downloaded the WWDC videos and have been scanning the bugs on the Apple dev forums.
     
  47. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Cool! So what do think? When can you have it ready, sometime tomorrow afternoon? :)
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Tomorrow? I'll have it ready in 15 minutes :eek:

    There is a LOT of content in there. Check out the GameKit section of the API docs for a sampling of the added API. There are actually even more API's available than that for 4.1. I finally found the preliminary documentation PDF as well so I can start reading that monster too.
     
  49. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Can we get the ability in the MobClix plugin (Unity side) to set the frequency of add rotation? Seems my ads never rotate.
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Seon, sure thing. An update will go out tonight with the ability to set the refresh rate.
     
Thread Status:
Not open for further replies.