question

ImaginaryFlash avatar image
ImaginaryFlash asked

Implementing GameCircle in Unity

Can someone please clear up the instructions for Implementing GameCircle in Unity? I created a brand new project and imported the unitypackage and have finished every step on this page https://developer.amazon.com/sdk/gamecircle/documentation/unity-gamecircle-setup.html On step six it says to "Initialize Amazon GameCircle in Your Game" that I need to put the following code in my game to initialize the plugin. I created a new game object/cs script and attached the script to the object. This is the script, straight from the documentation: using UnityEngine; using System.Collections; public class GameCircleGUI : MonoBehaviour { void Start () { #if UNITY_ANDROID //Subscribe to the GameCircle events // This event indicates that GameCircle has been Initialized GameCircleManager.serviceReadyEvent += ServiceReadyHandler; // These are Whispersync events GameCircleManager.onSynchronizeFailureEvent += SyncFailHandler; GameCircleManager.onNewGameDataEvent += NewGameDataHandler; // GameCircle should only be initialized when the game is first launched // Use a bool to run GameCircle.init() only on first launch if (GameManager.firstLaunch) { //Initialize GameCircle Debug.Log ("Initializing GameCircle"); // The GameCircle.init() method takes 4 bool parameters // The first parameter indicates whether the game currently has local game state saved // The remaining 3 parameters indicate which GameCircle features are used // Features: Leaderboards, Achievements, Whispersync GameCircle.init (true, true, true, true); GameManager.firstLaunch = false; } #endif } // Update is called once per frame void Update () { } } All i get is a bunch of errors: Assets/Plugins/GameCircleAndroid/GameCircleGUI.cs(12,52): error CS0103: The name `SyncFailHandler' does not exist in the current context Assets/Plugins/GameCircleAndroid/GameCircleGUI.cs(13,45): error CS0103: The name `NewGameDataHandler' does not exist in the current context Assets/Plugins/GameCircleAndroid/GameCircleGUI.cs(17,9): error CS0103: The name `GameManager' does not exist in the current context The name `GameManager' does not exist in the current context)(1): skipped because it was sent more than once in 0.10 seconds Assets/Plugins/GameCircleAndroid/GameCircleGUI.cs(25,9): error CS0103: The name `GameManager' does not exist in the current context The only thing in my scene is the new game object with the single .cs GameCircleGUI script attached. The script only contains the code mentioned in the Game Circle implementation instructions. Is there something missing in the documentation that I need to get this to work?
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ImaginaryFlash avatar image
ImaginaryFlash answered
Answered my own question
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ImaginaryFlash avatar image
ImaginaryFlash answered
Answered my own question
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Peter C. Heinrich avatar image
Peter C. Heinrich answered
Hi Stefanie, Do you mind if I ask what you answer you settled on? We're always looking for data points we can use to improve our documentation. Thanks! -peter
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

shashchamp avatar image
shashchamp answered
Hey can you post your findings here. I am also facing the same issue.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brad Herman avatar image
Brad Herman answered
Same issue here too, can someone please post a clear solution to this. I tried adding the prefab to my scene, that didn't effect this.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi, Before initializing Amazon GameCircle in your Game, please make sure to import the Amazon Gamecircle unity plugin in your app successfully. Import the GameCircle Unity plugin as a Custom Package. In Unity, click: Assets > Import Package > Custom Package Select the GameCircle Unity plugin package. Hope this info helps.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

moproductions avatar image
moproductions answered
Hello Sachin. I've done what you said and imported the custom package in to Unity. However, I am still seeing the errors mentioned at the top of the thread, aka "ServiceReadyHandler does not exist in the current context" etc but for all the Handlers and also the GameManager. I've done a search in my code and I can't find any of the referenced variables, so it appears they don't exist in the package. Were they renamed or something? Also, I'm using Unity 4.1. Thanks! We're anxious to get started on this. -Mo
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Hi Mo, Thank you for your post. Can you please raise a ContactUs ( https://developer.amazon.com/help/contactus.html) for this and one of our support engineer will assist you further.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

moproductions avatar image
moproductions answered
Done :)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Fat Bob avatar image
Fat Bob answered
Is there a answer to this? I get these errors? The name `ServiceReadyHandler' does not exist in the current context Where do the Handlers come from they are not in the scripts
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.