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
    @maglat, I regret to inform that you aren't the first with that idea :( doesn't Unity networking already handle that out of the box? We were considering a Bluetooth version for iOS to Android communication now that iOS 5 gives access to the BT stack but nothing is final yet.
     
  2. wiserd

    wiserd

    Joined:
    Jan 14, 2009
    Posts:
    47
    Prime31 - what are the functionalitiy limits on webview. I was told "Anything you can do on a website can be done in the webview." Popups seem to be a no-no. Someone else on our team says "I found out tonight that the web view plugin does not seem to support video at all..."

    Are all these actual limitations? Or are we missing something?

    Thanks for any info
     
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
  4. wiserd

    wiserd

    Joined:
    Jan 14, 2009
    Posts:
    47
    @Prime31 - I'm publishing for Android, sorry, not iOS. We're unable ot access YouTube via the webview.
     
  5. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Aha. Being in the iOS forum had me thinking you were on iOS :) I am on a mobile at the moment so I can't link to it but the class used is WebView for that one. I am not aware of any restrictions but I do know a lot of things need to be asked for manually with Android. The plugin does ask for a bunch including JS, zoom an others.
     
  6. bzouchir

    bzouchir

    Joined:
    Aug 25, 2009
    Posts:
    16
  7. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bzouchir, see other thread
     
  8. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    Hey Prime31,

    Any ideas on when GetPixels will start working again?
     
  9. zanearn

    zanearn

    Joined:
    May 7, 2011
    Posts:
    25
    Hi prime31,

    This is about GameCenter Plugin,

    When I got two players and hit 'PlayNow', is there any will be fired?

    I tried 'matchmakerFoundMatch' and 'playerConnected' but seems these not work.

    Need your help
     
  10. iguana_02

    iguana_02

    Joined:
    Apr 22, 2011
    Posts:
    211
    Hi Prime, sorry i got a small problem and searcing on this forum didn't work quite well...

    Alert pop up with two buttons , YES and NO.

    If i put an event into the alertButtonClicked listener obviously will execute it if i click YES or NO.
    How can i listen to the NO (cancel) button?

    Thanks.
    Iguana
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @arn, there are events for when players connect and when the matchmaker finds a match. Play with the demo scene and watch the Xcode console to see all the Events that get fired and when they are fired.


    @iguana, the event will tell you the button that was clicked.
     
  12. android_dev

    android_dev

    Joined:
    Jul 9, 2011
    Posts:
    19
    @prime31: does Etcetera support taking a screenshot from an augmented reality app (or I can use texture2d to save an image to the document folder) and transfer the image to the photo gallery (on ipad and/or android)?
     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @android_dev, the Android Etcetera Plugin does not support saving to the photo album but the iOS one does.
     
  14. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Heya,

    I am using the Google Analytics plugin and am having trouble. I am not sure if this is the right thread, so please direct me as appropriate.

    The plugin integrated fine, I added the manager instance class, and I call it in my code. When I turn on debug, it shows that everything was successful. I pulled the google account info right off of the Google Analytics page and I see lots of traffic information from my normal web traffic (www.goodgamesbydesign.com), but I never see any events show up from my app. I take that to mean that my codes are correct, but there's something preventing google analytics from accepting the request from my app. Is there something else that could be a problem?

    As a note, my site does not have the verification stuff (ie, if you try to setup a mail account, it gives you one of those, 'this isn't a trusted site' warnings). Does this matter? Is there anything else I should check?

    Summary: The integration was simple, the debug messages say everything is successful. What else should I look for?

    Gigiwoo.
     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gigi, double check your GA code in the prefab and when putting in the domain be sure to just include the domain (not the http://).
     
  16. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    I use the website, without the "http://". Hmm... is the code the 'Web Property Id' which is something like "UA-########-#" or is it the Profile Id, which is something like, "########"? I used the profile id, but will try the web property id tonight.

    Gigiwoo.
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gigi, it should start with "UA"
     
  18. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Hi, Prime31,

    Would you please creat a new thread here to discuss your new plug-in iCloud ?

    I will buy it recently, hope this thread will be created concerned by you here.

    Thanks a lot. :D
     
  19. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, the iCloud Plugin is actually quite simple: it provides a class called P31Prefs that has all the same methods as PlayerPrefs. Anything you store in it will automatically be shared via iCloud and synced to all the user's other devices.
     
  20. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Okay~~ I understand. :)

    Mmmm.... how about another 2 new Threads :

    1. Game Center Multiplayer (requires GameCenter Plugin)
    2. Game Center Turn Based Multiplayer (requires GameCenter Plugin)

    I think these 2 categories are more complicate (actually, I even don't know how to start build a standard multiplayers game till now, yet :( ), need more care and some examples, explanations for developers here.

    Thank you.
     
  21. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    862
    hi, i bought and installed admob plugin, banner show, still just testing but if i check logs from logcat like this: adb logcat -s Unity
    i get this info:
    Code (csharp):
    1. V/Unity   (16607): SendMessage: object AdMobAndroidManager not found!
    what does that mean? do i need to drag any other prefab to the scene besides AdMobAndroidBanner?

    thanks!
     
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pretender, you will news the AdMobAndroidManager prefab as well which handles receiving messages from the native side.
     
  23. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    862
    so i need to drag the AdMobAndroidManager prefab to the scene as well?
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @pretender, correct. You can just put it in your initial loading scene and it will persist for you.
     
  25. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    862
    ok, thank you!
     
  26. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    IAD not use
    Not a display ad
     
  27. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Thanks. I used the other key, and bam! 24 hours later, I'm getting spammed with data.

    For anyone considering the Google Analytics plugin, I have to say, that it was absolutely a no-brainer purchase. In 1 hour, I had purchased, downloaded, installed, and integrated the Prime 31 Google Analytics plugin into my Unity game. I went from a 'might be nice to get Analytics into my project' to 'done' in 1 hour. Fantastic!

    Gigiwoo.
     
  28. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Heya,

    Simple question - how do I check for or download updates for plugins that I have already purchased from you? In particular, the etcetera plugin. I purchased it about 4 months ago, how do I know if it's current and where to get the new version?

    Note - This page shows the last update date: http://prime31.com/unity/pluginUpdates/#

    Note 2 - Nevermind - I solved my own problem. There was a link in the original purchase email. I wonder if this is also true of the plugin I got from the Tornado Twins site... The google analytics one. Guess I'll check that later.

    Thanks anyway for reading :).
    Gigiwoo.
     
    Last edited: Oct 1, 2011
  29. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Hi, Prime31,

    I can not find out where to ask question about iCould.

    I've bought iCloud plug-in just now.

    The error occurred after I imported package:

    Assets/Plugins/resultlogger.cs(6,14): error CS0101: The namespace `global::' already contains a definition for `ResultLogger'

    I don't know where to find out the other ResultLogger ?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, it sounds like you have two copies of the ResultLogger class in there (not sure how thats possible as the old version should get overwritten). Just delete one of them (preferably the one not in the /Assets/Plugins folder) and you should be good to go.
     
  31. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Dear Prime,

    I found the file of iCloud plugin is "resultlogger.cs", it is not acceptable to Unity3D, since the class name is "ResultLogger", the cases are different of "R", "L".

    So, when I renamed the file name as "ResultLogger.cs", Unity3D tell me, there is another "ResultLogger.cs".

    The other file is under the folder path "SocialNetworking/testSupport".

    Because the date of iCloud is newer than SN plugin, so I deleted the file under SN folder.
     
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, sneaky little file ended up in the wrong folder. In the next update to the SocialNetworking Plugin it will be in it's proper home (Assets/Plugins). My apologies.
     
  33. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    That's ok. :)

    I'm a little confused after reading the document of iCloud. Do I need to set up XCode parameters for using iCloud plugin by myself? or the plugin will add those compile parameters automatically for me?
     
    Last edited: Oct 3, 2011
  34. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, you need to simply click that one checkbox (enabling entitlements) in your Xcode project settings.
     
  35. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Hi, Prime31,

    Sorry for another stupid question, I can't find where to enable iCloud feature of the provisioning profile on the developer portal.

    Actually, I do not really know how to generate a provisioning profile tied with an entitlement. Please help... :(
     
    Last edited: Oct 3, 2011
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, as it turns out, Apple is enabled iCloud by default for all provisioning profiles so you won't have to do anything. The proper place to enable them (just in case you want to see it) is right in the standard provisioning portal in the dev center. Just click the modify profile button to get at the details of any of your provisioning profiles.
     
  37. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    @Prime31 Did you mean this page ? [Please see the Attachment]

    I can't see any click square to let me do it. :(
     

    Attached Files:

  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, it is actually per app. Click the "App IDs" link right above the "Provisioning" link and you will see lots of green lights.
     
  39. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Thanks, I saw it this time!!! :)

    But, there are 2 errors while building XCode project:

    Undefined symbols for architecture armv7:
    "__twitterPostStatusUpdateWithImage", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    "__twitterPerformRequest", referenced from:
    RegisterMonoModules() in RegisterMonoModules.o
    ld: symbol(s) not found for architecture armv7
    collect2: ld returned 1 exit status

    Current version of SN is "SocialNetworking_2011-09-09", and that won't happen with the version "SocialNetworking_2011-08-29", should I go back to older version?

    The other question about iCloud, "You will need to enable iCloud entitlements in your Xcode project." ---- where is it in XCode project?

    Thank you.
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, be sure to delete the SocialNetworking files before importing the updated plugin. It had some stuff move around in the latest update. iCloud entitlements can be found by going to the document linked from the iCloud docs and searching the page for "entitlements". Due to NDA I can't post any more than that but it is very easy to find. I can say that you don't have to do anywhere near all the steps anymore. Currently, with Xcode 4.2 you simply just check the checkbox and the rest gets magically done for you.
     
  41. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    @Prime31 I've solved the entitlements' problem, thanks.

    About the 2 SN errors, it is gone after I deleted all whole plugins editor folders, close Unity3D, re-open Unity3D, and re-import them.
     
  42. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Hi, Prime31,

    Here are some suggestions for iCloud features: :)

    1. Function names set to be the same with PlayerPrefs.
      For example: do not use setInt() but SetInt().
      Because I can coding like these in C#:

      Code (csharp):
      1. #if iCloud
      2. using Prefs = P31Prefs
      3. #else
      4. using Prefs = UnityEngine.PlayerPrefs;
      5. #endif
      6.  
      As above, I don't need to change code from PlayerPrefs to P31Prefs, just to find and replace "PlayerPrefs" with "Prefs", more portable for developing on other platform, such as PC or Mac.

      At current phase, I have to do such things:

      Code (csharp):
      1. #if iCloud
      2. class Prefs : P31Prefs
      3. {
      4.     public static void SetInt( string key, int val )
      5.     {
      6.         setInt( key, val );
      7.     }
      8.  
      9.     public static int GetInt( string key )
      10.     {
      11.         return getInt( key );
      12.     }
      13.  
      14.  
      15.     public static void SetFloat( string key, float val )
      16.     {
      17.         setFloat( key, val );
      18.     }
      19.  
      20.  
      21.     public static float GetFloat( string key )
      22.     {
      23.         return getFloat( key );
      24.     }
      25.  
      26.  
      27.     public static void SetString( string key, string val )
      28.     {  
      29.         setString( key, val );
      30.     }
      31.  
      32.  
      33.     public static string GetString( string key )
      34.     {
      35.         return getString( key );
      36.     }
      37. }
      38.  
      39. #else
      40. using Prefs = UnityEngine.PlayerPrefs;
      41. #endif
    2. Overload support: EX: getInt only has one type of calling getInt( string key ); but sometimes we need another overload function etInt( string key, int defaultValue ) for keep original value.

      like this: SoundVolume = PlayerPrefs.GetFloat( "SoundVolume", SoundVolume );

      So... if the game is initialized first time, the GetFloat() overload function won't destroy the old default sound volume, I don't need to write more check key codes.

    Sincerely,
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, I'm afraid it is against my religion to use the Microsofts coding guidelines. In this particular case we absolutely, purposely did not match PlayerPrefs exactly. It is very important that you use P31Prefs only for data that should be shared via iCloud. You have very limited storage space so dumping all your PlayerPrefs in there isn't a good idea. You can safely use P31Prefs cross platform. It will work just fine on desktop/Android/PS3/iOS 4/etc. It just will drop back to PlayerPrefs if iCloud is not available.
     
  44. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    @Prime31 Ok, I see. It just my little thought. :)

    I have a problem now.

    XCode report me : 2011-10-04 04:32:52.495 airafro[952:707] NSUbiquitousKeyValueStore error: com.???????????.?????? has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement
    (PS: question marks are just for privacy reason, they are my info of that provisioning profile.)

    I am sure my code sige is using the provisioning profile which assigned with the App IDs and iCloud enabled (green light). I am trying to run iCloudTestScene, it could not work.

    What's the step is wrong?
     
  45. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, you have an entitlement issue. Try deleting the app from you device and reinstalling. If that doesn't fix it please post your question in the Apple dev forums which is the only place to discuss the NDA covered details of iCloud.
     
  46. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Done!!! :)

    You are right !!!

    Re-installing solved the problem.

    You are a star.
     
  47. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Hi, Prime31,

    Something CRASHED.... :(

    I've tried to delete game on my device, and re-install by XCode Run command.

    It stopped when launching after "P31Prefs.synchronize();" in the Start() function of Unity3D, then XCode report something like these:

    Code (csharp):
    1. 2011-10-04 05:18:54.644 airafro[1230:707] keyValueStoreDidChange
    2. 2011-10-04 05:18:54.653 airafro[1230:707] changed keys: (
    3.     TotalScore,
    4.     bAfroBarCouldMove,
    5.     MusicVolume,
    6.     bPracticeMode,
    7.     IsGameStill,
    8.     bHardAvailable,
    9.     askRateGamePlayedTime,
    10.     GameLevel,
    11.     bLeftHander,
    12.     bJustHeartEvent,
    13.     bJustLevelUp,
    14.     FallSpeed,
    15.     bInsaneAvailable,
    16.     AfroBarPosZ,
    17.     SoundVolume,
    18.     AfroTypeOnBar,
    19.     bNotFisrtInstall,
    20.     AfroBarLevelCount,
    21.     Score,
    22.     AfroBarTargetCol,
    23.     AfroTypeOnNext,
    24.     NextBulletHeart,
    25.     AfroBarPosY,
    26.     HeartCount,
    27.     GameStartLevel,
    28.     AfroBarPosX,
    29.     AfroBarCol,
    30.     MonsterLifeInSlots,
    31.     xSpeed,
    32.     bColumnPreview,
    33.     AfroBarMagicCount,
    34.     AfroBarRow,
    35.     bNewGameFullMode,
    36.     OneAfroScore,
    37.     MatchOneAfroScore,
    38.     NextMissileHeart,
    39.     theFloat,
    40.     MatchScore,
    41.     bFullMode,
    42.     GamePlayedTime,
    43.     bNotFisrtGame,
    44.     Version,
    45.     AfroTypeInSlots,
    46.     bFacebookLogin,
    47.     bAfroBarCouldRotate
    48. )
    49. 2011-10-04 05:18:54.662 airafro[1230:707] -[__NSArrayM JSONString]: unrecognized selector sent to instance 0xb3de10
    50. 2011-10-04 05:18:54.691 airafro[1230:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayM JSONString]: unrecognized selector sent to instance 0xb3de10'
    51. *** First throw call stack:
    52. (0x35f588b3 0x367a01e5 0x35f5bacb 0x35f5a939 0x35eb5680 0x282a90 0x35d70e77 0x35f2456b 0x35eb00d7 0x35ce4d67 0x35e14b19 0x35e15671 0x35d15af1 0x35d1589b 0x35d15827 0x282c48 0x282904 0x2822a4 0x1a144 0x14a74 0x144a4 0x4c154 0x3ac9d0 0x3ace84 0x361a94 0x392fc4 0x29cbc4 0x3794 0x2fbc 0x2bac 0x3356becd 0x33565a45 0x33533c35 0x335336d3 0x33533041 0x3105fe13 0x35f2c547 0x35f2c4e9 0x35f2b337 0x35eae4e5 0x35eae3ad 0x33564adf 0x33561dc7 0x4368 0x2938)
    53. terminate called throwing an exceptionkill
    Have you any URL for me to read to know how to clear testing iCloud data? or what else I can do to fix it?

    Thanks,
     
  48. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, oddly enough, a beta tester had this exact same issue but he could not figure out what it was that he changed to fix it. All iCloud information that is currently available is in the iOS 5 release notes on Apple's site linked from the iCloud Plugin's docs. I will push an update out in about 4 - 5 hours that will avoid the crash and add some logging (the crash technically shouldn't even be possible but we all know how betas go).
     
  49. donlien

    donlien

    Joined:
    Apr 13, 2009
    Posts:
    229
    Thank you for the information. :)

    I am curious, is the event keyValueStoreDidChangeEvent() triggered automatically every time data changed ? or it only triggered when the function synchronize() been called?
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @donlien, it can happen at anytime but generally you will see it most often shortly after synchronizing.
     
Thread Status:
Not open for further replies.