Jump to content

Intercepting the load of a game and of a craft


Recommended Posts

There's a Hook in which I could register a code of mine to intercept the loading of a savegame in order to check for something and if something bad is detected, I could abort the loading process to prevent the savegame to be ruined?

And for a craft? To prevent a damaged craft to be loaded without warning?

Yeah. I'm talking about a McLisias' Anti Krakens! :D

Edited by Lisias
slightly improved grammar...
Link to comment
Share on other sites

I am afraid this was already asked more than three years ago:

 

I am looking into the docs and it looks like you can use LoadGame to get back a Game object through which you can then go; however, no idea whether or how this can be called from the Main menu... do you know where I can start learning about the APIs for Unity and KSP?

Link to comment
Share on other sites

4 hours ago, nmc said:

I am afraid this was already asked more than three years ago:

HUmm… I'm a dud SAS. Craft Manager does that. I will check the Craft Manager source for part of the problem!

 

4 hours ago, nmc said:

I am looking into the docs and it looks like you can use LoadGame to get back a Game object through which you can then go; however, no idea whether or how this can be called from the Main menu... do you know where I can start learning about the APIs for Unity and KSP?

https://kerbalspaceprogram.com/api/index.html

https://docs.unity3d.com/2018.4/Documentation/Manual/ (I think KSP uses an older version, but it's better than nothing)

On a side note, I would love to have access to the previous versions of the KSP API. Ok, I can use reflection on the older ones - but that information was already available before. :)

Edited by Lisias
Hit "save" too soon.
Link to comment
Share on other sites

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...