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

    Helk

    Joined:
    Feb 11, 2011
    Posts:
    33
    Hey Prime. I'm thinking of buying the etcetera plugin for the review prompting feature. I want to know if this is the classical one I'd see in apps from time to time that lets you tap on a star rating 1-5 and says thank you, or something that makes you write out a full review? I'm more interested in just tapping on stars
     
  2. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Helk, a user can't input an iTunes rating unless they are outside of your application and in the App Store application. Anything you have seen where you are just tapping stars in the app isn't actually submitting a review to iTunes/App Store. If the user chooses to review your app through the plugin they will be taken to the App Store where they can choose a start count and optionally enter in text for the review.
     
  3. Helk

    Helk

    Joined:
    Feb 11, 2011
    Posts:
    33
    I think I was thinking of the window you used to get with the review on delete popup (Apple removed that didn't they? )
    There's no way to pop that simple star rating window up anymore?
     
  4. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Helk, that feature was shown automatically and didn't make it past iOS 3.1.3 if I recall.
     
  5. Darknuke

    Darknuke

    Joined:
    Jan 31, 2011
    Posts:
    223
    wow you have some fantastic plugins on your site. I will probably purchase a number of those for my game(s). Especially etcetera. I like the many features that one has. Good work!
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Thanks Darknuke! We do our best to make sure all the Unity iOS devs can focus on their games and not have to worry about getting access to the iOS specific stuff. Watch our for Etcetera 2 which is coming real soon...
     
  7. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    ok odd.. my first post.. gone.

    Anywho.. just wanted to drop some props on the plugins thus far... we're loving them over here and they've saved our hides a time or two. I do have one question about this plugin suite related to the email functions. Currently we need to send an email w/the text PREPOPULATED (not just the contact and subject) and i was wondering if one of the email functions does this? And if so which one? I see there's an attachment based function... but not sure if thats what we need.

    Cheers
    Bryan
     
  8. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, glad you are liking the plugins! It turns out the Etcetera Plugin will handle both prepopulated emails and attachments. The relevant methods are:

    public static void showMailComposer( string toAddress, string subject, string body, bool isHTML )
    and
    public static void showMailComposerWithAttachment( string filePathToAttachment, string attachmentMimeType, string attachmentFilename string toAddress, string subject, string body, bool isHTML )
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    Forgot to mention, dont forget to checkout the brand spanking new EtceteraTwo Plugin! It includes TVOut, local notifications (they look and work just like push notifications), movie playback with orientation control and more coming as the requests come in!
     
  10. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Ok, sold. :) Thanks prime31!
     
  11. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Since i've kinda got you on the horn i have one quick question. :)

    Basically i need to also setup it up to contain a link within the email.... and i'm assuming that since we have a bool for isHTML we can embed HTML code within the body section of the email?
     
  12. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, you are correct. just do a normal HTML anchor tag and pass true for isHTML and you will be good to go.
     
  13. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    i'm having an issue w/setting up the anchor tags. Basically i need " inside of " as follow...

    EtceteraBinding.showMailComposer( "", "GAME NAME", "<p>Hey! I just played a GAME NAME and thought you should check it out.<br />Tap the link to get it!<br /> <a href = "http://itunes.apple.com/us/app/haunted-manor-lord-of-mirrors/id414573172?mt=8">Try it now on iTunes.</p>", true );

    and basically my ""'ed text isn't staying as such... specifically the http section on. I assume i need to encapsulte the whole line with ""'s but i'm having an issue w/using ""'s inside the parent. I'm sure this is just my lack of programming knowledge hitting me. :)
     
  14. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, try this:

    Code (csharp):
    1. EtceteraBinding.showMailComposer( "", "GAME NAME", "<p>Hey! I just played a GAME NAME and thought you should check it out.<br />Tap the link to get it!<br /><a href=\"http://itunes.apple.com/us/app/haunted-manor-lord-of-mirrors/id414573172?mt=8\">Try it now on iTunes</a>.</p>", true );
     
  15. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    yeah ok nevermind... i got it. just needed to add some \s on the inner "'s
     
  16. Sortasoft

    Sortasoft

    Joined:
    Feb 24, 2009
    Posts:
    61
    I just bought the EtcetreraTwo plugin, and it works great. I have a question about the TVOut feature. My game does not rotate when the screen is turned, but the TVOut signal still does, flipping the output sideways and upside down. Is there a way to disable the rotation? Thanks!
     
  17. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @ChilledOut, we were wondering about if we should make rotation automatic or require a call to do it. As you can see we went with automatic. Perhaps we will make the switch to manual for cases like yours in the next update. In the meantime you can turn off the orientation changes by just commenting a couple lines out. Look for the - (void)start method and comment out the lines adding a listener that start like this: [[NSUserDefaults standardUserDefaults] addBlahBlahBlah. Sorry that it is not more specific. I am not near the source right now so this is from memory and my brain didn't remember the line numbers :)
     
  18. Sortasoft

    Sortasoft

    Joined:
    Feb 24, 2009
    Posts:
    61
    Thanks, that worked great! For anyone else that comes across this, it's in ExternalScreenManager.m, lines 317 through 321. I also modified line 222 to fix it to a specific orientation.
     
  19. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @Prime31 - hey again! Quick question for ya... what are the return values given by getCurrentLanguage, is that documented anywhere? Does it return the full locale or the abbreviated code?

    Thanks!
     
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
  21. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Perfect, thanks prime!
     
  22. Gigiwoo

    Gigiwoo

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

    I had good success with your Native Interface plugin and based on what I've read here, was getting ready to purchase the Etcetera (sp) plugin. So that I can get going right away when I get home, I had a couple questions:

    * Do I need to worry about the compile issue, like I did with the Native Plugin (using latest XCode and Unity didn't compile thing and you had to send me some files via email).

    * Can I use the Native and etcetera plugins together?

    * How do you resolve the 'power of 2' issue with images? Just from reading, I need to use 'PromptForPhoto()', along with the 'ImagePickerChoseImage()' event. Then, I need to do a TextureFromFileAtPath() on the path and wait until that's done in the 'EtcTextureDelegate()'. Ignoring that I've probably mixed up the details, here's my question. Once I get a Texture2D, what does it give me? In most cases, a photo on their device is not going to be a power of 2, so is it pre-converted in the method? Do I need to convert it to pwer of 2 myself? If it's not converted to power of 2, how do I convert it first to be usable? And, if it is converted, is it scaled or padded? How do I know what the original width/height was in either case?

    Thanks,
    Gigiwoo.
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Gigiwoo, all the production plugins have a new build system that works with Xcode 3 and 4. In fact, the NativeToolkit Plugin was updated Friday to have the build system now as well though I don't know if/when Unity will push the update out to everyone.

    You can use as many plugins as you want together. They are all designed to work synergistically.

    No need to do any post processing of the image. Simply prompt for photo then call textureFromFileAtPath and you will end up with a useable Texture2D. If you want to know the original dimensions all files are stored in the Documents directory so you can just open it up in Unity and get the details.
     
  24. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    Sorry, I'm still not quite clear. Since power of 2 is required, I assume you are saying that the resulting image IS converted to a power-of-2 size? I am also going to assume that the image is 'stretched' to fit the next largest size? So, 1024x768 becomes 1024x1024 and the Y is stretched?

    Could you be more specific about how to open an image in Unity and get the size without Unity automatically converting it again to a power of 2? I know this stuff seems basic, but if I was an expert at all these system parts of Unity/IOS, I wouldn't need to buy your expert plugin :).

    Thanks,
    Gigiwoo.
     
  25. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Gigiwoo, the WWW class is used to load the textures so power of 2 is not required. You can certainly crop the image to power of 2 to get the most efficient texture possible but then you risk the possibility of removing part of the image the user wanted.
     
  26. Gigiwoo

    Gigiwoo

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

    Thanks! I bought the plugin and it is looking super so far. The demo scenes ran straight away with no problems.

    Questions (do I ever not have questions?) -

    * How much of the plugin can you use with Javascript? So far, i have been able to do several of the behaviors.

    * By design, are we supposed to leave the prefabs alone and just create the scripts like you did for EtceteraGUIManager, two, three?

    * Is there a way to list all the files in the photo album? Instead of just picking one, can I walk through them myself? Like with a next/prev button?

    * ever since I installed the plugin, when I build and go over to XCode, it has lost my build Scheme for the IPad connected to my box. In it's place is a MacOS setting. To get the ipad scheme back, I have to quit XCode and reopen. This only started AFTER I added the Etcetera package to Unity.

    So far, looks great!
    Gigiwoo.
     
    Last edited: Apr 26, 2011
  27. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @gigiwoo, everything in all of our plugins is accessible from JavaScript. That being said we are on a crusade to get people to stop using it at all costs. C# has many features available to it that JS does not, it has literally thousands more tutorials/references, code complete with C# alone makes a programmer so much more efficient, and a ton more but I digress...

    All of our plugins use the same naming conventions. Any prefab named *Manager should be in the first scene of your game. It is used for communicating from native to Unity. Preabs named *EventListener are only there as an example of how go listen to events. You can copy/paste what you need from it but it is not at all needed by the plugin.

    The photo picker is a GUI only. Listing their names wouldn't be too useful as they are just UIDs.
     
  28. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @Prime31, does ShowActivityView have any way to be placed in a specific location on the screen? or at least moved out of the center to some other location? I need to have the UIView in the lower left of the screen.

    Cheers
    Bryan
     
  29. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, the activity view is always displayed centered. You could modify the source to make it wherever you want.
     
  30. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    Heya Prime,

    So I'm not super familiar w/native code.. so i need to change it in the source files (.h/.m) or the plugin .cs? If u could point me in to the right file and a general direction as to where in that file i'm sure i could find it easily enough.

    Thanks again!
    Bryan
     
  31. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    I don't have the source available right now but you will want to just search for UIActivity and you will find it.
     
  32. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Ok so i've just moved to my new laptop this morning and am trying to get my builds working... and i get this error..

    Code (csharp):
    1.  
    2. Undefined symbols for architecture armv6:
    3.   "_getScreenshot", referenced from:
    4.       __etceteraShowMailComposerWithScreenshot in EtceteraBinding.o
    5.       __etceteraTakeScreenShot in EtceteraBinding.o
    6. ld: symbol(s) not found for architecture armv6
    7. collect2: ld returned 1 exit status
    I've checked it against my other laptop which can build fine and i have all the correct items added and in place. I did NOT install the plugins but instead used what i had checked into our repository and i did notice that if i do a clean build i do not get any of the items (etc code folder for instance) moved over to the xcode project. I had to manually copy them over.

    THanks for the help!
    Bryan
     
  33. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, the first thing I would do is make sure the post process scripts are executable. This error is almost 100% due to the AppController not getting patched so also double check that you are using the correct patch file (if you are using the latest version of Unity and the plugin there is no need to worry about that).
     
  34. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    ok i did get the message in unity stating my process scripts are not executable.. not entirely sure how to remedy this. Do i just chmod those files?

    Thanks again!
    Bryan
     
  35. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, yup, just chmod a+x the files and you should be good to go.
     
  36. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    ok i did that, alls good and i get an all clear when i check in unity but if i build now i still don't get any references to the included plugins. Hmm... odd. Its been a while since i set these up in unity, so i'm a little off if there's something i need to trigger to get these scripts to fire off. I just remember that on my other laptop they would pop up that message anytime i would run the build on a clean build.... telling me they were installed.
     
  37. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, you shouldn't have to do any more than pressing the Build button. If you don't get the popup, something either went wrong or the scripts didnt get to run. What version of Xcode are you using? Is you iOS SDK installed in the default location (/Developer)?
     
  38. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Possible. This is all fresh install stuff so that could be the case. I'm using xcode 4 (although i regret every second of it but i was using it on my old laptop as well.. same environment). Installed in the default developer location. I'm using the latest version of unity and i have Game Center, Etcetera, and StoreKit plugins. I haven't updated them in a bit... but i believe i'm using the latest Etcetera and Storekit for sure. I have the files checked into my local repository for this project and have updated my new mac to use the repository (svn). They all show up in Unity, i get the menus and such and when i run the check for errors thing i get an all clear.

    I really appreciate the help!
    Cheers
    Bryan
     
  39. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime

    Maybe this is helpful? if i use the plist editor and try and make a change i get this error message in unity.

    Code (csharp):
    1.  
    2. NullReferenceException: Object reference not set to an instance of an object
    3. PListEditor.SaveValueToPlistNode (System.Xml.XmlNode node, System.Object value) (at Assets/Editor/Prime31/PListEditor.cs:428)
    4. PListEditor.SaveDictToPlistNode (System.Xml.XmlNode node, System.Collections.Hashtable dict) (at Assets/Editor/Prime31/PListEditor.cs:407)
    5. PListEditor.savePlistToFile (System.String xmlFile, System.Collections.Hashtable plist) (at Assets/Editor/Prime31/PListEditor.cs:118)
    6. Prime31PlistHelperWizard.OnWizardCreate () (at Assets/Editor/Prime31/Prime31PlistHelperWizard.cs:70)
    7. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    8. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    9. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    10. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
    11. UnityEditor.ScriptableWizard.OnGUI ()
    12. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    13. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    14. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
    15. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
    16. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
    17. UnityEditor.HostView.Invoke (System.String methodName)
    18. UnityEditor.HostView.OnGUI ()
    19.  
    20.  
     
  40. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, Xcode 4...my nemisis. I bet that is the issue. Make sure you update all your plugins and totally delete the post process scripts before reimporting. We made a totally new release system to handle the bugs with Xcode 4 and chances are you have some half and half happening with regards to the plugins included build system version.

    There is one benefit to using Xcode 4: you get a console readout of everything the plugin does while post processing. Just open up Console.app and filter for "prime31" while building to see what is happening.
     
  41. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    OK i'll update today, although i wasn't having this issue on my other machine that was using xcode 4. Hmm... thanks for the help, hopefully nothing changed w/the plugins.

    Cheers
    Bryan
     
  42. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31 - OK looks like we're good to go. odd my old machine worked fine w/Xcode 4. no biggie. My only question left is do these plugins work w/the older version of xcode as well? I've seen some hubub about apps submitted under 4.3 are failing at apple and it appears I might need to go backwards.

    Cheers and i REALLY appreciate the help.
    Bryan
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @bpritchard, Yup. The new build system will detect and work with Xcode 3 or 4.
     
  44. bpritchard

    bpritchard

    Joined:
    Jan 29, 2009
    Posts:
    444
    @prime31

    Thanks for your help today, its greatly appreciated. :)

    Cheers
    Bryan
     
  45. blacksmithgames

    blacksmithgames

    Joined:
    Aug 30, 2009
    Posts:
    24
    Hi,

    I bought the Etcetera Plugin 2 and I want to use local notifications. Is it possible to cancel a certain notification (via ID)? At the moment I can only cancel all notifications with cancelAllLocalNotifications().
     
  46. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @blacksmith, currently there is just a cancel all. I'll give the API a look and see if there is a way that is smooth enough to cancel a single one across the iOS/Unity boundary.
     
  47. blacksmithgames

    blacksmithgames

    Joined:
    Aug 30, 2009
    Posts:
    24
    that would be great! thx
     
  48. JohannChristoph

    JohannChristoph

    Joined:
    Jun 21, 2009
    Posts:
    141
    In my naive dreams i thought it would be nice to be able to send a mail from within my app with an iconic image of my app with an 'Avilable on the Appstore' - badge on it.

    i carefully read the Andrea Monzinis and the Quiet Pixel posts on page 10. But i'm not getting it. Is the Code in JavaScript?

    1)
    how do i get the full path of any (not sreenshot) image on the device.
    And how do i actually get the image on the device?

    2)
    And is it possible to make the image in the mail clickable for the on who gets the mail (to be sent to the Appstore)? How would the html-mail-code look like? Or is it impossible, because it's an attachment?

    3)
    and one more "stupid" question. The id-number of my app i get when i add my app in iTunes Connect (before i submit my Binary)?
     
  49. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Johhann, 1. You can't get the path to anything from Unity besides streaming assets. Everything else is bundled up in binary files. 2. You can use plain old HTML to make links. 3. The app ID from iTunes Connect is I believe what you are referring to.
     
  50. iguana_02

    iguana_02

    Joined:
    Apr 22, 2011
    Posts:
    211
    Hi guys,
    I bought etcetera one plug ins and i think its fantastic.
    I got one problem with the "EtceteraBinding.showMailComposerWithScreenshot" in my augmented reality app.

    I created a button with the script in it and when i click it seems its doing the screenshot and opens up mail with the screenshot attacked, but the image its just the camera view without the character and GUI from unity3d...just the camera view.

    I tried to delete all the augmented reality data, scripts and plug in and if i do the screenshot it works (it shows the camera, gui and character) but obviously i need it to work with the AR fully working.

    I few words seems that the camera its overlayed over all the unity interface...

    I'm going mad...any help would be really appreciated.

    Ale.