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
    @curious, everything gets reset after an update automatically.
     
  2. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Could you please tell in detail? How does it work? Does it check the version number?

    I tried to see how it works but the only way I could repeat the Rate prompt was to delete and reinstall the app

    Thank you Prime31, your products are so useful and great and your support is even better ;)

    Regards


    [EDIT]
    I checked the Xcode files and saw a few variables like kRTALastReviewedVersion, etc. in EtceteraManager.mm, that should be it, it saves it in NSUserDefaults, nice job.

    Thank you again :)
     
    Last edited: Dec 4, 2010
  3. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Curious, you sure are curious, huh? :) The plugin will check the version number from your Info.plist file to see if it changed and if it went up, everything gets reset (except the never bug me again setting). The prompt will return after "launchCount" launches only if "hoursBetweenPrompts" has expired.

    So, if launchCount is 10 and hoursBetweenPrompts is 24 to get the prompt to show a second time the following will have to occur:

    - the user must have launched the game 10 times since the last prompt
    - it must have been at least 24 hours since the last prompt
     
  4. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    @Prime31, LOL :D
    You bet that I am ;)

    Thank you very much, fully understood ;)

    Regards
     
  5. Really112

    Really112

    Joined:
    Sep 9, 2008
    Posts:
    9
    Hi, I just recently bought the plugin, works wonderfully thus far.

    I'm curious if there is a way to save a screenshot into the photoalbum instead of the documents directory.

    Thanks
     
  6. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Really112, there is no save to photo album available yet but it is on the list for the next update if all goes well.
     
  7. geolog

    geolog

    Joined:
    Dec 4, 2008
    Posts:
    12
    Does anyone manage Etcetera to work with 1.7?
    The best scenario I get is 4 errors in XCode:

    /AppController.mm:452:0
    /AppController.mm:452: error: expected initializer before 'if'
    if( surface->msaaRenderBuffer )

    /AppController.mm:458:0
    /AppController.mm:458: error: expected unqualified-id before 'if'
    if( surface->msaaDepthBuffer )

    /AppController.mm:464:0
    /AppController.mm:464: error: expected unqualified-id before 'if'
    if( surface->msaaFrameBuffer )

    /AppController.mm:470:0
    /AppController.mm:470: error: expected unqualified-id before '{' token
    {

    That's in case I delete Prime31 folder from Editor. Otherwise it won't even compile in Unity.
    And only if I build for iOS 4.1. Building for 3.2 caused 6999 errors.
    P.S. Plugin downloaded today. )
     
    Last edited: Dec 8, 2010
  8. synapsemassage

    synapsemassage

    Joined:
    Jul 27, 2009
    Posts:
    334
    Localization

    This fits better here than in the general thread.

    Summary:
    1. In your open xcode project select the MainWindow.xib and "get info". Make it localizable. Add languages (en, de, fr, ja, es, etc.)(http://www.sub.uni-goettingen.de/ssgfi/projekt/doku/sprachcode.html)
    Thenafter, in your project directory you will find new directories( en.lproj, de.lproj, etc.) in the Classes folder. Keep the default English.lproj folder, too and grab/copy the Localizable.strings from en.lproj.

    2. Create text file for each language, name it Localizable.strings (see syntax below). The file ending ".strings" is important (it's ".strings" not ".string"). These files must be character-encoded in Unicode (UTF-16)! Copy these files to appropriate folders. Then drag-drop .strings into your open xcode project. In the dialogue-popup mark UTF-16 (and eg. "relative to enclosing group")

    3. Etcetera Plugin code that uses "NSLocalizedString" grabs the correct strings (correct language) automatically. For the other stuff use myVariableToBeLoadedWithALocalizedString = getLocalizedString( string key, string defaultValue )

    Localizable.strings (en):
    /* some buttontitle */
    "continue" = "continue";

    /* Error string used for unknown error types. */
    "ErrorString" = "A terrible error occurred.";

    Localizable.strings (de):
    /* some buttontitle */
    "continue" = "weiter";

    /* Error string used for unknown error types. */
    "ErrorString" = "Es gab einen schrecklichen Fehler";
     
  9. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @geolog, you always want to build with the latest SDK. You can always set your deployment target to 3.x or lower if you want to support older devices. I believe your issue stems from the MSAA patch which only works with Unity 3. Remove the AppController.patch file from the Etcetera directory and do a Build then Replace. You may have to remove the MSAA method from the EtceteraBinding.cs file also. If you have any issues just post back here or shoot me an email.
     
  10. Really112

    Really112

    Joined:
    Sep 9, 2008
    Posts:
    9
    Hi

    Is the new save to photoalbum feature usable with the take screenshot command?

    Thanks
     
  11. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Really112, it sure is. Just call takeScreenShot and use the file path it gives you to call saveImageToPhotoAlbum
     
  12. geolog

    geolog

    Joined:
    Dec 4, 2008
    Posts:
    12
    Thanks Prime31. I'll give it a try. But does it mean that there is no way to enable MSAA on 1.7? MSAA is probably the main reason why I bought Etcetera.
     
    Last edited: Dec 9, 2010
  13. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @geolog, I'll see if there is a quick fix for 1.7 but I can't offer any guarantees.
     
  14. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    @Prime31,
    I have a little request buddy, don't know if it fits in this package or not but here I go:
    I've seen (in my own unity made apps) that some plugins like OpenFeint are able to change an iDevice's orientation (not unity's!) while the autorotate keyboard is ON so that all native things like the black frame with the clock and antenna bar would appear in their correct orientation! And also the sound icon that appears while you're turning the volume higher or lower!

    Now, is it possible that we could get a little function that does this even if the autorotate keyboard (the black frame) if turned off? That would be handy if you'd want to support both (or all) orientations in you game and you don't want that black frame to show up!

    Thank you very much Prime
     
  15. Really112

    Really112

    Joined:
    Sep 9, 2008
    Posts:
    9
    Forgive my lack of understanding, I'm not sure where to find the file path takeScreenShot is using through Unity. What I tried to do was something like takeScreenShot ("nameofmyimage") then saveImageToPhotoAlbum("nameofmyimage")

    Thanks
     
  16. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @Curious, there is a feature request out there for Unity to properly handle orientation which would solve all the orientation woes. One way to do it is to completely remove the keyboard by commenting out the code in the AppController.mm file where it initializes itself and replace it with a custom view controller but it is very hackish and doesn't really do the job.

    @Really112, takeScreenShot puts the picture in the Documents directory (which is the only writeable directory on the devices that doesnt get wiped). The screen shot will be in there and the full path is what you will want to send to saveImageToPhotoAlbum.
     
  17. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    var possibleProjectDirs = from dir in dirInfo.GetDirectories()
    where !((IList<string>)invalidDirs).Contains(dir.Name)
    select dir;

    Assets/Editor/Prime31/P31MenuItem.cs(52,48): error CS1002: Expecting `;'

    my unity 2.6 pro iphone 1.7 advanced
     
  18. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hxx2010, if you arent on Unity 3.0 you can just delete the Prime31 directory. It is not needed at all for the plugins.
     
  19. susantio

    susantio

    Joined:
    Jul 14, 2009
    Posts:
    100
    Prime31: sorry if it has been asked before. with the screenshot, do you do it all inside unity (you don't have to mess with the xcode), and does it save to the photo album of the user (camera roll)? Just double checking before purchasing. Thanks for making all these great plugins!
     
  20. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @susantio, you never, ever have to anything at all in Objective-C with the plugins. It is all done for you and access is fully available from Unity. There are a few options with screenshots that give you full flexibility: you can save to docs and do as you please from there, email the screenshot, set it as a Texture2D or save to photo album.
     
  21. susantio

    susantio

    Joined:
    Jul 14, 2009
    Posts:
    100
    prime31: Thanks for the reply. sounds great!
     
  22. susantio

    susantio

    Joined:
    Jul 14, 2009
    Posts:
    100
    Sorry, complete noob here. Was reading your reply to Really112 about saving an image to Photo Album but I can't for the life of me figure out the full path of the documents directory of the iOS I should be accessing. Could you give us an example.

    the code so far:
    EtceteraBinding.takeScreenShot( "image.png");
    EtceteraBinding.saveImageToPhotoAlbum( ??? );
     
  23. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @susantio, I believe the latest version has an example in one of the demo scenes. If my memory is failing me, you can get to the documents directory by starting with Aplication.dataPath.
     
  24. susantio

    susantio

    Joined:
    Jul 14, 2009
    Posts:
    100
    Thanks. I got the thing working now. What a huge timesaver, will be looking at your other plugins.
     
  25. geolog

    geolog

    Joined:
    Dec 4, 2008
    Posts:
    12
    Any luck with MSAA for 1.7? Maybe some direction for us for deeper look at least? Or it's completely impossible to implement? Thanks in advance anyway.
     
  26. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @geolog, grab the latest version and check out the read me in the Editor/Etcetera folder. You will need to rename a file to swap the 3.x version out and stuck the 1.7 version in. Let me know if it works for you.
     
  27. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    Hi Prime

    I just wanted to say thank you for this plugin especially for this "getLocalizedString" method in particular. I've been playing around with it and it's great to see the text change in the game to a different language.

    Cheers
     
  28. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @dcp468, glad to hear the localized strings are getting some love! I look forward to seeing what you create with it (preferably with English strings :)
     
  29. summerl0v3r

    summerl0v3r

    Joined:
    Nov 17, 2010
    Posts:
    42
    i would like to purchase the social network /iad/mobclix and the etc plugin
    a couple fo questions though

    the mobclis plugin -does that support iad or do i need to purchase iad and mobclix
    the social network plugin-will that work with a pc/mac build as well
    thank you

    -ps will make the purchase today

    i got the media player and its feken osum
     
  30. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @summerl0v3r, the Mobclix Plugin support Mobclix, Admob and iAd. All of the plugins are iOS only.

    Enjoy the holidays!
     
  31. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    I can not display the other national language
    I use the ipod device
    Code (csharp):
    1.  
    2. function Awake()
    3. {
    4.     startBt.Text = EtceteraBinding.getLocalizedString( "start", "" );
    5.     optionsBt.Text = EtceteraBinding.getLocalizedString( "start", "" );
    6.     helpBt.Text  = EtceteraBinding.getCurrentLanguage();
    7. }
    8.  
     

    Attached Files:

    Last edited: Dec 26, 2010
  32. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hxx2010, try printing it out with a Debug.Log. I am thinking that GUIText might not have Unicode support (or the font you are using doesn't have Unicode chars)
     
  33. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    That Japanese and Chinese, we need to set up the appropriate font guitext
     
  34. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you need to create an own special one commonly, using a normal TTF won't work as chinese will exceed the max texture size and so will kanji normally.
     
  35. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    Code (csharp):
    1. if( GUI.Button( new Rect( xPos, yPos += heightPlus, width, height ), "Rate This App" ) )
    2.         {
    3.             EtceteraBinding.askForReview( 1, 1, "Do you like this game?", "Please review the game if you do!", "https://userpub.itunes.apple.com/WebObjects/MZUserPublishing.woa/wa/addUserReview?id=366238041&type=Prime31+Studios" );
    4.         }
    Why not submit comments?
     

    Attached Files:

  36. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hxx2010, I'm not really sure what you are asking. If you are referring to letting the user input the rating and comment then manually sending that to Apple for obvious reasons it is not allowed. Developers would be able to sneak reviews in without users knowing.
     
  37. hxx2010

    hxx2010

    Joined:
    Aug 31, 2009
    Posts:
    155
    &type=Prime31+Studios

    What is the meaning of this
    Still have to write
     
  38. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @hxx2010, that url is just a placeholder url. You will want to generate your own. For instructions on how to generate your url go to the links from the docs page.
     
  39. geolog

    geolog

    Joined:
    Dec 4, 2008
    Posts:
    12
    It works like a charm. Thank you very much. )
     
  40. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    I am a bit confused about the askForReview function as far as the iTunes Link goes. If we are submitting the app for the first time how do we know the link?

    I love that it as a count you set for it to launch after x amount of times I am just a bit confused on how to point the itunes link to the app if the app isn't live yet?

    Do we have to submit the app, then update it once we know the link?

    - Matt
     
  41. mehware

    mehware

    Joined:
    Nov 19, 2007
    Posts:
    739
    Opps, nm I see the app ID in itunes connect for the app. Sorry heh, I'll try this.
     
  42. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @mehware, there are a couple linksnin the docs that will help out with formulating the links. I don't recall if you can a fully magic link all the way to the review button without the app ID but you can at least get them on the app page. You can always just have the app on first launch grab the URL off a website so that you can formulate it after the app is released.
     
  43. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    The Etcetera Plugin will soon have a little brother and we are taking feature requests. Are there any features in iOS that you really want to see exposed in Unity? Now is your chance to shape the sequel to the Etcetera Plugin. Tops on the list are VGA out and local notifications. If you have any suggestions post away ASAP.
     
  44. tr1stan

    tr1stan

    Joined:
    Jan 23, 2009
    Posts:
    150
    Hi Prime
    I found when MSAA is enabled, the takeScreenShot function is no longer working. Is it a bug?
    PS: what is the best channel for technical support, by email or in this thread?
     
  45. Moonjump

    Moonjump

    Joined:
    Apr 15, 2010
    Posts:
    2,572
    Is it possible to set up a build so that standard Unity settings in Xcode are changeable? For example, each time I do a build and replace in Unity, I then have to change kFPS, kAccelerometerFrequency and USE_OPENGLES20_IF_AVAILABLE. It would be nice if I could set them once in Unity. There probably are number of other settings that people tweak and have to redo each time.
     
  46. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    VGA out would be awesome. What about printing?
     
  47. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    @tr1stan, that is in fact a bug. Good find. For support if the topic could be useful to anyone else I definitely like to see it in here. If it is too specific to be useful to the masses than email works.

    @Moonjump, that could be a good one.

    @earl, what exactly would you want to print from a game?
     
  48. Thom Denick

    Thom Denick

    Joined:
    Jul 12, 2010
    Posts:
    32
    Hello,

    Addressing the earlier point about getting your takeScreenShot into the user's documents folder.. Not as easy as it sounds since Application.dataPath points to AppName/Data, and not /Documents. Additionally, as far as I can tell, I can't get a reference to the image created by takeScreenShot as it only returns a bool. It would be nice if in a future version you gave an option in the method to automatically dump the file into the user's documents folder since I had to use the code below just to parse my way to Documents...

    This is from this thread: http://forum.unity3d.com/threads/43080-Application.dataPath-...-not-fixed-BUG

     
  49. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,817
    Hi there,
    Just wondering if someone could help me with this - EtceteraBinding.saveImageToPhotoAlbum( ??? );
    I can take screenshots and use the email command to send them but how do you save them to the photo library? Just not sure what dir you put into this command...
     
  50. prime31

    prime31

    Joined:
    Oct 9, 2008
    Posts:
    6,426
    You will want to pass in the full, absolute path to the image you want to save.