Cloud Goods - SocialPlay/CloudGoodsUnitySDK GitHub Wiki
CloudGoods class is the core class of the Cloud Goods SDK. This hold all of the service calls to the Cloud Goods server that are called to manage the persistent data in your game. It also hold all of the static data that the cloud goods systems might need to manage calls such as Application/Game ID, and the current logged in User Info.
An event that gets fired off when there is an error callback detected with one of the webservice calls. Returns string message summary of the related error
static public Action<UserResponse> OnUserLogin
An event that fires off when the user has successfully been authenticated and logged in by the server. Returns a UserResponse.
###static public event Action<string> OnLogout Gets fired off when user logs out. Returns string message of any errors.
###static public Action<UserResponse> OnUserRegister Gets fired off when user is confirmed to have registered to the server. Returns a UserResponse object.
###static public Action<UserResponse> OnForgotPassword Gets fired off when a User requests to retreive their password. Returns a UserResponse object.
###static public Action<UserResponse> OnVerificationSent Gets fired off when a user sends a re-verification message for registering user to the game. Returns a UserResponse
###static public Action<string> OnRegisteredUserToSession Gets fired off once the game has received a callback from the server that a user has registered to a game session. Returns a string representation of the SessionID
###static public Action<List<StoreItem>> OnStoreListLoaded Gets fired off when the webservice call returns with the list of store items for the App. Returns a list for StoreItem
###static public Action<List<ItemData>> OnItemsLoaded Gets fired off when the users items have been loaded from the server. Returns list of ItemData
###static public Action<int> OnStandardCurrency Returns the int amount of a users Standard currency
###static public Action<int> OnPremiumCurrency Returns the int amount of a users Premium currency
###static public Action<string> OnStandardCurrencyName Returns the string name of the worlds Standard currency
###static public Action<string> OnPremiumCurrencyName Returns the string name of the worlds Premiumcurrency
###static public Action On StandardCurrencyTexture Returns the texture image of the worlds StandardCurrency
###static public Action<Texture2D> On PremiumCurrencyTexture Returns the texture image of the worlds Premium Currency
The key to the secure cloud goods calls like giving player credits, is set in the cloud goods settings window
The ID of the application tied to this game. This is set in the cloud goods settings window.
Returns the Gameobject that will be instantiated when an item is dropped into the world from the item aquire system
Returns the default GameObject that will be instantiated as a container item for the UnityUIItemContainer
Shows if a user is logged in with cloud goods
The current logged in user, has all of the user info.
This function is called to attempt to authorize and log in a user to the application. Parameter userInfo is the CloudGoodsUser of the user attempting to log in.
This function generates random items from the game based on the parameters that are set in the call. This is used to generate drop items or giving players random items.
This function will retrieve the items of the currently logged in user.
This function will retrieve the items of a specific player
This function will retrieve item information of a single item type from a given location.
This function will consume a certain amount from a specified item in a given location.
This function checks the local list of owners items and checks if the user has the item.
This function checks and retieves item information of an item in the local list of owner items, using the item ID as a look up.
This function checks and retieves item information of an item in the local list of owner items, using the item name as a look up.
This function is used to move an item stack from one location to another location
This function is used to move multiple item stacks from one location to another location
This function is used to remove a all items in a single item stack from a given location
This function will deduct a single quantity from an item stack. Will be removed from location 0.
Removes a list of item stacks from a user.
Will generate a list of items for a user at location 0.
Retrieves userInfo for a given user
Gets a sessionID from a server, usually after a user has logged in.
Gets a user Access pin login for an access pin style log in used in cross platform game login.
Logs a user into the developer application world. Receives a userResponse on success
Registers a new user to the developers application
This function tells the server to send the user a password reset email
This function tells the server to send the user and email to re-verify their registration.
Removes local cached info of a user
This function will consume a given amount of the currently logged in users premium currency
Retrieves the current amount of free currency of the currently logged in user
Retrieves the current amount of premium currency of the currently logged in user
Get the worlds currency info like name, and texture image.
Retrieves a list of StoreItems for the given application
Retrieves a storeItem from the local cached list of store items
Retrieves a storeItem from the local cached list of store items using the itemID as the look up.
Retrieves a storeItem from the local cached list of store items using the name as the look up.