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. seon

    seon

    Joined:
    Jan 10, 2007
    Posts:
    1,441
    Wicked :)
     
  2. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    Gotta say your plug-ins look great. Really hope you build a "Game Center" plug-in for easy integration of Leaderboards, Achievements, etc..
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Thanks Matt. I work hard on the Objective-C side to make sure you don't have to :)

    Game Center is in the works. Expect leaderboards, achievements and player information to roll out pretty soon. After that, multiplayer, matchmaking, invites and all the related goodies will be next on the Game Center hit list.
     
  4. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    Fantastic! 8)

    That will be a day one purchase for me.
     
  5. BigRedSwitch

    BigRedSwitch

    Joined:
    Feb 11, 2009
    Posts:
    724
    Hey - first off, Great Job! :)

    But I have one question, before I start going crazy with my credit card like a monkey with a machine gun...

    Do you have any descriptions of the functionality of your plugins I could read before I buy? I'd like to know exactly what is and isn't possible with stuff like the gamekit plugin etc, but I can't see any description of that on your site...?
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @S7ARBVCK, in most cases you get all or almost all of the functionality Apple provides. For a list of what each plugin exposes, check the docs here.

    Once the Game Center plugin is wrapped up I will get a cleaner site up that better explains what's in each plugin.

    If you have any questions feel free to either ask here (if it is useful for others to know), PM me or shoot me an email.
     
  7. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    Hi ,

    thanks for all that nice plug-in :), specially for ObjC idiot like me ^^.

    well I am using your DeviceMotion plug for a project I am working right now, and well things work good so far but I get an issue when I change scene and want to re-activate the gyro.

    So what I just tested is your sceneTest, and I have a simple menu

    first time I get in the scene test everything is ok no prob, then get back to scene menu and reload the sceneTest , when i try to start DeviceMotion the app simply freeze and I am not able to do anything.

    this behavior only happens if i start the device motion in a scene then try to get it work in another scene.

    as I am using your testScene I also use your code for it as it is , so Do i have set / code thing differently in that case, or do something in particular when i leave the scene ?

    Thank you !
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @glyomu, Good to hear you like the plugin! I look forward to seeing what you produce with it.

    You have two options for switching scenes.

    1. Call stopDeviceMotion before switching scenes then call startDeviceMotion in the next scene when you are ready to use the gyro again (preferred method)
    2. Set the GameObject that has the DeviceMotionManger.cs script attached on it to not be destroyed on scene changes
     
  9. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    hehe thanks that was sooo fast reply i ever seen :)

    ok well I am going to check that then.

    thanks a lot ;)
     
  10. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    107
    iAd was a breeze to install and activate. Took just five minutes - fantastic!

    One minor issue though - how do I know if a banner is being displayed? When the iAd is active, I really should rearrange the layout of the screen. However, since I have no way to tell if the iAd is active - I basically have to leave that portion of the screen blank even if the iAd is not active.

    There is really no need to query the rect of the iAd - just a flag I can query on every frame to arrange the layout to maximize the screen estate.

    ps.
    I bought all of your plugins (except the mic plugin) - they are all great and integrate very easy!
     
  11. voidmaystorm

    voidmaystorm

    Joined:
    Jun 11, 2009
    Posts:
    89
    hi,

    first of all, congrats, that will save a lot of time to many of us!

    two questions, though:

    iAd is said to require is4.0 or higher.
    ääh - why does it run on the iPad?
    it does - right?
    (thats actually a general question not related to your plugin, but i m sure somebody knows ;-)

    second, if i integrate your plugin and run the game on a pre 4.0 device - what will happen then?
    errors, or will the place for the ad be blank, or will the game grab the reserved place?

    sorry for these iAd-beginners-questions...

    greetings,
    thomas
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ChezDoodles, thanks for the feedback and kind words! As for the iAd plugin, I'll add a new optional event that will get fired when an ad shows and when it hides. Expect an update is a few hours.

    Update: the updated plugin is now available with a new event that will fire when the iAd banner is hidden/shown.
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @maystorm, iAds will not run on iPads at this time. When iOS 4.2 comes out next month the iPad will be getting iAds. The plugin is designed to fail gracefully on pre 4.0 devices as well. If run on a pre 4.0 device it just won't display an ad.
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    GameCenter plugin is officially live! Get it while its hot! For more information, see this thread.
     
  15. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Wow! How do you find the time?
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Well, for starters I haven't had the luxury of much sleep for almost 3 weeks :eek:

    Once the multiplayer portion of the GameCenter plugin is done I intend to get some sleep again and maybe one day get back to making my game!
     
  17. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    Another plugin request if you're still taking them:

    A way to determine the user's language setting AND/OR a way to determine the user's country.

    Use case would be:

    // if user's language setting is not English, do something.

    OR

    // if user's location is outside of the USA, do something.
     
  18. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Hi Prime,

    I'm trying to play audio from a file in assets/Raw directory but I get a file not found error. Is it possible


    Code (csharp):
    1. /var/mobile/Applications/4D6D1A0A-9BFB-4701-AF17-2AB122D24CD3/Bobblehead.app/Data/Raw/sound.wav exists.
    2.  
    3.  
    4. failed to prepare audio player: The operation couldn’t be completed. (OSStatus error -43.)
    Is it possible to play using the AVPlayer from that directory?
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @cheezorg, I have been getting that request often but it isn't quite enough for a whole plugin. What I am thinking is that I will take all the little requests and make an Etcetera Plugin. So far what is on the list is:

    - Current language
    - Localized strings (tap into the the iOS localization to get strings for all supported languages)
    - Native loading indicator/spinner for level loads

    It still isn't quite enough for a plugin but with a few more little suggestions I will get it going.


    @kenlem, the assets/Raw directory isn't a real directory once your app is built so you can't get to the data with a file path. You can, however, include the file in the generated Xcode project by just drag and dropping it in. That file can be played with the prepareToPlayFileAtPath method. The path would end up being something like: /var/mobile/Applications/4D6D1A0A-9BFB-4701-AF17-2AB122D24CD3/Bobblehead.app/sound.wav
     
  20. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    Sounds great, other ideas for this could be - launch mail app within the app, save screenshot to the camera roll, show embedded web view in a window within the Unity app, show Apple display pop-up.

    Not sure how large or small these might be to add to an etcetera plugin, or how many are already in Unity and I just missed them.
     
  21. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Thanks for the suggestions. Those are some good ones. They are going on the list.
     
  22. cheezorg

    cheezorg

    Joined:
    Jun 5, 2008
    Posts:
    394
    You are a machine. :D
     
  23. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    This thread is a goldmine. :eek: I will grab the iAd and GameCenter plugin when my game is near completion for sure. :D

    Bookmarking your website...
     
  24. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    One little feature like that would suit my previous suggestion of offering a plugin for free. There is a massive difference in take up between free and any amount of money, but being able to try the process helps a lot, particularly for those who are not expert in Unity.

    I have already decided to go for the Game Center and Mobclix plugins, but anything that helps your success means more plugins for the future.
     
  25. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    I strongly disagree. Prime31 has 5 (five!) plug ins that are $5 each (iAd, Mobclix, DeviceMotion, MediaPlayer, CoreLocation). Heck, in UK currency, that's 3.24 Pounds. Why exactly should he give away his hard work to anyone that can't be bothered to put a crowe bar in his wallet and produce $5 dollars?

    I understand your proposition that by making a plug in free, more users will buy his other plug ins but I don't agree with it. While that may sound like a good marketing idea, in the real world, the result would probably just be an increase in support requests from lazy, ignorant wannabe programmers. While making a free plug in my result in more users, I don't think it would result in more sales.

    I've run a web shop for about 7 years now (http:www.speechchips.com) and realize that support is one of the major costs of selling something. Once the fun part (the engineering) is done, the real work begins.
     
  26. nikemerlino

    nikemerlino

    Joined:
    Jul 2, 2008
    Posts:
    66
    I have bought CoreLocation.
    It works fine with my iPhone3GS but I can't compile for iPad. Is it my problem?
     
  27. deadbug

    deadbug

    Joined:
    Sep 9, 2009
    Posts:
    165
    Hey there,

    Have a storekit question.
    I have the prime 31 plugin and have things set up in itconnect. I can run my app and get product data works and returns the correct values.

    however, purchase product, shows the right values but when i click buy it says "unknown error occurred" on the device and this is what is in the debugger.

    2010-09-07 16:15:29.999 x101hd[60:207] StoreKit: in the process of purchasing
    -> applicationDidResignActive()
    -> applicationDidBecomeActive()
    -> applicationDidResignActive()
    2010-09-07 16:16:05.502 x101hd[60:207] StoreKit: error: Cannot connect to iTunes Store
    -> applicationDidBecomeActive()
    purchase failed with error: Cannot connect to iTunes Store

    (Filename: /Applications/buildAgent/work/1441ce903e456852/Projects/../Runtime/Export/Generated/BaseClass.cpp Line: 2550)

    feels like I am so close!?
    Anyone have any ideas?
    thanks,
    CP
     
  28. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    did you create a test sandbox account?
    you can't buy from your itunes account under which this provision was created for example
     
  29. T-Strijker

    T-Strijker

    Joined:
    Apr 12, 2010
    Posts:
    26
    5 dollars for a plug-in's like this very cheap and prime31 can easily ask 50 bugs for plug-ins like these.

    But I'm having problems white the DeviceMotion plug-in. Importing it in to the unity project works fine. But when i build it to the iphone i get about 12 errors. The errors say:

    "__stopDeviceMotion", referend from: __stopDeviceMotion$now_lazy.ptr in registerMomoModules.o
    (maybe you meant: __stopDeviceMotion$now_lazy.ptr)

    i get this error for every method that's in the plug-in. Can please help white this problem.

    P.S. Sorry for the poor English.
     
  30. nikemerlino

    nikemerlino

    Joined:
    Jul 2, 2008
    Posts:
    66
    Now it runs for iPad if I comment this:
    //return [CLLocationManager headingAvailable];
    in CoreLocationManager.mm
     
  31. deadbug

    deadbug

    Joined:
    Sep 9, 2009
    Posts:
    165
    thanks dreamora,

    yup i have a sandbox account.
    it seems like it is fixed now though. yeah!

    im not sure if this was the problem. but i created a second sandbox account that connected to the swedish store. i am operating in sweden but my other account was connected to canada store.

    not sure if that was ti but works now! sweet!

    thanks for your help.
    Chris.
     
  32. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    $5 is a small amount, however that is irrelevant. The big gap is between free and $0.01. Once someone has to pay any amount to someone they don't know for something they are not certain about, you get a big barrier.

    But I do take your point about support issues. There are people asking for help on the Unity forums who appear to have made little effort to find out the answer for themselves (which makes it harder to get answers for the people who have genuinely tried).
     
  33. giyomu

    giyomu

    Joined:
    Oct 6, 2008
    Posts:
    1,094
    look on prime website for build and run eventually , it can happens , well it happens to me when you build doing a replace while having Xcode open.

    otherwise verify that you have permission on your mac to run perl script ( this concern the postprocessbuild / chmod things )

    this can be an issue also
     
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Moonjump, as Kenlam mentions free is never free especially if support is as important to you as it is to me. I believe that great support makes a HUGE difference and I strive to respond to all emails, forum posts or even snail mail as fast as humanly possible. Supporting free products means there are a lot more of them out there (because everyone likes the free pricetag) and you get no return on investment. Besides that, source code (covering FIVE languages no less: C, C#, Obj-C, Perl and AppleScript) at a cost of $5 is way, WAY underpriced. You can almost consider it free at that price :D

    I do have a lot of open source code out there though if anyone wanted to see what the code quality was: open source Unity code


    @nikemerlino, I will have to tiny change for iPad until they unite in iOS version next month. Shoot me an email through the contact form and I'll email you a copy of the script right away until I can update the package.


    @deadbug, StoreKit is an exercise in patience :eek: Some of the things that worked for me was: waiting 24 hours after adding products to iTunes Connect and logging out of your iTunes account on your iPhone often (Settings -> Store -> Sign Out). The Sandbox server has had some ups and downs and the error is always the same you received so it could be the Sandbox being down as well, hence the patience part.


    @T-Strijker, it sounds like either not all the files were imported from the unitypackage or they weren't copied to the Xcode project. Make sure there are 4 Obj-C files in the Editor/DeviceMotion folder and that they got copied to the Classes folder in Xcode. I bet you are running into the bug I mentioned on the top of this page.
     
  35. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Yes, I had taken on board Kenlem's point about support issues and understand why there will be no free versions.

    And the $5 plugins are a very reasonable price, just a little disappointed the one I want, Game Center, is 11 times the price. But I hope it will provide me with more than that in value.
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Moonjump, look at it this way: if your time is worth $27 per hour (and I KNOW it's worth more than that) and it would take you more than 2 hours to make the plugin yourself then it is a bargain.

    I can assure you it will take a LOT longer than 2 hours to make the plugin. There are already 16 methods exposed and 21 events and that doesn't even include multiplayer yet!
     
  37. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    What's the differnce between GameCenter mulitplayer and GameKit multiplayer?
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Kenlem, I'll just ramble off the differences and if you want clarification just ask. GK will refer to GameKit and GC to GameCenter. They are very, very different. The only thing that they have in common is that they connect 2 ore more devices together.

    GK works on iOS 3.0 and above
    GC works on iOS 4.1 and above

    GK is peer-to-peer or (advanced) client server on local WiFi or Bluetooth supporting up to 16 devices
    GC is online and/or WiFi Bluetooth (that is hidden by the API so you will never know) that supports up to 4 players

    GK has simple, one channel voice chat
    GC has multichannel voice chat (think 2 teams with separate frequencies)

    GC allows player classes and categories
    GC allows players to start matches from the official GameCenter app
    GC allows players to send push notifications to start matches (invites)
    GC has very complex multiplayer (if you choose to use it) features such as player attributes and categories (see here for more info. The 1st multiplayer section has the information. Disregard the Peer-to-Peer. That is GK)

    That is all I can think of off the top of my head but I'm sure there is more.
     
  39. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Not sure if this has been mentioned... Would you consider doing a AdWhirl plugin similar to mobclix, but Admobs version. It now supports iAds :)

    - Matt
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @mehware, my to-do list is literally ordered by the number of requests any plugin receives so if the people want it the people get it.
     
  41. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Awesome, keep it up... your a machine!
     
  42. Deleted User

    Deleted User

    Guest

    I could use a photo-to-texture plugin, as long as you're taking requests. And I'm releasing all my apps as universal - I'm under the impression all the Prime31 plugins will compile fine in that case but fail gracefully on the iPad? (it doesn't even need to fail gracefully, just build - I can do the device detection in Unity and avoid problematic calls)
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Photo to texture sounds like a good one to be put in the general, Etcetera Plugin. All the plugins use feature detection to fail gracefully and many also have isFeatureAvailable() methods.
     
  44. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,047
    @Prime31

    any chance you could go back and review my suggestion for

    2) SimpleGesure recognizers ( longpress, tap, double tap, triple tap), swipe, rotate, pan, pinch)

    :)

    iByte
     
  45. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Are the Mobclix docs current? I just bought the MobClix plugin. (YAY).

    I put my App ID in that one file and i am using the mobclix prefab in my scene.

    It says there is a initMobclixWithID like function but thats not in mobclix binding?

    I don't think MobClix is initializing/starting.

    I don't see anything in that gdb log, any ideas?

    - Matt
     
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @mehware, you were correct. The docs were not updated to the lastest version. I just updated them now. Once you add your application ID into the file just call:

    Code (csharp):
    1. MobclixBinding.start();
    2. MobclixBinding.showBanner( true );
    Ensure that the application ID got copied to the Info.plist file as well. If you got the 'Mobclix successful' message it probably was. Let me know if that does the trick for you.
     
  47. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Thats exactly what I have, I have GameKit plugin too along with OpenFeint. I got the success message for mobclix, but don't see it trying to poll for an ad. I have done mobclix before in the past so I know my admin is setup right. I do have the app id for the mobclix app in the info.plist

    I am using your mobclix prefab in my menu, and nothing is served.

    Probably user error, but any ideas?

    - Matt
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Just to be sure, try a real quick import of the Mobclix plugin into an empty project. That will ensure that your app ID is valid. If it is working, there is a possibility OpenFeint might be conflicting with it. I haven't looked through OF in detail, but I did see that it uses a category on AppDelegate which can have unforeseen consequences. The Mobclix and GameKit code is fully isolated by design with no use of categories/overrides so they will work in all foreseeable situations.
     
  49. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    well I do see activity in the mobclix admin that the app was opened four times. So something is starting up. Also.. when i had my banner on the bottom that was overlaid over a text guibutton it wouldn't let me touch the button so something is being overlaid but invisible.

    Now i moved it to the top where it should have been and than I can touch the button because obviously its not covered up.

    I have iad setup but i made a house ad and set it to 100% house ad.

    I feel like something is there but it invisible and does not react to touch.

    I feel like Open Feint could have interference.

    Edit: Pressing my scores button does not Open up the open feint dashboard, they are def interfering!
     
  50. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Another suggestion for a plugin, either as a standalone or as part of your future Etcetera Plugin, as it is hopefully quite simple.

    A pop-up box to allow the user to rate the game on the App Store.
     
Thread Status:
Not open for further replies.