Giter Club home page Giter Club logo

ksppluginreload's Introduction

KSPPluginReload

Author: m1nd0 ([email protected])

Description: Plugin which will allow DLLs to be reloading into KSP without the need for a reboot.

Notice:

  • Only classes which inherit MonoBehaviour and include the attribute KSPAddon will be reloaded. Parts & partmodules will not be reloaded.
  • Custom parts and partmodules won't work when loading a DLL with this (see note1)
  • Only use this for developing/debugging. Since KSP doesn't allow AppDomains each reload loads a second instance of the plugin, therefore increasing the memory usage.

Installation

  1. download latest build (http://tawot.com/KSPPluginReload.zip) or build from source and extract to ksp directory.
  2. remove your plugin.dll from \GameData\YourPlugins\plugins\ (see note1 for part & partmodule code)
  3. edit Settings.cfg in "\GameData\PluginReload".
  4. open AssemblyInfo.cs in your project and change AssemblyVersion & AssemblyFileVersion to "1.0.0.*". Visual Studio will auto-increment your build, this is the only way to allow reloading of a DLL.

Usage

Launch your game. Test something. Rebuild the dll, press Reload plugins to reload plugins. ALT+P opens/closes the rebuild menu.

Settings example Settings.cfg:

PluginSetting
{
	name = Myplugginname
	path = C:\develop\myplugin\debug\myplugin.dll
	loadOnce = false
	methodsAllowedToFail = false
}

Issues

  • using KSPAddon.Startup.PSystemSpawn may cause issues since the solar system is already created at reload. (untested)

Credits

Ezriilc (http://www.kerbaltekaerospace.com/). Used hyperedit GUI code as base for GUI.

Terms of Use

http://creativecommons.org/licenses/by-nc-sa/3.0/

Note1: You can leave your plugin in \GameData\ if you need your parts/partmodules in your code. However you MUST put your parts and modules inside a different DLL which loads them. If you place any code that launches (KSPAddon) it won't be unloaded when all plugins are reloaded, and you will wind up with duplicated code being executing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.