Unity Community


Page 2 of 7 FirstFirst 1234 ... LastLast
Results 21 to 40 of 122

  1. Location
    Pasadena, CA
    Posts
    39
    What an interesting thread! Well after 2 weeks I've come back. Thanks to gangrel's suggestion of using 'Social.Default.Authenticate' I'm clear of errors. But when I run the program I get a blank scene with the message: Error: no achievements found UnityEngine.Debug:Log(Object) .

    Can someone Please post an example of how they got the GC to work. Basically I just created an empty game object and dropped the corrected API script on there. But obviously it's not linking to anything.

    @Daniel, where did you place; Social.ShowAchievementsUI and (); Social.ShowLeaderboardUI (); ? Within the Social API script? Also how does one set up Achievements for the query to find? I'm sure others besides maynull and I are dying to know how to do a basic setup for this GameCenter API. I have a 'Shooting Gallery' type game. You shoot and hit as many targets as possible before time runs out. I have a scoring script integrated and working. It displays points scored in a GUI texture. In my little brain somehow I need to reference these two. Help!!!!!

    There are also in my Social Files folder a jquery.js file , a docs.css file and some png files. where do these come into play! Sorry to be so dense but I suppose this is the forum to ask questions!
    Last edited by DigitalDuane; 01-14-2012 at 02:26 PM.
    An Analog Man In A Digital World


  2. Location
    Pasadena, CA
    Posts
    39

    Implementing Game Center 3.5

    Oooook! I added a little Pixie Dust to my cinnamon oatmeal this morn, and BAM! Game Center pops up on the development build on my iPad! Now I get a a Game Center box message asking me to sign in. After signing in, I get an error message saying 'This game is not recognized by Game Center. I imagine this is because I haven't enabled Game Center in iTunes Connect yet. Excuse me a moment while I 'Tebow' So, here's the drill @maynull and others who never attempt this amazing feat at home.

    > Create a new Javascript in Unity. I named it Game Center
    > Copy and Paste the Social API code into your new Game Center script.
    > Edit your code; changing 'Social.Authenticate', to 'Social.Default.Authenticate' as Gangrel suggested
    > In a new scene, or an appropriate scene, create an empty game object and add the script 'Game Center'.
    (I added 'Game Center' script to my existing Total Points scene.
    > Go into Xcode and add the Game Kit framework to your project. ****Very Important Step****** or the missing link
    >Go to you Project in Xcode >Click on Target > Build Phases > Click on the '+' sign and add the Game Kit.
    > *on the far right side of this line I changed 'optional' to 'required' Don't know if that's mandatory or not.
    >Connect your iPad or iPhone
    > Back in Unity 3.5, Hit build and run! Game Center sign in box should appear.

    If you don't know! Now you Know. Brother!
    An Analog Man In A Digital World

  3. Super Moderator
    Location
    Great Britain
    Posts
    9,657
    Think I'll be sticking with prime's expensive-but-working* solution for the time being!



    * 200 dollars worth if you get the whole lot. Thats half of ios basic so yeah, expensive... but good.
    Currently working with Sony on our new
    PS4 and Vita game in Unity!

    This post is not representative of Simian Squared Ltd


  4. Location
    UK
    Posts
    247
    Hi, I got Game Center login to work, but once its logged in my game just freezes with the "User has successfully logged in" message. Did anyone get any further than this?
    I'm getting a Bad Access error in UnityEngine_GameCenter_PopulateLocalUser:
    Any Ideas?
    GnarBike Trials - Motorbike game, build and share levels online!

  5. Administrator
    Location
    Copenhagen
    Posts
    1,586
    Please submit a bug report including the project - then we'll try to see if it's something on our end.

    (and please PM me the case number)
    Mathematicians that only do calculations that we already know about and are comfortable with? They're called accountants, and they have no friends.


  6. Location
    UK
    Posts
    247
    PM'ed, was reproducible with just the script though:
    Code:  
    1. function Start () {
    2.  print("Logging into GC");
    3.     Social.Default.Authenticate( ProcessAuthentication );
    4.  print("Crash?");
    5. }
    6.  
    7. static function ProcessAuthentication( success: boolean)
    8. {
    9.     if (success)
    10.     {
    11.         Debug.Log("Authenticated");
    12.  
    13.         // Do what when logged in?
    14.     }
    15.     else
    16.         Debug.Log("Failed to authenticate");
    17. }

    It freezes up just after login, with "Welcome back, User /n *** Sandbox ***" notification on screen.
    ProcessAuthentication is never called.

    Thanks for any help
    Last edited by Bug5532; 01-17-2012 at 04:23 PM.
    GnarBike Trials - Motorbike game, build and share levels online!


  7. Location
    Campbell, CA
    Posts
    28
    @nicholas and @Bug5532...

    What Bug is seeing is similar to what I was seeing at first, in that I was getting an exception on authentication because my account didn't have a profile pic attached to it. Once I added a profile pic, the exception went away.

    Bug, are you seeing a comment in the log about the account not having a profile pic?

    It's unreasonable to assume that the player will have a profile pic. When the library confirms authentication, it should test for the existence of a profile pic, and if there's one present can perhaps load it, but shouldn't except on it (instead providing a placeholder pic, in absence of one on Game Canter).

    I'm also experiencing another issue, after authentication. Upon hitting my authentication callback, I call Social.localUser.loadFriends(). But, I hit another exception there. I don't know what the issue is, obviously, since I can't see code, but something's failing when retrieving the friend list from Game Center. Perhaps it's also failing on the friend accounts not having profile pictures? I could verify by setting pics on them, and seeing if it succeeds, but I haven't tested that yet.
    Last edited by gangrel; 01-18-2012 at 02:43 PM.


  8. Location
    UK
    Posts
    247
    Quote Originally Posted by gangrel View Post
    @nicholas and @Bug5532...

    What Bug is seeing is similar to what I was seeing at first, in that I was getting an exception on authentication because my account didn't have a profile pic attached to it. Once I added a profile pic, the exception went away.

    Bug, are you seeing a comment in the log about the account not having a profile pic?

    It's unreasonable to assume that the player will have a profile pic. When the library confirms authentication, it should test for the existence of a profile pic, and if there's one present can perhaps load it, but shouldn't except on it (instead providing a placeholder pic, in absence of one on Game Canter).

    I'm also experiencing another issue, after authentication. Upon hitting my authentication callback, I call Social.localUser.loadFriends(). But, I hit another exception there. I don't know what the issue is, obviously, since I can't see code, but something's failing when retrieving the friend list from Game Center. Perhaps it's also failing on the friend accounts not having profile pictures? I could verify by setting pics on them, and seeing if it succeeds, but I haven't tested that yet.
    hmmm yes I was receiving that message, but it made no difference to me when I added a profile picture. It still froze up at the same point .
    GnarBike Trials - Motorbike game, build and share levels online!


  9. Location
    Campbell, CA
    Posts
    28
    Quote Originally Posted by Bug5532 View Post
    hmmm yes I was receiving that message, but it made no difference to me when I added a profile picture. It still froze up at the same point .
    Interesting.

    Another thing I noticed is that it takes Game Center some time to catch up. When I added a profile pic, it still didn't work at first. When I created and friended my test accounts, it took about 40 minutes before I could see the friend connections even within Game Center.

    Can you check your Game Center account, verify that you have a profile picture, and test again within your Unity App?
    Last edited by gangrel; 01-18-2012 at 06:23 PM.


  10. Location
    UK
    Posts
    247
    I changed nothing and today it started working! odd but I'm not going to complain, thanks for your help!
    GnarBike Trials - Motorbike game, build and share levels online!


  11. Location
    Campbell, CA
    Posts
    28
    Probably the Game Center delay I mentioned. Still, if Unity's assuming the presence of a profile pic, their code needs to change.

    Oddly, I now have a non-functional app. I separated out Social.Default.Authenticate and Social.localUser.LoadFriends into a separate app, so I could file a bug report on my LoadFriends issue, and am now failing on authenticate. #sigh
    Last edited by gangrel; 01-19-2012 at 10:56 AM.


  12. Location
    UK
    Posts
    247
    Any idea on how to get a score to report properly? I report the score, it says it's been a success but then it doesn't appear in the leaderboards. Although it says that the has been 1 score in the leaderboard but then when you click on it theres no scores there

    Also when using Social.ShowLeaderboardUI () can you select a certain leaderboard to open on?
    GnarBike Trials - Motorbike game, build and share levels online!


  13. Location
    Campbell, CA
    Posts
    28
    I've successfully reported achievements, but haven't yet seen scores appear in the leaderboard. I'm wondering if it doesn't show unless there are also scores by friends? I'm not sure, and haven't looked into it, yet. Right now I'm working on getting push notifications to work, while waiting for a bug response on my prior issue.


  14. Location
    UK
    Posts
    247
    Surely it should work with global highscores? Even so, I cant even see my submitted score... but weirdly it definitely looks like it has been submitted! ah why is this so difficult, haha
    GnarBike Trials - Motorbike game, build and share levels online!


  15. Location
    UK
    Posts
    247
    So has anyone managed to get highscores to submit? If so, how?
    GnarBike Trials - Motorbike game, build and share levels online!

  16. Super Moderator
    Posts
    197
    Quote Originally Posted by gangrel View Post
    Probably the Game Center delay I mentioned. Still, if Unity's assuming the presence of a profile pic, their code needs to change.
    We do not expect users to set up profile image and there is no exception. When loading profile images we print any error which might occur and it just so happens that GameCenter returns an error when no image is found. An empty placeholder image is used in this case.

    Quote Originally Posted by gangrel View Post
    Oddly, I now have a non-functional app. I separated out Social.Default.Authenticate and Social.localUser.LoadFriends into a separate app, so I could file a bug report on my LoadFriends issue, and am now failing on authenticate. #sigh
    You should not be going through Social.Default, this could be the source of your troubles. This has been refactored away in the next preview release, try just using Social.* directly.
    We have not been able to reproduce authentication issues (with or without profile images on the local user), PM me the bug number if you have reported any and not received a response.

    Quote Originally Posted by Bug5532 View Post
    Surely it should work with global highscores? Even so, I cant even see my submitted score... but weirdly it definitely looks like it has been submitted! ah why is this so difficult, haha
    Leaderboard should work, but when testing in the sandbox there are usually delays. I'm not sure how much delay you should expect but I've noticed scores popping up the day after I submitted.


  17. Location
    Campbell, CA
    Posts
    28
    @larus,

    I'm currently using the public b06, in which there is no Social.Authenticate -- hence my using Social.Default.Authenticate. When will there be a new beta?
    Last edited by gangrel; 01-20-2012 at 02:51 PM.


  18. Location
    UK
    Posts
    247
    Quote Originally Posted by larus View Post
    Leaderboard should work, but when testing in the sandbox there are usually delays. I'm not sure how much delay you should expect but I've noticed scores popping up the day after I submitted.
    Strange, It's been over 24hrs since I submitted scores and still they haven't appeared. I will leave it a while longer, maybe there'll appear one day

    Edit: Success! Just logged out of game center and then in with another account and I can see the score! yay
    Last edited by Bug5532; 01-20-2012 at 04:59 PM.
    GnarBike Trials - Motorbike game, build and share levels online!


  19. Location
    UK
    Posts
    247
    New question, Is there anyway to load up a specific leaderboard?
    GnarBike Trials - Motorbike game, build and share levels online!

  20. Super Moderator
    Posts
    197
    Quote Originally Posted by Bug5532 View Post
    New question, Is there anyway to load up a specific leaderboard?
    The leaderboard identifier is the first parameter in the Social.LoadScore() method, and is set in the Leaderboard.category property (in the next release this is renamed to simply Leaderboard.id).

    Quote Originally Posted by gangrel View Post
    @larus,

    I'm currently using the public b06, in which there is no Social.Authenticate -- hence my using Social.Default.Authenticate. When will there be a new beta?
    Try using Social.localUser.Authenticate(), I've replied to your bug report. The new developer preview release should be out soon, afaik.

Page 2 of 7 FirstFirst 1234 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •