void IAuth.Login(Action onComplete, Action onFailure) { if (RestartAppIfNecessary && SteamClient.RestartAppIfNecessary(AppId)) { if (UApplication.isEditor) { ExceptionHandler.Process(new SteamIsNotRunningException()); onFailure(); } else { UApplication.Quit(); } return; } try { SteamClient.Init(AppId); onComplete(); } catch { ExceptionHandler.Process(new SteamIsNotRunningException()); onFailure(); } }
/// <summary> /// Opens a URL within the META_SDK directory, where %META_SDK% is replaced by the SDK path. /// </summary> /// <param name="url">The URL to be parsed.</param> public static void OpenURL(string url) { url = url.Replace("%META_SDK2%", System.Environment.GetEnvironmentVariable("META_SDK2")) .Replace("%META_SDK2_BETA%", System.Environment.GetEnvironmentVariable("META_SDK2_BETA")) .Replace("\\", "/"); Application.OpenURL(url); }
private static void RestartGame() { // This operation will cause the "Resolution Dialog" to appear instead of the game's // main-menu just reappearing. Oh well! It's better than nothing, I guess. try { Process.Start(QudExecutable); } catch { } finally { Application.Quit(); } }
static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj) { CSHotFix.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain; StackObject *__ret = ILIntepreter.Minus(__esp, 0); var result_of_this_method = new UnityEngine.Application(); return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method)); }
static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if (LuaAPI.lua_gettop(L) == 1) { UnityEngine.Application __cl_gen_ret = new UnityEngine.Application(); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.Application constructor!")); }
/// <summary> /// Fired when the user clicks on the GUI object. /// This will exit the game. /// /// Note: this will do nothing if the game is running Unity's Game Editor. /// </summary> protected override void OnClick() { Application.Quit(); }