Jump to content

Loading a quicksave at the main menu


Recommended Posts

I found this code which seems to correspond with the current api, but for some reason it wont work for me. Any insight would be much appreciated as it would save me a great deal of time.

thanks 

c

 [KSPAddon(KSPAddon.Startup.MainMenu, false)]
    public class PluginStartup : MonoBehaviour
    {
        public static bool first = true;

        public void LateUpdate()
        {
            Debug.Log("////////////////////start/////////////////////////////////");
            if (first)
            {
                first = false;
                HighLogic.SaveFolder = "default";
                Game game = GamePersistence.LoadGame("persistent", HighLogic.SaveFolder, true, false);
            }
            
        }
    }

 

Link to comment
Share on other sites

  • 1 month later...
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...