You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-12Lines changed: 52 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -13,15 +13,19 @@ _iOS is a trademark of Apple, Inc._
13
13
## Overview
14
14
15
15
The Google Play Games plugin for Unity allows you to access the Google Play Games
16
-
API through Unity's [social interface](http://docs.unity3d.com/Documentation/ScriptReference/Social.html). The initial release of the plugin provides support for the
16
+
API through Unity's [social interface](http://docs.unity3d.com/Documentation/ScriptReference/Social.html).
17
+
The plugin provides support for the
17
18
following features of the Google Play Games API:<br/>
18
19
19
20
* sign in
20
21
* unlock/reveal/increment achievement
21
22
* post score to leaderboard
22
23
* cloud save read/write
23
-
* show built-in achievement UI
24
-
* show built-in leaderboards UI
24
+
* show built-in achievement/leaderboards UI
25
+
*[turn-based multiplayer](TBMP.md).
26
+
*[real-time multiplayer](RTMP.md).
27
+
28
+
All features are available on Android and iOS.
25
29
26
30
Features:
27
31
@@ -33,21 +37,19 @@ Features:
33
37
34
38
System requirements:
35
39
36
-
* Unity® 4.2 or above
40
+
* Unity® 4.3 or above
37
41
* To deploy on Android:
38
42
* Android SDK
39
-
* Google Play Services library
43
+
* Google Play Services library, version 4.2.42 or above
40
44
* To deploy on iOS:
41
45
* XCode 4 or above
42
46
* Google Plus SDK for iOS
43
47
* Google Play Games SDK for iOS
44
48
45
-
Note: This first release does not yet include support for multiplayer, listing friends,
46
-
interactive posts, raw data access, etc.
47
49
48
50
## Upgrading
49
51
50
-
If you have already integrated your project with a previous version of the plugin and wish to upgrade to a new version, please refer to the [upgrade instructions](https://github.com/playgameservices/play-games-plugin-for-unity/blob/master/UPGRADING.txt).
52
+
If you have already integrated your project with a previous version of the plugin and wish to upgrade to a new version, please refer to the [upgrade instructions](UPGRADING.txt).
51
53
52
54
## Configure Your Game
53
55
@@ -59,6 +61,10 @@ on). Be particularly careful when entering your package name and your
59
61
certificate fingerprints, since mistakes on those screens can be difficult to
60
62
recover from.
61
63
64
+
If you intend to use real-time or turn-based multiplayer in your game, remember
65
+
to activate those features in the Google Play Developer Console when creating
66
+
your application instances.
67
+
62
68
Please note the following pieces of information when creating your client IDs,
63
69
as they will be necessary later:
64
70
@@ -103,7 +109,7 @@ quickly test your setup and make sure you can access the API.
103
109
If you want to test a larger sample after you are familiar with the plugin,
104
110
try the **CubicPilot** game.
105
111
More information about building the samples can be found in the
@@ -507,9 +521,12 @@ fingerprint you entered in the Developer Console during the setup.
507
521
508
522
## Building for iOS
509
523
510
-
To build your game for iOS, do as you would normally do in Unity. Select **File | Build Settings**, then select the **iOS** platform. However, do not choose
511
-
**Build & Run**. Instead, choose only **Build**, and select an output directory
512
-
to save the XCode project.
524
+
To build your game for iOS, do as you would normally do in Unity. Select **File | Build Settings**, then select the **iOS** platform.
525
+
Click **Player Settings** and make sure that the target iOS platform is 6.0 or above.
526
+
527
+
Then, click **Build** and select an output directory to save the XCode project. Do not use
528
+
the **Build and Run** option, since there are some manual steps you must take in
529
+
the XCode project before your project can run.
513
530
514
531
After building the XCode project, the Play Games postprocessor will run to
515
532
configure the Info.plist settings on your project. You will see a log of the
@@ -533,6 +550,7 @@ frameworks to that list:
533
550
**QuartzCore**<br/>
534
551
**Security**<br/>
535
552
**SystemConfiguration**<br/><br/>
553
+
**libc++.dylib**<br/><br/>
536
554
2. Add the following bundles and frameworks from the Google Plus and Google Play
537
555
Games SDK that you have previously downloaded. If you have not downloaded
538
556
these files yet, they can be found [in the downloads section](https://developers.google.com/games/services/downloads) of the Google Play Games developer site. To add these frameworks you can simply drag
@@ -551,6 +569,15 @@ and drop those 5 files on the top-level project item (labeled **Unity-iPhone**).
551
569
directory, you can use Unity's **Append** option to avoid overwriting these
552
570
settings. If you use **Replace**, however, you might have to reapply some settings.
553
571
572
+
## Common Build Errors on iOS
573
+
574
+
**"The current deployment target does not support automated _weak references"**. Make sure your target iOS platform is 6.0 or above. If the target platform is below 6.0, this error will occur during build.
575
+
576
+
**"Dsymutil error"**. Depending on your version of XCode, you may need to disable dSYM file generation. To do this, go to Build Settings |
577
+
Build Options | Debug Information Format | Debug. Select **DWARF** instead of **DWARF with dSYM**.
578
+
579
+
**URL errors while signing in.** This is often a sign that either the client ID or the Bundle Identifier is not correctly set up, or that your **Info.plist** file got corrupted. Check that your client ID and Bundle ID are correctly configured in the project and that they correspond to the data in the Developer Console.
580
+
554
581
## Building for iOS to run on the simulator
555
582
556
583
To run your game in the simulator as opposed to a real device, you must export
@@ -646,15 +673,28 @@ That way, you can even submit scores and achievements simultaneously to two or m
In the `GPGSAppController.m` file, you will notice within the `application:didRegisterForRemoteNotificationsWithDeviceToken` method that there are two calls;
679
+
one for using a push notification in the sandbox environment, and one for using a push notification in the production environment. You should make sure to
680
+
comment the first call (and uncomment the second) when you're ready to switch to a production environment and push notification.
681
+
682
+
649
683
## Note from Maintainer
650
684
651
685
The plugin was developed and is currently maintained by [Bruno Oliveira](https://plus.google.com/+BrunoOliveira). Feel free to add me on Google+ and nag me to fix bugs or take a look at your questions on Stack Overflow!
652
686
687
+
## Acknowledgements
688
+
689
+
The iOS library makes use of the [MiniJSON.cs](https://gist.github.com/darktable/1411710) class developed by Calvin Rien (originally based on a parser by Patrick van Bergen),
690
+
available under the MIT License.
691
+
653
692
## Special Thanks
654
693
655
694
This section lists people who have contributed to this project by writing code, improving documentation or fixing bugs.
656
695
657
696
*[Dgizusse](https://github.com/Dgizusse) for figuring out that setting JAVA_HOME is necessary on Windows.
658
697
*[antonlicht](https://github.com/antonlicht) for fixing a bug with the parameter type of showErrorDialog on the support library.
659
698
*[pR0Ps](https://github.com/pR0Ps) for fixing an issue where OnAchievementsLoaded was not accepting an OPERATION_DEFERRED result code as a success.
699
+
*[friikyeu](https://github.com/friikyeu) for helping debug [an issue](https://github.com/playgameservices/play-games-plugin-for-unity/issues/25) that caused API calls to be queued up rather than executed even when connected.
0 commit comments