Combu
3.2.2
Unity API Documentation
|
Combu Manager class, it follows the Singleton pattern design (accessible through the 'instance' static property), it means that you shouldn't have more than one instance of this component in your scene. More...
Public Member Functions | |
void | Connect () |
Connect to server if not already initialized. More... | |
void | CallWebservice (string url, WWWForm form, System.Action< string, string > onComplete) |
Calls a webservice. More... | |
void | CancelRequest () |
Cancels the current request (next frame). More... | |
CombuForm | CreateForm () |
Creates a new form to be passed to a webservice. More... | |
string | GetUrl (string relativeUrl) |
Gets the absolute URL from a relative. More... | |
virtual void | SetLocalUser (User user) |
Sets the local user. For internal use only (e.g. User.Authenticate), it's not recommended to call this method directly. More... | |
virtual void | GetServerInfo (Action< bool, CombuServerInfo > callback) |
Gets the server info. More... | |
virtual void | Ping (bool onlyIfAuthenticated=true, Action< bool > callback=null) |
Ping the server. More... | |
Static Public Member Functions | |
static byte[] | CaptureScreenshot (int thumbnailHeight=720, List< Camera > excludeCams=null) |
Captures the screen shot. More... | |
static string | EncryptMD5 (string inputString) |
Encrypts a string in MD5. More... | |
static string | EncryptSHA1 (string inputString) |
Encrypts a string in SHA1. More... | |
static string | EncryptAES (string inputString) |
Encrypts a string in AES. More... | |
static string | DecryptAES (string inputString) |
Decrypts a string in AES. More... | |
Public Attributes | |
bool | dontDestroyOnLoad = true |
Should call DontDestroyOnLoad on the CombuManager gameObject? Recommended: set to true More... | |
bool | setAsDefaultSocialPlatform |
Should set Combu as the active social platform? The previous platform is accessible from defaultSocialPlatform More... | |
bool | connectOnAwake = true |
Auto-connect to server on Awake. More... | |
bool | useExperimentalThreaded |
Enable the use of the experimental job to run the decryption process in a separated thread. More... | |
float | retryConnectAfterSeconds = 0f |
Upon failed connection to server, it will retry to connect after specified seconds (set 0 to disable auto-retry). More... | |
string | appId |
The app identifier. More... | |
string | appSecret |
The app secret key. More... | |
string | urlRootProduction |
The URL root for the production environment. More... | |
string | urlRootStage |
The URL root for the stage environment. More... | |
bool | useStage |
If true sets the stage as current environment (default: false for production). More... | |
bool | skipCertificateVerification |
Skip the verification of the SSL certificate in UnityWebRequest (Unity 2017.1 or newer) More... | |
bool | logDebugInfo |
Print debug info in the console log. More... | |
bool | rememberCredentials |
Store the user credentials in PlayerPrefs to auto-login on next connection. More... | |
float | pingIntervalSeconds = 30f |
The ping interval in seconds (set 0 to disable automatic pings). Ping is currently used to mantain the online state of the local user and is automatically called only if the local user is authenticated. More... | |
int | onlineSeconds = 120 |
The max seconds from now to a user's lastSeen to consider the online state. More... | |
int | playingSeconds = 120 |
The max seconds from now to a user's lastSeen to consider the playing state. More... | |
string | language = "en" |
The language to localize the error messages from web services. More... | |
GameObject | achievementUIObject |
The achievement user interface object for CombuPlatform.ShowAchievementsUI(). More... | |
string | achievementUIFunction |
The achievement user interface function for CombuPlatform.ShowAchievementsUI(). More... | |
GameObject | leaderboardUIObject |
The leaderboard user interface object for CombuPlatform.ShowLeaderboardUI(). More... | |
string | leaderboardUIFunction |
The leaderboard user interface function for CombuPlatform.ShowLeaderboardUI(). More... | |
Static Public Attributes | |
const string | COMBU_VERSION = "3.2.2" |
Current API version. More... | |
Protected Member Functions | |
virtual void | Awake () |
virtual void | Start () |
virtual void | OnEnable () |
virtual void | OnDisable () |
virtual void | AutoPing () |
This is InvokeRepeated on enable and automatically pings the server. If the user was authenticated and the ping fails, the local user is automatically disconnected. More... | |
IEnumerator | DownloadUrl (string url, WWWForm form, Action< string, string > onComplete) |
Downloads the content of an URL with the specified form. More... | |
Protected Attributes | |
ISocialPlatform | _defaultSocialPlatform |
CombuServerInfo | _serverInfo |
bool | downloading |
Static Protected Attributes | |
static CombuManager | _instance |
The singleton instance of CombuManager More... | |
static CombuPlatform | _platform |
The singleton instance of CombuPlatform. More... | |
static CombuEncryption | encryption = new CombuEncryption() |
The instance of data encryption. More... | |
Properties | |
static string? | sessionToken [get] |
Gets the session token. More... | |
static CombuManager | instance [get] |
Gets the current singleton instance. More... | |
static CombuPlatform | platform [get] |
Gets the Combu ISocialPlatform implementation. More... | |
static User? | localUser [get] |
Gets the local user. More... | |
static bool | isInitialized [get] |
Gets a value indicating whether the Singleton instance of Combu.CombuManager is initialized. More... | |
ISocialPlatform | defaultSocialPlatform [get] |
Gets the default social platform defined (this is set before Combu is set as activate, eventually). More... | |
bool | isDownloading [get] |
Gets a value indicating whether this Combu.CombuManager is downloading from a webservice. More... | |
bool | isCancelling [get] |
Gets a value indicating whether this Combu.CombuManager is cancelling a webservice request. More... | |
bool | isAuthenticated [get] |
Gets a value indicating whether Combu.CombuManager.localUser is authenticated. More... | |
CombuServerInfo | serverInfo [get] |
Gets the server info. More... | |
Combu Manager class, it follows the Singleton pattern design (accessible through the 'instance' static property), it means that you shouldn't have more than one instance of this component in your scene.
|
protectedvirtual |
This is InvokeRepeated on enable and automatically pings the server. If the user was authenticated and the ping fails, the local user is automatically disconnected.
void Combu.CombuManager.CallWebservice | ( | string | url, |
WWWForm | form, | ||
System.Action< string, string > | onComplete | ||
) |
Calls a webservice.
url | URL. |
form | Form. |
onComplete | On complete callback. |
void Combu.CombuManager.CancelRequest | ( | ) |
Cancels the current request (next frame).
|
static |
Captures the screen shot.
thumbnailHeight | Thumbnail height. |
excludeCams | Exclude cams. |
void Combu.CombuManager.Connect | ( | ) |
Connect to server if not already initialized.
CombuForm Combu.CombuManager.CreateForm | ( | ) |
Creates a new form to be passed to a webservice.
|
static |
Decrypts a string in AES.
inputString | Input string. |
|
protected |
Downloads the content of an URL with the specified form.
url | URL. |
form | Form. |
onComplete | On complete. |
|
static |
Encrypts a string in AES.
inputString | Input string. |
|
static |
Encrypts a string in MD5.
inputString | Input string. |
|
static |
Encrypts a string in SHA1.
inputString | Input string. |
|
virtual |
Gets the server info.
callback | Callback. |
string Combu.CombuManager.GetUrl | ( | string | relativeUrl | ) |
Gets the absolute URL from a relative.
relativeUrl | Relative URL. |
|
virtual |
Ping the server.
onlyIfAuthenticated | If set to true then it runs only if local user is authenticated. |
callback | Callback. |
|
virtual |
Sets the local user. For internal use only (e.g. User.Authenticate), it's not recommended to call this method directly.
user | User. |
|
staticprotected |
The singleton instance of CombuManager
|
staticprotected |
The singleton instance of CombuPlatform.
string Combu.CombuManager.achievementUIFunction |
The achievement user interface function for CombuPlatform.ShowAchievementsUI().
GameObject Combu.CombuManager.achievementUIObject |
The achievement user interface object for CombuPlatform.ShowAchievementsUI().
string Combu.CombuManager.appId |
The app identifier.
string Combu.CombuManager.appSecret |
The app secret key.
|
static |
Current API version.
bool Combu.CombuManager.connectOnAwake = true |
Auto-connect to server on Awake.
bool Combu.CombuManager.dontDestroyOnLoad = true |
Should call DontDestroyOnLoad on the CombuManager gameObject? Recommended: set to true
|
staticprotected |
The instance of data encryption.
string Combu.CombuManager.language = "en" |
The language to localize the error messages from web services.
string Combu.CombuManager.leaderboardUIFunction |
The leaderboard user interface function for CombuPlatform.ShowLeaderboardUI().
GameObject Combu.CombuManager.leaderboardUIObject |
The leaderboard user interface object for CombuPlatform.ShowLeaderboardUI().
bool Combu.CombuManager.logDebugInfo |
Print debug info in the console log.
int Combu.CombuManager.onlineSeconds = 120 |
The max seconds from now to a user's lastSeen to consider the online state.
float Combu.CombuManager.pingIntervalSeconds = 30f |
The ping interval in seconds (set 0 to disable automatic pings). Ping is currently used to mantain the online state of the local user and is automatically called only if the local user is authenticated.
int Combu.CombuManager.playingSeconds = 120 |
The max seconds from now to a user's lastSeen to consider the playing state.
bool Combu.CombuManager.rememberCredentials |
Store the user credentials in PlayerPrefs to auto-login on next connection.
float Combu.CombuManager.retryConnectAfterSeconds = 0f |
Upon failed connection to server, it will retry to connect after specified seconds (set 0 to disable auto-retry).
bool Combu.CombuManager.setAsDefaultSocialPlatform |
Should set Combu as the active social platform? The previous platform is accessible from defaultSocialPlatform
bool Combu.CombuManager.skipCertificateVerification |
Skip the verification of the SSL certificate in UnityWebRequest (Unity 2017.1 or newer)
string Combu.CombuManager.urlRootProduction |
The URL root for the production environment.
string Combu.CombuManager.urlRootStage |
The URL root for the stage environment.
bool Combu.CombuManager.useExperimentalThreaded |
Enable the use of the experimental job to run the decryption process in a separated thread.
bool Combu.CombuManager.useStage |
If true sets the stage as current environment (default: false for production).
|
get |
Gets the default social platform defined (this is set before Combu is set as activate, eventually).
The default social platform.
|
staticget |
Gets the current singleton instance.
The instance.
|
get |
Gets a value indicating whether Combu.CombuManager.localUser is authenticated.
true
if is authenticated; otherwise, false
.
|
get |
Gets a value indicating whether this Combu.CombuManager is cancelling a webservice request.
true
if is cancelling; otherwise, false
.
|
get |
Gets a value indicating whether this Combu.CombuManager is downloading from a webservice.
true
if is downloading; otherwise, false
.
|
staticget |
Gets a value indicating whether the Singleton instance of Combu.CombuManager is initialized.
true
if is initialized; otherwise, false
.
|
staticget |
Gets the local user.
The local user.
|
staticget |
Gets the Combu ISocialPlatform implementation.
The platform.
|
get |
Gets the server info.
The server info.
|
staticget |
Gets the session token.
The session token.