Prime31 Unity Plugins Officially Live! [CLOSED]

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

  1. vvloo

    vvloo

    New Member

    Joined:
    Jan 26, 2010
    Messages:
    25
    It's very convince for me to implement all the apple supplyed function in Unity3D now, Thank you very much!
  2. ratrodstudio

    ratrodstudio

    Member

    Joined:
    Apr 3, 2009
    Messages:
    211
    I m having that issue too. My game is set to landscape left in Unity. (Using final 3.0)

    I have the prefab added, I unchecked landscape, bottom and autorotate. So the ad should be located on the top while in portrait mode.

    However, for some reason the ad always appear on top, while in landscape mode. How do you get it to go on top, while in portrait mode? I want to lock it in that position.
  3. maglat

    maglat

    Member

    Joined:
    Jul 9, 2010
    Messages:
    97
    @Prime31
    I'm sorry to say, but I exactly have this problems, too.
    I also set my Default Orientation = Landscape Right and after rotating the screen.
    It would be cool if you could check the iAd plugin again.

    Thanks

  4. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @maglat, I just got back from a short weekend getaway and what I am currently seeing is that Unity 3 RC 3 and 4 had a major, show stopping rotation issue. Supposedly, RC 5 (which is the final, release version) has partially fixed the issue. I am downloading the final release right now and will see what the problem might be. From the forum posts I am seeing on the beta list it looks like landscape right/left is backwards which would confirm what you are seeing.
  5. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @greaterfool, the Media Player plugin just got an update to support iPad. It turns out, the media picker must be displayed in a popover controller or the bottom 1/4 of the view will not receive touches. I believe this is a bug and I will open a case with Apple when I get a chance. I invite you to do the same. The more the merrier :)
  6. Kripto

    Kripto

    New Member

    Joined:
    Feb 12, 2007
    Messages:
    119
    Purchased and installed your iAd plug today. After setting up the app in iTunes connect, I got it to serve up the test ad successfully many times in a row. Now it has stopped and will no longer serve up the test ad. Any ideas?
  7. Kripto

    Kripto

    New Member

    Joined:
    Feb 12, 2007
    Messages:
    119
    Here are the errors Xcode throws at me when I try to build with your iAd plug in-

    "__iAdInitAds", referenced from:


    __iAdInitAds$non_lazy_ptr in RegisterMonoModules.o


    (maybe you meant: __iAdInitAds$non_lazy_ptr)


    "__iAdFireHideShowEvents", referenced from:


    __iAdFireHideShowEvents$non_lazy_ptr in RegisterMonoModules.o


    (maybe you meant: __iAdFireHideShowEvents$non_lazy_ptr)


    "__iAdRotateToOrientation", referenced from:


    __iAdRotateToOrientation$non_lazy_ptr in RegisterMonoModules.o


    (maybe you meant: __iAdRotateToOrientation$non_lazy_ptr)


    ld: symbol(s) not found


    collect2: ld returned 1 exit status




    Any idea what I can do to remedy this?
  8. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Kripto, it sounds like the post process script isn't getting run. Be sure to do the following:
    - make sure Xcode is closed
    - click Build in Unity (not build and run) the first time

    Let me know if that does the trick for you.

    As for test ads not showing up, be sure to check the logs. The test server sends failures on purpose mixed in with legit ads and the plugin will drop logs letting you know what's happening.
  9. deadbug

    deadbug

    New Member

    Joined:
    Sep 9, 2009
    Messages:
    165
    hey there,
    we tried to use the prime 31 store kit plugin and followed tutorial.
    ... but it seems we failed. This is the response they gave us.

    Using Store Kit, your application should send a request to the App Store to retrieve
    a list of product identifiers that are currently available for purchase. Once your
    application receives this list, it should only display those products that are
    flagged as available for purchase. Your application is not making this request to
    the App Store and is instead displaying products that are returned directly by your
    server.

    Is there a good tutorial out there that we could try?
    thanks,
    CP
  10. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @deadbug, I highly recommend reading through the docs with special attention to the links on the top that will take you through Apples documentation. The plugin makes everything very, very easy compared to the guides but it is very important to understand the concepts so that you know how StoreKit (in app purchase) works. That being said, the sample scene that is in the testSupport folder has all the methods demoed that you will need. The first step you will want to take is to get the product information using:

    Code (csharp):
    1. StoreKitBinding.requestProductData
  11. Kripto

    Kripto

    New Member

    Joined:
    Feb 12, 2007
    Messages:
    119
    I resolved my iAd issue and the plug in is working perfectly. Thanks!

    Using your audio plug in, can I record the audio output of a Unity game while it plays?
  12. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @Kripto, good to hear all is working! The AudioRecorder plugin will only record audio from the microphone.
  13. foyleman

    foyleman

    Member

    Joined:
    Feb 19, 2009
    Messages:
    83
    Sorry for continuing an already long long thread, but I don't know where else I can post and get noticed in relation to Prime31 and his great plugins.

    I have installed the Game Center plugin. I've got it running via Unity 1.7. When I launch it on my device, I see **sandbox** (in portrait mode only btw).

    I have a game setup in itunes connect. Game Center is activated and I setup a single leaderboard category for testing.

    I can't seem to test scores. Should I be able to?
    When I post a score, I see "retrieveScoresFailed:"..."error communicating with the server".

    What can I do to resolve this?
  14. ParaLogic

    ParaLogic

    Member

    Joined:
    Aug 19, 2010
    Messages:
    166
    I've been trying to get iAds and Mobclix to work together all day, but I'm afraid I have to give up on trying any longer. I totally lack the Xcode experience and can't seem to get it to work.

    The project builds fine, but when I run it I get the error:
    I think the two plugins are not getting along, I've tried a lot of things, but no results so far...

    If you have a solution for this, that would be super. I'd love to show iAds in-game and Mobclix in the menu's.
    Last edited: Sep 30, 2010
  15. IPete

    IPete

    New Member

    Joined:
    May 15, 2008
    Messages:
    414
    Ok - I just bought iAd plugin and seriously in 7 minutes I have a test advert on screen serverd by Apple - brilliant stuff guys congrats.

    I will be purchasing more of these.

    Unity iPhone Basic 3.

    P.
  16. ratrodstudio

    ratrodstudio

    Member

    Joined:
    Apr 3, 2009
    Messages:
    211
    The issue for me, is you have the auto detection of orientation in there to set the ad.
    My game is using the landscape mode and I want to use a Portrait top ad. I have to manually change the adaptor code in the xcode script to get this to work.

    Why do you need to auto detect which orientation the game is using?

    If we specify "uncheck lanscape", "unchek bottom", "uncheck auto orientation" it should automatically use a portrait top ad no matter what orientation the game is using.

    Its the same issue with the iAd plugin and Mobclix.
  17. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @ratrodstudio, does Apple even allow iAds to be displayed sideways? I can't imagine that would get through their review process.
  18. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @IPete2, glad you like the plugin! A lot of work went into making them as simple as possible to integrate.
  19. ratrodstudio

    ratrodstudio

    Member

    Joined:
    Apr 3, 2009
    Messages:
    211
    It is allowed, I have 2 popular Lite version with ads running side way. They both been approved without any problems.
  20. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @ratrodstudio, in that case, I'll put that on the list for the next update.
  21. JamesMobot

    JamesMobot

    New Member

    Joined:
    Jul 8, 2010
    Messages:
    164
    Ok, so like usual i have to ask what probably seems obvious to most.

    iAds fires no problem. But, it continues onto the next scene.
    How do i shut it off for a scene. Or, for that matter only turn it on for a scene. Is there a nice little true or false option thingy.

    thanks
  22. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @RobotsVsWizards, this one was a bit odd but Apples iAd banner doesn't have a mechanism to pause it so I didn't add a way to hide it. I didn't want to hide the ad view and have it still receive ads and then mess up the CTR for anyone.
  23. JamesMobot

    JamesMobot

    New Member

    Joined:
    Jul 8, 2010
    Messages:
    164
    So, you gotta leave it on the entire game?
    Thats a bummer.
    Ads are fine on the title screen but, I certainly couldn't have a banner over my gameplay. Not on my current project anyways.

    I have seen games with ads only on the title screen.

    Is there a way or command to basically just kill it as opposed to trying to enable it, disable it, etc?
  24. Dreamora

    Dreamora

    Member

    Joined:
    Apr 5, 2008
    Messages:
    26,586
    you can just release the window thats used to get it over the unity view and create it again as required.

    should be rather trivial
  25. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @RobotsVsWizards, I'll add methods to destroy/create the banner in the next update
  26. chips

    chips

    Member

    Joined:
    Nov 30, 2007
    Messages:
    135
    Hello there Prime,

    I have installed the Game Center plugin on Unity 1.7 and unfortunately when I open the GameCenterMultiplayerTestScene and the GameCenterTestScene absolutely nothing is loaded into the scene. I've followed the instructions of the video " Prime31 GameCenter Plugin Setup with Unity 3 Beta 7 ".

    Am I missing something?

    Thanks!
  27. j.robichaud

    j.robichaud

    Member

    Joined:
    Aug 26, 2010
    Messages:
    31
    We recently purchased two of your plugins and they are really well done.

    We are having a big problem though specific for our situation. :(

    We are working on a multiplatform game and the scripts will also run when making PC and Mac builds.
    Xcode opens and the build will not complete until we manually close Xcode twice. This is very problematic for us, especially that most of our team develop on PC. We have not yet tested on a PC yet but if it causes issues on a Mac, it should be worst on a PC.

    We use the same code and assets on all platforms. Except we disable some features on the platforms that are not supporting them.

    It would be really appreciated if you could give us a few hints or a patch in order to resolve this.

    PS: We also do automated clean builds. We had to disable the prompt saying the plugin installed properly for iPhone build to work (was not a big deal). For PC and Mac builds, we have to fix the script execution first.
  28. minevr

    minevr

    Member

    Joined:
    Mar 4, 2008
    Messages:
    1,009
    for Pc?delete it....
  29. JamesMobot

    JamesMobot

    New Member

    Joined:
    Jul 8, 2010
    Messages:
    164
    Thanks!

    Looking forward to it!
  30. j.robichaud

    j.robichaud

    Member

    Joined:
    Aug 26, 2010
    Messages:
    31
    Good and easy solution for PC, thanks. I deleted PostProcessBuildPlayer file and it seems to be enough to build successfully on the Mac with non iPhone builds.

    I found another solution that will work on Mac on any build type, the build type is received in the second arguments.

    I added the following code right after the #!/usr/bin/perl in each of the PostProcessBuildPlayer_PLUGINNAME
    Code (csharp):
    1. if ( $ARGV[1] ne "iPhone" )
    2. {
    3.     exit;
    4. }
    Prime31, you are free to add that in your plugins if you want.

    I will look at what could be done for PC tomorrow.
  31. j.robichaud

    j.robichaud

    Member

    Joined:
    Aug 26, 2010
    Messages:
    31
    Finally the build script does not cause problem on PC, good to know.
  32. ravinder

    ravinder

    Member

    Joined:
    Aug 25, 2010
    Messages:
    148
    Hello Primer31,
    We have purchased your plugins but i am not able to understand how to use them.
    I am not able to record audio although rocket audio file has been playing fine. But how to record audio on my iPod Touch.
    Can you provide any link to any video describing how to use your plugins?
    Thanks
  33. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @ravinder, have a look at the file in the testSupport folder for example code. There is also full documentation available here.
  34. deadbug

    deadbug

    New Member

    Joined:
    Sep 9, 2009
    Messages:
    165
    hey there,
    I have the prime 31 storekit plugin working fine. Great plugin.

    Yet i have a problem. I get the price when i get product info yet, it only returns a number not the currency.
    Can someone tell me how i can retreive the amount. ie SEK, or dollar ?

    Thanks,
    Chris
  35. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @deadbug, I'll see what I can dig up in Apple's docs about getting the currency type. They must have an API available somewhere in there.
  36. foyleman

    foyleman

    Member

    Joined:
    Feb 19, 2009
    Messages:
    83
    Using Game Center Plugin, is there an interpreter built in for Unity Networking? I am using Unity networking now (@RPC, etc). Do I have to reconstruct my networking methods and manually match user IDs between clients to determine their positions on screen as well as other information about the player?
    This multiplayer game is like a deathmatch fps style game.
  37. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @foyleman, there is interpreter built in nor is one required. Are your plans to use GC for multiplayer or Unity? If you use Unity for multiplayer there is a way to use GC for matchmaking but you will have to check the GC docs for the details. My focus was on full API coverage so I didn't look into self hosted games at all.
  38. foyleman

    foyleman

    Member

    Joined:
    Feb 19, 2009
    Messages:
    83
    My plans were to use GC for multiplayer. But based on what I saw in the API docs, GC lets me send data back and forth between the players. However, this data isn't necessarily understood the same way that Unity handles it now. At least that's what I am trying to figure out.
    Unity automatically handles the data calls between connected clients. I currently either let NetworkView handle the unreliable data transmissions or manually send out RPC calls for occasional reliable data calls. Unity then does the sending and receiving for me.
    GC doesn't appear to know that these calls are occurring which is why I asked if there was an interpreter.

    I'd like to know if anyone else here has moved from Unity networking to GC networking and what they went through to make it all happen. I'm working with UDP connections, although I don't think that matters in the questions I have posed.
  39. scinfu

    scinfu

    New Member

    Joined:
    Oct 23, 2008
    Messages:
    400
    hi ... i have this problem with iAds , yhe game can not load the banner if i use i specific provisioning profile like this com.MyCompany.NameGame , but if i use a provisioning profile with wild card (com.MyCompany.*) i can see the test bunner .

    this is the error in the console .

    Help Please
  40. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @scinfu, it is most definitely an issue with you app setup. Check and double check everything in iTunesConnect all the way down to your games bundle Id and provisioning profile.
  41. foyleman

    foyleman

    Member

    Joined:
    Feb 19, 2009
    Messages:
    83
    Using Game Center, is there a way to tell if the Game Center GUI is closed? I don't see anything referring to when Game Center is closed... which I believe is not the same as logging the player out.

    Or a way to tell if game center is currently open so I know when it's closed.

    I see that my issue is related to timescale = 0. See, I have a menu open and timescale = 0 so the game doesn't run in the background. However, GC can't open unless time is running.
    Last edited: Oct 6, 2010
  42. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @foyleman, the Unity side of things is paused while the GC GUI is up. It gets unpaused when the GUI is closed.
  43. foyleman

    foyleman

    Member

    Joined:
    Feb 19, 2009
    Messages:
    83
    Unfortunately I am launching this from a menu that has timescale already = 0 so the game is paused. And while the game is paused, GC will not open. Therefore I have to unpause the game to open GC but then I want to re-pause the game when GC closes.

    thoughts anyone?
  44. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @foyleman, well, thats a tricky one. In your menu scene you will always be able to know if you are running by simply checking the timescale. You may be able to try something like:

    - unpause game by setting timescale > 0
    - open GC GUI
    - check in each frame of timescale is > 0 and if it is, set it to 0

    That *might* work.
  45. kenlem

    kenlem

    Member

    Joined:
    Oct 16, 2008
    Messages:
    1,447
    Hey Prime,

    What's the status of the Misc plug in? I could use that in app web browser. :)
  46. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @kenlem, I think I have answered that question a thousand times today :) The official response is that it is coming along well and it keeps growing but it will not be gaining any more features as of yesterday. Every new feature request will have to wait for Ecetera 2 - The Sequel. So far, the following features are either done or almost done (nothing is documented yet though):

    - push notification support (using Urban Airship on the backend or you can use your own server)
    - photo support (either using the camera or from the photo library)
    - rate this app popup dialog
    - native loading indicator for scene loads (spinner, spinner + bezel, spinner + text, etc)
    - email composer
    - web view
    - standard, Apple UIAlertView access
    - custom alert view that prompts for 1 or 2 lines of text
    - current language/locale
    - localized string support

    There are also a few items that aren't yet done that may or may not make it in:

    - unzip support
    - save game screenshot to the documents directory programmatically
    - multisampling toggle (anti aliasing)

    There is no release date just yet but as you can see it is coming along quickly. It probably wont be more than a week or so but dont quote me on that.
  47. jingato

    jingato

    Member

    Joined:
    Jun 23, 2010
    Messages:
    274
    That sounds pretty sweet. I cant wait!
  48. scinfu

    scinfu

    New Member

    Joined:
    Oct 23, 2008
    Messages:
    400


    SOLVED

    Thank you
  49. samc.work

    samc.work

    New Member

    Joined:
    Aug 18, 2010
    Messages:
    10
    Hi Prime31,

    Do you have any plan to support camera raw data function plugin
    so that it could be easily to do AR inside Unity3 ?

    Thanks,
    Sam
  50. prime31

    prime31

    Member

    Joined:
    Oct 9, 2008
    Messages:
    6,424
    @samc, AR and unity are a combination that at this point isn't possible. There is no way to make a unity view have a transparant background so you cant put a unity view over the camera view. The only other possibility is passing back from native to unity one image at a time then putting it in a texture2D and that is way too slow.