You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have worked on a BepInEx plugin that automatically updates itself, and user is given a restart prompt. When you call Process.Start on the running game, it will inherit the environment variables from the running process for the newly spawned process, causing Doorstop to not initalize properly in the new process.
I have found a workaround for anyone else that has this issue
varstartInfo=newProcessStartInfo();startInfo.FileName=Paths.ExecutablePath;startInfo.WorkingDirectory=Paths.GameRootPath;startInfo.UseShellExecute=false;// remove environment variables that new process will inheritstartInfo.Environment.Remove("DOORSTOP_INITIALIZED");startInfo.Environment.Remove("DOORSTOP_DISABLE");Process.Start(startInfo);Application.Quit();