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

[Closed] Etcetera Plugin Live! Alerts, prompts, loading views, push, localization and more!

Discussion in 'iOS and tvOS' started by prime31, Oct 18, 2010.

  1. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The long awaited Etcetera Plugin is finally ready! It ran into a bit of feature creep which pushed the release
    date out an extra week but the new features are worth the wait. The Etcetera Plugin includes the following laundry list of features:

    - 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 + image + text, etc)
    - email composer (and email screenshot)
    - web view
    - Apple UIAlertView access
    - custom alert view that prompts for 1 or 2 lines of text (and allows custom coloring to match your game's theme)
    - current locale
    - localized string support using Apples localizable.strings system
    - unzip support
    - save game screenshot to the documents directory programatically
    - multisampling toggle (anti aliasing)
    - image resizing (great for loading photos into a texture)
    - simple photo to texture loading method (this is just a simple Unity function, not a native method call)

    The documentation is live and you can have a look at what it offers here.
     
    Last edited: Apr 12, 2011
  2. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    multisampling toggle (anti aliasing) <blink> oh yes!
     
  3. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    298
    Purchased!
     
  4. impla007

    impla007

    Joined:
    Jan 30, 2010
    Posts:
    57
    Purchased.

    @Prime, I have sent you a PM, could you please have a look.
     
  5. Deleted User

    Deleted User

    Guest

    Purchased!

    Thank you for the great support!

    Andrea
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @impla007 and to anyone else using more than 1 plugin in a single project: the Etcetera Plugin has a new build system to accommodate some of the new features. I will get updates out for the other plugins in the next 48 hours but in the meantime to get all the plugins working together happily do the following:

    - after importing the Etcetera Plugin unitypackage try just choosing Build then Replace from Unity

    if that doesn't work do the following:

    - import the Etcetera Plugin into a new project
    - copy the UpdateXcode.scpt (it is in the Assets/Editor folder) into your other project (the one with multiple plugins in it)
    - choose Build from Unity and then choose the Replace option (you only have to do a replace once to get everything in sync)
     
  7. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    Damn, can you stop from making all these awesome plugins? :p
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Eskema, lucky for you I'm temporarily throwing in the towel to get some updates to the other plugins out. Now when are we gonna get some more video tutorials out of you?
     
  9. Bububear

    Bububear

    Joined:
    Mar 1, 2009
    Posts:
    106
    I'm curious to see how the MSAA (anti-aliasing) plays with Unity iPhone.

    1) Is it compatible with Unity iPhone?
    2) Is it a big resource hog?
    3) How's the quality?
     
  10. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Bububear, to address your questions:

    1) it is compatible with Unity 3 Basic, Unity 3 Pro and Unity 1.7 Pro
    2) it's actually not very resource intensive because it is offloaded to the hardware
    3) the quality is very good but there is a caveat: you must be careful with your textures. Have a look at this post for more info
     
  11. EskemaGames

    EskemaGames

    Joined:
    Jun 23, 2010
    Posts:
    319
    I don't know if I have something interesting to teach, as soon as I finish with my actual game I will make something multiplayer
     
  12. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    Prime - I just bought ETC and can't get it to build in xCode. I didn't see any notification from the folder that the plugin was copied over. Have I missed something?

     
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @kenlem, can you grab the download again (I just updated it right now) and give it a shot? There was an odd bug that one other person came across that I can't reproduce but I attempted a fix with the new package.
     
  14. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    I'm getting an XCode error too:


     
  15. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ezone, did you grab the update that was posted at 6:30 pm PST? If your AppController.mm file modified in any way? Did you try the plugin on an empty project?

    It looks like the files are getting copied properly for you but the AppController.mm file is not being patched.
     
  16. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    I got it working in an empty project.

    I guess it has something to do with the other plug-ins I'm using. I've got: iAds, GameCenter and StoreKit in the same project, so it must be a conflict with one of those?

    UPDATE: I copied the AppController.mm from the ETC only project to the other one and now it's working - so like you say the AppController.mm patch seems busted
     
    Last edited: Oct 19, 2010
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ezone, I just tried a sample with all the plugins you are using and it worked fine. I did, however, find a bug when there is a space in any folder that is in the path of your Unity project. Grab the Etcetera.unitypackage with your original download link and let me know if that does the trick for you.
     
  18. ezone

    ezone

    Joined:
    Mar 28, 2008
    Posts:
    331
    That fixed it! Thanks Prime31 - you are a legend!!
     
  19. kenlem

    kenlem

    Joined:
    Oct 16, 2008
    Posts:
    1,630
    The latest update also worked for me. Thanks!

    One question, I'm running on an iPhone 4 and I don't see any difference between 2x Multisample and 4x. Is that just me? Can anyone else tell a difference?
     
  20. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Dude, your a legend.

    Thanks :)!
     
  21. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Having problems with mobclix and the ectra plugin playing together nicely.
    Is complaining that one config file is missing (depending on which unitypackage I import last), so think it's overwriting each one?

    Any ideas on how I can quickly fix it :)?

    Cheers dude,
    Adam G
     
  22. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @kenlem, good to hear that update fixed things. I can't see any difference between 2 and 4x sampling either on the iPhone 4.
     
  23. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Having just bought my second Prime31 plugin, I was looking at the features of the Etcetera plugin and realised I only want a small subset of them for my next project.

    I wondered why you bundled so much together, making it one of your more expensive plugins, when you could have made 3 or 4 smaller ones that would be on a level price-wise with your cheaper ones.

    The other things is having 1 big file bloats game file sizes with unused features.
     
  24. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Moonjump, a lot of the functionality was shared for the Etcetera Plugin (such as alerts, prompts, ask for review, web and mail, screenshot and resize, etc). By grouping the features into a single plugin it saved a lot of development time which in turn makes the plugin cost less as a bundle. It will then require less time to support and update and result in time savings all around. The code size is next to nothing. There are no external assets so the fully compiled code is very minimal.

    The way I see it, if your time is worth $50 per hour (being a game developer it most certainly is) and it would take more than an hour to make any single one of the features including with the plugin it makes it a no brainer to purchase it and get all the features. That was the thought process on this end at least and the way I evaluate purchasing things.
     
  25. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Thanks Prime31, I hope I make back $50 for each hour invested in my game. However, cash flow means I have to consider each purchase very carefully at the moment.
     
  26. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    $50 is a steal for this tbh. Although still battling to get this and the mobclix plugin playing together niceley :).
     
  27. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Hilm, let me help you with your battle. Download the latest version of the Etcetera Plugin and the Mobclix Plugin. Add the Etcetera unitypackage last. The Etcetera Plugin has a slightly newer build script than the other plugins. I will get them all updated to the latest version but it will take a few days. Too much stuff to test!
     
  28. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Cool, will give it a go! Ta dude!
     
  29. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Ok, I've re-downloaded them all (social network, mobclix and Etcetera). Imported the social one first, then Moblix, then etcetera.

    I run xcode and it states all have been imported correctaly and no longer whines about missing config files. However upon building I get 3 mobclix errors as shown below:


    Any thoughts?
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Hilm, can you check to make sure the libMobclix_nonthumb.a file and about 8 other Mobclix* files were copied into your Xcode project? It looks like they are based on the fact that MobclixManager.o was compiled but something seems a bit odd in there. Maybe if you can screenshot your Xcode project with the Mobclix folder expanded it will have some clues.
     
  31. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338

    While the post process script seemed to copy in all the Mobclix files... It didn't copy in the lib file... I've imported it manually and seems to be working, so assume just something up with the post-process script and maybe missing the addittion of that lib?
     
    Last edited: Oct 20, 2010
  32. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Ok, got ratings working after importing the lib...

    Working on push notifications now - so I have EtceteraBinding.setUrbanAirshipCredentials("App ID", "Secret");

    Is the secret in urban airship the "Application Secret" or "Application Master Secret"?
    It appears to register the device token with either, however when I send out a test push notification it fails to appear on my device?

    Current code I'm using is:

    Any idea what I'm doing wrong?

    Cheers,
    - Adam G
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Hilm, first off, make sure your using an bundle identifier and provisioning profile combo that is enabled for push notifications. The secret is the Application Secret from UA. Your code looks fine except for one tidbit: you cant call EtceteraBinding.getEnabledRemoteNotificationTypes until after EtceteraBinding.registerForRemoteNotifications returns which could be a few seconds of never if the user doesn't allow remote notifications. Listen to the EtceteraManager.remoteRegistrationSucceeded and EtceteraManager.remoteRegistrationFailed events to know what the user has done.
     
  34. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    The bundle identifier and provisioning profile are setup for both the developer and production push notification services :). The device ID's are registering on Urban Airship under "device tokens", however when I then go to send the push notification (via the push notification test interface) the notification fails to reach my device.

    My settings do state me as having push notifications enabled, there's no errors on the UA panel on their site. I'm assuming the listener stuff is more a case of not registering the device with UA if the user dosen't approve for push notification to come thru? But it wouldn't be preventing the notifications I'm currently sending from reaching the device?

    Cheers,
    Adam G
     
  35. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Ok, I did nothing but it magically works now.... :).

    Guess a server side thing with UA
     
  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Nothing is the best kind of fix! Glad it's working now.
     
  37. Deleted User

    Deleted User

    Guest

    Hello Prime31,

    I have problems to build your test examples on the iPad (iOS 3.2)
    i have sent you an email with Xcode screenshots errors.

    Thank you

    Andrea
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Andrea, I sent you an email with the fix but I'll post here so everyone else can have the information as well. You MUST set your Base SDK setting to 4.1 when building the plugin. You can then set your Deployment Target to anything you want (3.2 in your case). That will take care of it for you.
     
  39. impla007

    impla007

    Joined:
    Jan 30, 2010
    Posts:
    57
    Hi there,
    I want to thanks Prime31 for his excellent work and support. Etcetera Plugin is now working fine with the last update.
    Thanks for it Prime.
     
  40. Hilm

    Hilm

    Joined:
    Nov 2, 2007
    Posts:
    338
    Sorry to keep asking soo many questions :S!

    I'm trying to get the result of a text field input. I presume the following is called once the prompt is filled in:
    public delegate void EceteraStringDelegate( string text );

    What I'm unsure of however is how within my javascript how I
    1) Figure out it has been called
    2) Gain access to the entered value.

    Any help/ a quick example of it's use would be really appreciated.

    Cheers,
    - Adam G
     
  41. Deleted User

    Deleted User

    Guest

    I have always set SDkVersion 4.1 and Target iOS version 3.2, today woks, yesterday not.
    I think there was some problems in Xcode like targets not perfectly clean , in fact after the build the default target was simulator.

    In any case now it works, thank you!

    I Have custom project with some bugs but is more simple to point problems with default examples:
    When i try to take Photo in my iPhone 3G all the process is very slow: from 5 to 10 second to wait.
    When i try to retake another photo the app crash.
    The same after i select a Photo from library, i have to wait several seconds after i have choosen a Photo.
    Could we have a loading indicator, because it seems the app is crashed.

    With iPad of course is a lot faster but Prompt to Photo crash ( i would choose existing Photo loaded in iTunes ).

    Thank you for support.
     
    Last edited by a moderator: Oct 21, 2010
  42. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    I will definitely buy this in the near future.
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Andrea, there isn't too much that can be done with the photo saving. I could try resizing it on a background thread and then saving the resized image (also on a background thread) to keep things responsive. As for iPad, Apple only allows the photo picker to be displayed in a UIPopoverController. I'll get support in there for it in an update.
     
  44. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Andrea, just for you there is an update of the Etcetera plugin. The promptForPhoto method now takes in a scale. Set it to something reasonable like 0.15 or 0.2 and as long as the user is on iOS 4 or greater all image resizing and saving is done on a background thread. It is much smoother.

    Let me know how it works for you and if it is good to go, I'll make it the default.
     
  45. Deleted User

    Deleted User

    Guest

    Great! Thank you for the quick support!
    Can i download the update with the same link?
     
    Last edited by a moderator: Oct 22, 2010
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Andrea, you sure can.
     
  47. Deleted User

    Deleted User

    Guest

    Perfect, i will test it during this weekend.
     
  48. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Hi Prime

    The features contained in this plugin are impressive and I'll be purchasing very soon.

    Regarding the localization feature:
    Code (csharp):
    1. // Uses the Xcode Localizable.strings system to get a localized version of the given string
    2. public static string getLocalizedString( string key, string defaultValue )
    1. So if I want to display a message in a GUIText in the native language of the player which is set on his/her device I should use the return string that this method call returns???

    2. I'm very familiar with key value pairs however after looking at the Apple docs I'm still a little unsure of how the key value pair work for localization purposes and in turn how it's used in the getLocalizedString(key, value) method. Say if I wanted to get the string "Hello World" translated into the users native language what values would I pass into the key value pair?


    Cheers
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dcp468, to answer you questions:

    1. you can use the return string, that is correct.

    2. it isn't really a key/value pair. The key part is correct but the second param is defaultValue. That is the value that will be returned if the given key isn't found in your localized.strings file.
     
  50. Deleted User

    Deleted User

    Guest

    When i run this code the iPhone App crash.

    i'm trying to load a texture from Xcode folder
    sFile is the path string...but it not works
    I have tried also the Environment.GetFolderPath but it not works.

    What is the right path?

    Thank you

    Code (csharp):
    1. if( GUI.Button( new Rect( xPos, yPos += heightPlus, width, height ), "loading aa" ) )
    2.   {
    3.    
    4.          sFile = Application.dataPath.Substring (0, Application.dataPath.Length - 5)+ "/aa.jpg";
    5.  
    6.  StartCoroutine( EtceteraManager.textureFromFileAtPath( sFile, textureLoaded2, textureLoadFailed2 ) );
    7.  
    8.   }
    9.  
    10.  
    11. // Texture loading delegates
    12.  public void textureLoaded2( Texture2D texture )
    13.  {
    14.   testPlane.renderer.material.mainTexture = texture;
    15.  }
    16.  
    17.  
    18.  public void textureLoadFailed2( string error )
    19.  {
    20.   EtceteraBinding.showAlertWithTitleMessageAndButton( "Error Loading Texture.  Did you choose a photo first?", error, "OK" );
    21.   Debug.Log( "textureLoadFailed: " + error );
    22.  }
    23.