本文整理汇总了C#中UnityEngine.AndroidJavaObject.GetStatic方法的典型用法代码示例。如果您正苦于以下问题:C# AndroidJavaObject.GetStatic方法的具体用法?C# AndroidJavaObject.GetStatic怎么用?C# AndroidJavaObject.GetStatic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnityEngine.AndroidJavaObject
的用法示例。
在下文中一共展示了AndroidJavaObject.GetStatic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameHelperManager
internal GameHelperManager(AndroidClient client) {
mAndroidClient = client;
Logger.d("Setting up GameHelperManager.");
// create GameHelper
Logger.d("GHM creating GameHelper.");
mGameHelper = new AndroidJavaObject(GameHelperClass, mAndroidClient.GetActivity());
if (mGameHelper == null) {
throw new System.Exception("Failed to create GameHelper.");
}
// set up the GameHelper
Logger.d("GHM setting up GameHelper.");
mGameHelper.Call("enableDebugLog", Logger.DebugLogEnabled, "GameHelper");
int flags = mGameHelper.GetStatic<int>("CLIENT_ALL");
Logger.d("GHM client request flags: " + flags);
GameHelperListener listenerProxy = new GameHelperListener(this, ORIGIN_MAIN_ACTIVITY);
Logger.d("GHM calling GameHelper.setRequestedClients, " + flags);
mGameHelper.Call("setRequestedClients", flags);
Logger.d("GHM calling GameHelper.setup");
mGameHelper.Call("setup", listenerProxy);
// set up callbacks so we're informed of pause/unpause events
PlayGamesHelperObject.SetPauseCallback((bool paused) => {
if (paused) {
OnPause();
} else {
OnResume();
}
});
// start silent auth
Logger.d("GHM calling GameHelper.onStart to try silent auth.");
mConnectionState = ConnectionState.Connecting;
mGameHelper.Call("onStart", mAndroidClient.GetActivity());
}