Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Anyone interested in accessing the entire iOS SDK API from Unity?

Discussion in 'iOS and tvOS' started by u3dxt, Jul 6, 2013.

  1. Gigiwoo

    Gigiwoo

    Joined:
    Mar 16, 2011
    Posts:
    2,981
    I figured it out! I can't call LoadProduct() and Show(). I just need the show. In fact, calling LoadProduct more than once in the app is tricky, so I created 2 prefab instances, dropped the show, and walla! Works like a charm!

    Thanks,
    Gigi.
     
  2. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    u3dxt! I'm liking what you have made and have a question for you before I go ahead and buy your toolset. The iPad has the ability to connect to bluetooth devices that are not iOS for reasons other than multiplayer games, my question to you is, does your toolset support such bluetooth functionality? I'm not so clued up on all of this as I am just starting out learning about bluetooth communications, but my hope is to connect up to a custom made controller so I can use it to control a Unity3D game. However, in order to do this, I need to to be able to search for and connect to as well as list bluetooth devices that are in range.

    Might this be possible using your toolset? Thanks for your help in advance,
    TSLoire
     
  3. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @mattSydney Take a look at Unity's built-in Network.TestConnection http://docs.unity3d.com/Documentation/ScriptReference/Network.TestConnection.html. IAPXT's TransactionFailed event should be raised when a purchase has errors.

    @orcinusdev Can you post where it crashes? When building in Unity, enable Development Build and Script Debugging. It will show the crash location in C#.

    @TSLoire You would need the CoreBluetooth framework. It is in our plans, but we have no ETA for it yet.
     
  4. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    since this morning when i try to register player to see my GameKitXT.ShowGameCenter() it pop something empty " no elements", i cant see achievements and leaderboards, i didnt changed anything after it worked, any idea?


    Ifigured out: it dont connect over 3g ( maybe this case is only in China), with wifi it work fine again
     
    Last edited: Nov 27, 2013
  5. TechDevTom

    TechDevTom

    Joined:
    Oct 21, 2011
    Posts:
    33
    @u3dxt Thanks for that! No ETA though, darn, have you have any idea if this is available elsewhere until you put it into your pack? I realise that's like asking "Do you have any competition that has the same thing out already so I can buy that instead", but I really do need to plow on with what I'm doing and I definitely will be buying your pack =D Access to everything iOS, who wouldn't buy that!
     
  6. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Changchun Thanks for sharing what you are finding. I am sure it will be helpful to others.

    @TSLoire I see one plugin that might do what you need in the Asset Store. Just search for "bluetooth". But I am not sure if they are providing the same bluetooth API as we do (GameKit peers and iOS 7's Multipeer Connectivity) or the lower level CoreBluetooth framework. Hope it works well for you.
     
  7. DokRaphael

    DokRaphael

    Joined:
    Nov 17, 2012
    Posts:
    5
    @u3dxt
    Hi, any news for face tracking ?
     
  8. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,291
    Can i record the users voice and play it back a little different like in such apps like talking tom ?
     
  9. painkiller2007

    painkiller2007

    Joined:
    May 25, 2013
    Posts:
    44
    We really need a demo/proper instructions for the facetracking feature..

    Its really hard to understand with the documentation..
     
  10. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Jimks @painkiller2007 We are truly sorry about the delay for face detection example. We are trying to get it working, but getting stuck on memory issues with using Unity's WebCamTexture. We are hoping to get it fixed as soon as possible.

    @RandAlThor We don't support that feature right now. But we will add it to our plan. No ETA though as there are other features and fixes with higher demand at this time.
     
  11. agentleo

    agentleo

    Joined:
    Jan 2, 2011
    Posts:
    56
    Do you have an example of a simple UIView screen , and UILabel or Button. In regards to low level Api their not many examples which is understand able , but I have a feeling I am creating the view incorrectly.
     
  12. danien

    danien

    Joined:
    Jun 16, 2009
    Posts:
    71
    @u3dxt, I'm experiencing a crash bug when calling TurnBasedMatchesController.LoadAllMyMatches when I had 1 match in Game Center (although I don't think the number matters).

    From the source code at https://github.com/vitapoly/u3dxt/b...gamekit/GameKit/TurnBasedMatchesController.cs

    gkmatches is set to null at line 284, but at line 274 in the callback delegate for ReloadPlayers (which may be called later than line 284), it is still being used, resulting in a NullReferenceException.
     
  13. theQ

    theQ

    Joined:
    Oct 2, 2012
    Posts:
    9
    @u3dxt, I'm getting a NGUI conflict with UILabel naming when I import the package. I have numerous variable references to the UILabel from NGUI, but it looks like you are using the same naming convention, causing a conflict. It is throwing ambiguous reference errors out, with what appears to be the UIKit.UILabel.

    Assets/5_Scripts/TOOL_FPS.js(3,25): BCE0004: Ambiguous reference 'UILabel': UILabel, U3DXT.iOS.Native.UIKit.UILabel.

    I dump the IUKit folder as I'm not using it, but still have the errors.

    Am I the only one getting this?

    Q
     
  14. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @agentleo If you are using the low-level API to add views, you will have to get familiar with the Apple docs here https://developer.apple.com/library...s.html#//apple_ref/doc/uid/TP40009503-CH5-SW1. Other than the syntax and you don't have to manage memory like in Object-C, the documents are relevant. However, some classes/methods are not available in U3DXT yet. Let us know which of them you need, and we will put them as priority in our plans. What exactly are you trying to do with views, labels, and buttons? Maybe there is another way without using the low-level classes.

    @danien Thanks for pointing that out. We will change it to "matches" instead in the next version.

    @Q For namespace/class naming conflicts, you can use the fully specified name. So, if you are using our UILabel, you should specify U3DXT.iOS.Native.UIKit.UILabel.
     
  15. theQ

    theQ

    Joined:
    Oct 2, 2012
    Posts:
    9
    Thanks, but it is not barking at my reference to U3DXT's UILabel - but to the one I already have in place with my NGUI reference. The introduction of the following U3DXT.iOS.Native.UIKit.UILabel forces an Ambiguous Reference error to all of my already setup (NGUI) UILabel variables.

    I guess I need to chase down a full specified name for NGUI's UILabel?

    Q
     
  16. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Q Yes, you will need to find the fully specified name for NGUI's UILabel. In those files that you have conflicts, you can also NOT import/using U3DXT.iOS.Native.UIKit.
     
  17. theQ

    theQ

    Joined:
    Oct 2, 2012
    Posts:
    9
    Is there a way to exclude the UIKit portion of the U3DXT package so I can sidestep the entire issue? I am really only looking for the Social elements of U3DXT at the moment.

    Q
     
  18. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Q There is no way to exclude the UIKit portion of U3DXT because it is an integral part of the plugin. Does not importing/using U3DXT.iOS.Native.UIKit not work? Maybe you can include your Assets/5_Scripts/TOOL_FPS.js file so we can better help you.
     
  19. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,455
    Hi guys,

    I just bought this really great asset and asked about if you support saving video files.
    Your reply was that it's not yet in the package and "in the plans" but do not know when...

    This leaves me a bit out in the cold waiting for an unknown time period. Not a good state to be in.

    This brings me to think about the daunting task that you guys have set for yourselves. It's quite a HUGE promise to porting "ALL of IOS to Unity". You guys said that you are very good at doing this and gotten quite fast. I believe it, but what about IOS 8,9,10 etc.. How will you be able to support ongoing versions of IOS ? What happens should something happens in personal life and you guys want to move on to something else ( many asset makers have done this)

    Instead of locking yourselves into this Humongous Commitment, Free yourselves by adding the option for users who have bought your package to be able to Add and Extend with new functionality. This approach is what Unity is all about. Creating the base in which we can extend.

    This means that as IOS 8,9... comes out, those that have bought this Framework can continue to upgrade it themselves. It's clear that those who have bought this package are not yet IOS experts, but in time, we will more acquainted.

    If you invest time in this direction, then you will have a package that is constantly growing and being supported by the developers who have bought your framework.

    Cheers.
     
  20. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Rocki Thank you for investing in us. A good guide to exposing iOS functionality can be found here: http://blogs.shephertz.com/2013/08/23/bridging-the-gap-plugin-for-unity-and-ios/
    It appears your app has discrete functionality that needs to be done in iOS that we do not support yet. So, it's possible to just expose 4 or 5 functions from iOS to Unity3D.

    As for us, we are in the business of exposing everything. It is not for the faint of heart and we've already done so for over 4,000 APIs. It is entirely possible to extend our API using the method described above and writing the binding code. But we prefer that this task be left to us so we can provide a consistent and stable code base. The source code to the high level API (what most of our customers use) is available on GitHub. https://github.com/vitapoly/u3dxt?files=1 and we'd love for people to help contribute.

    We are still actively opening up more frameworks and APIs. We shifted some of our time to writing tutorials and examples for the major frameworks. But as people like yourself are requesting the less used frameworks, we shift our focus back to opening it up for you.

    Thanks again!
     
  21. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,455
    @U3dxt,

    Thanks for the info and the links.

    "But as people like yourself are requesting the less used frameworks, we shift our focus back to opening it up for you."

    Much Appreciated it. Awesome.
     
  22. rich5813

    rich5813

    Joined:
    May 21, 2013
    Posts:
    3
    Hi,

    I'm just testing U3DXT tools, I cant get the Webview to show on my ipad. I created a new project, loaded the demo webview scene, building to xcode iOS 7 SDK from Unity 4.3 pro. No exceptions being thrown when the scene runs, but the webview window just not being rendered in the scene. Any ideas?

    Thanks
     
  23. danien

    danien

    Joined:
    Jun 16, 2009
    Posts:
    71
    @u3dxt, Found another NullReferenceException issue in TurnBasedMatchesController but this may be due to Game Center API quirks.

    It seems that if a turn-based match is created on iOS 7 and then LoadAllMyMatches is called on iOS 6, TurnBasedMatch.gkTurnBasedMatch.matchData is null, even though TurnBasedMatch and TurnBasedMatch.gkTurnBasedMatch instances are all valid.

    If the turn-based match is created on iOS 6, LoadAllMyMatches will load the matchData correctly on both iOS 6 and 7.

    To clarify, there is no crash in high level GameKit until we actually try to access the matchData.

    We are using the normal GameKit, not iOS 7 GameKit, because we want to support iOS 6.
    We are using a iPhone 5S with iOS 7 and an iPad 2 with iOS 6 for testing.
    We call TurnBasedMatchesController.LoadAllMyMatches to get a list of all the local player's matches so we can display them in a menu.

    Came across this in the Apple dev forums, which said that loadMatches doesn't always return the latest match data.
    https://devforums.apple.com/message/769035#769035

    So I gave it a try by adding another call to gkTurnBasedMatch.LoadMatchData (before line 272 in https://github.com/vitapoly/u3dxt/b...gamekit/GameKit/TurnBasedMatchesController.cs) and this seemed to fix the problem. However, the use of another deferred callback delegate may complicate things with the delegate for ReloadPlayers at line 272.

    Any suggestions?
     
  24. danien

    danien

    Joined:
    Jun 16, 2009
    Posts:
    71
    On second thought, I've decided to call LoadMatchData manually at a later time, which gives me more control over memory usage. It's arguable whether the high level API should do this automatically since this is the behaviour of Apple's native Game Center API, but I suspect other users might encounter this. So, maybe a note in your documentation might help save everybody some time.
     
  25. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    I have a strange behavior with gamecenter: It close itself

    I havent any line of code to close it, only a button with one line of code : GameCenter.Instance.ShowGameCenter ();

    Any idea on what could close it ? it happen reandomly from 2 to 8 seconds after i open it
     
  26. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
  27. tthorjen

    tthorjen

    Joined:
    Nov 12, 2013
    Posts:
    2
    Hi u3dxt,

    There seems to be an issue with the multipeer framework that's causing disconnects. You can find out more at this stackoverflow answer here:

    http://stackoverflow.com/questions/18935288/why-does-my-mcsession-peer-disconnect-randomly

    Basically, I will need the MCSession to implement this method:

    - (void) session:(MCSession *)session didReceiveCertificate:(NSArray *)certificate fromPeer:(MCPeerID *)peerID certificateHandler:(void (^)(BOOL accept))certificateHandler

    Otherwise, the multipeer framework isn't very useful at the moment. Can you look into this?
     
  28. AndrewK

    AndrewK

    Joined:
    Sep 14, 2012
    Posts:
    38
    Hi u3dxt!

    I am trying to implement InAppPurchase, I run IAPTest scene and modyfied IAPTest.cs exactly as it is described in the tutorial, but I get crash on a device at startup. Can you help me with that?
    I do not know how to debug this, because as I understand it is impossible to attach debuger to the device before application start.
     
  29. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @tthorjen I will look into this today.

    @AndrewK, are you using Unity3D 4.3.1? In Assets->U3DXT->About, what version does it say? It should say 1.6.0.0. In 1.6.0.0, the IAPTest scene is different from the tutorial. Instead of editing the IAPTest.cs directly, select the MainCamera object in the scene and change the ID values in the Unity Editor.

    @Changchun That is odd. Are you using a test user account? What version of Unity and plugin? Also, please post the code, I will try to reproduce it. Thanks.

    EDIT:
    @tthorjen we are adding didReceiveCertificate to the low level API now. We will also update the high level API so you can handle it using events. I will update again when we've pushed the build out. Thanks.
     
    Last edited: Dec 6, 2013
  30. AndrewK

    AndrewK

    Joined:
    Sep 14, 2012
    Posts:
    38
    I have Unity 4.3.0f4 and U3DXT 1.6.1.0

    But I did IAPXT.Init() after connecting to debugger and I got this information in the debugger:
     

    Attached Files:

    Last edited: Dec 6, 2013
  31. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @AndrewK Thank you for pointing this out to us! We recently added:
    Code (csharp):
    1.  
    2.         public string localizedPrice {
    3.             get {
    4.                 return price.ToString("C", priceLocale.ToCultureInfo());
    5.             }
    6.         }
    7.  
    Apparently that's not how you do it and it's affecting some of our international friends. I will post another update when we come up with another solution. Thanks!
     
  32. AndrewK

    AndrewK

    Joined:
    Sep 14, 2012
    Posts:
    38
    No problem, but I have another issue: when I want to buy "Coins" I got this log:
    TransactionFailed: com.mycompany.100coins, 2, Cannot connect with iTunes Store

    and obviously I have internet connection on the device
     
  33. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @AndrewK is your bundle id com.mycompany in player settings? Is com.mycompany.100coins set up in itunesconnect.apple.com (it should be exactly as the app purchase id)? Finally, are you using a test user (not your real iTunes account, also created in itunesconnect.apple.com)? Thanks.
     
    Last edited: Dec 6, 2013
  34. AndrewK

    AndrewK

    Joined:
    Sep 14, 2012
    Posts:
    38
    Yes to all of this questions


    EDIT:
    Sorry mate, I realized I did not logged in to my testuser account. Now everything is perfect.
    Thank You!
     
    Last edited: Dec 6, 2013
  35. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    Could you wrap the classes you made in your example projects under the U3DXT namespace, so they do not conflict with the clases of other libraries. Currently, if you use GameAnalytics with U3DXT, the ComboBox class exists in both libraries. It be nice not to have these errors when importing your plugin.
     
  36. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @BenBearFish We are trying to support Unity 3.5.x. While we are able to use namespaces for our Classes, Unity 3.5.x does not support namespaces for Prefabs and certain other instances. But I hear you, perhaps we will transition to appending "U3DXT_" to our Prefabs and Examples.
     
  37. fred_gds

    fred_gds

    Joined:
    Sep 20, 2012
    Posts:
    184
    Hey,

    First of all. This is a great Plugin, almost a must have.

    But I am actually unable to implement a Music Player myself into my app. I mean just want to give the player some quick buttons to Play/Pause the music from the iPod and to skip the song to get to the next song.

    So in the API docs I came up with MPMusicPlayerController which I would have to use together with it's methods Play, Pause and SkipToNextItem.

    But I didn't get any farther than that. It would be nice to get a sample code on how to actually use this method in my game context.
     
  38. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @Fred'sIphone Ok. I will create that an example in the next few days. In the meantime, here is some example code:
    Code (csharp):
    1.  
    2.     // Use this for initialization
    3.     MPMusicPlayerController musicPlayerController;
    4.     Texture2D artworkTex2D = null;
    5.    
    6.     public MPMediaItem mediaItem = null;
    7.     void Start () {
    8.        
    9.         if ( !CoreXT.IsDevice )
    10.             return;
    11.        
    12.                 // whenever the now playing item changes, just play it
    13.         musicPlayerController.NowPlayingItemDidChange += delegate(object sender, U3DXT.iOS.Native.Foundation.NSNotificationEventArgs e) {
    14.             Debug.Log ("changed and ready to play");
    15.             musicPlayerController.Play();
    16.         };
    17.  
    18.                 // we MPMediaQuery to programmatically grab music from the player's library
    19.         MPMediaQuery query = new MPMediaQuery();
    20.         // we can add a predicate based on playlist, album, artist, etc., but for now, let's just get everything
    21.                 object[] items = query.items;
    22.         mediaItem = (MPMediaItem)items[Random.Range(0, items.Length)];        // randomly choose one to play
    23.  
    24.         if ( mediaItem != null )
    25.         {
    26.             Debug.Log("Now Playing Media Item Found");        
    27.                          
    28.                          // grab the artwork if you want
    29.             MPMediaItemArtwork artwork = (MPMediaItemArtwork) mediaItem.Value(MPMediaItem.PropertyArtwork);
    30.             UIImage image = artwork.Image (new Size(250,250));
    31.             artworkTex2D = image.ToTexture2D();
    32.             renderer.material.mainTexture = artworkTex2D;
    33.  
    34.  
    35.                         // change the now playing item and the delegate will play it
    36.                        musicPlayerController.nowPlayingItem = mediaItem;
    37.         }
    38.          }
    39.  
     
  39. fred_gds

    fred_gds

    Joined:
    Sep 20, 2012
    Posts:
    184
    Thanks for that answer. I'm waiting for that example because with the code you provided I keep crashing on following line:

    Code (csharp):
    1.  
    2. musicPlayerController.NowPlayingItemDidChange += delegate(object sender, U3DXT.iOS.Native.Foundation.NSNotificationEventArgs e)
    3.         {  
    4.             Debug.Log ("changed and ready to play");   
    5.             musicPlayerController.Play();
    6.         };
    7.  
    I tried several things but I couldn't find the reason.
     
  40. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    Oh, I forgot to instantiate the MPMusicPlayerController.

    Code (csharp):
    1.  
    2. musicPlayerController = new MPMusicPlayerController();
    3. ...
    4.  
     
  41. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,455
    Hi Guys,

    Can you could give some time estimate of when some the video stuff I need from the AVFoundation framework can be hooked up.

    Cheers.
     
  42. fred_gds

    fred_gds

    Joined:
    Sep 20, 2012
    Posts:
    184
    Ok that fixed the error. I got it all setup as needed now. Thank you.
     
    Last edited: Dec 9, 2013
  43. Shefich

    Shefich

    Joined:
    May 23, 2013
    Posts:
    106
    Hello u3dxt team!
    Thank you for your framework. I just upgraded to 1.6.1.0 (last version) and found some bugs or warnings:
    First, you need to remove examples in your project if you don't use gamekit (for example)
    Second, xcode give me error (malloc... or smthg) if i am trying to make purchase with personal account but not test account (in sandbox mode)
    I hope these bugs won't affect final build and after release experience.
     
  44. spyder482

    spyder482

    Joined:
    Jan 25, 2013
    Posts:
    11
    I have a repro project. Not sure where to send it.
     
  45. spyder482

    spyder482

    Joined:
    Jan 25, 2013
    Posts:
    11
    It's a really simple repro. You have one scene with a WebViewGameObject in it and a script that loads a scene (in this case for simplicity it's loading the same scene). When the scene is unloaded, the crash happens.
     
  46. picard_tba

    picard_tba

    Joined:
    Dec 6, 2013
    Posts:
    12
    Hi ...

    THIS PlugIn is amazing. While reading the list of options and tools my jaw hit the ground! Amazing !
    Sadly I cannot really get into the API documentation. Before I buy the tool (and I definitively will!) can you answer me two (I think) simple question.

    1.) Is it possible to stream a video (from local or from the web) into a texture, so that I can access the color of the pixels (like via texture.getpixel() or via shader) ?

    2.) Is it possible to export a captured video, including audio to local or to the web ?

    Sorry about my really basic questions... but the API Documentation is (I think) at least 1000-2000 pages long and I could not find any information related to my question ... ( under U3DXT.iOS.MediaPlayer I could only find an Audio Export... nothing related to video )

    Thank you very much
     
  47. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @AndrewK @Shefich @spyder482 We have released a new version (1.6.2.1) with fixes to IAP. Please update and let us know.

    @tthorjen The newly released version (1.6.2.1) also comes with the low-level MCSessionDelegate.DidReceiveCertificate and high-level MultipeerXT.SessionDidReceiveCertificate event.
     
  48. u3dxt

    u3dxt

    Joined:
    Jul 6, 2013
    Posts:
    317
    @rocki The AVFoundation framework has some very complicated and low-level (pointers, memory access) stuff. It will be at least 2 to 3 months before we have this.

    @picard_tba Thanks for your interest. We have a FREE version you can try all these features before you commit to buy. https://www.assetstore.unity3d.com/#/content/11817

    To answer your questions:

    1) Currently, we don't have the full AVFoundation framework yet. Once there, it might be possible to get each frame from a video and then load it into a texture. However, we cannot be sure now about the performance.

    2) Exporting video seems doable with the current version. However, we haven't tried and we don't have the high-level API for it. You will have to dive into the low-level API yourself for now. Source for export audio is here: https://github.com/vitapoly/u3dxt/blob/master/src/highlevel/mediaplayer/MediaPlayer/MediaExporter.cs
     
  49. Tiny-Tree

    Tiny-Tree

    Joined:
    Dec 26, 2012
    Posts:
    1,314
    Hello, i need some help with IAP and restore purchase, i have a button that call:
    Code (csharp):
    1. public void RestorePurchase()
    2.     {
    3.         IAPXT.RestoreCompletedTransactions();
    4.     }
    and i check when player buy the game like this:


    Code (csharp):
    1. void OnTransactionCompleted(object sender, TransactionEventArgs e) {
    2.         Debug.Log("TransactionCompleted: " + e.productID + ", " + e.quantity);
    3.         if(e.productID ==fullgameID)
    4.         {
    5.             Debug.Log("//bought the game//");
    6.             PlayerPrefs.SetInt ("has bought",88);
    7.         }
    then i check when the restore is successful, but how to do it in my case? cant find something like a bool

    Code (csharp):
    1.     void OnRestorationCompleted(object sender, EventArgs e) {
    2.         Debug.Log("RestorationCompleted");
    3.         //if (have purchased the game before)
    4.         //{
    5.         //PlayerPrefs.SetInt ("has bought",88);
    6.         //}
    7.     }
     
  50. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,455
    C'ommon guys,

    See, there's already another person asking for exactly the same thing I was asking.

    Would you consider raising the priority for working with Video.

    +1 AVFoundation.