<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://modding.kerbal.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Munix</id>
	<title>Kerbal Space Program 2 Modding Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://modding.kerbal.wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Munix"/>
	<link rel="alternate" type="text/html" href="https://modding.kerbal.wiki/Special:Contributions/Munix"/>
	<updated>2026-04-25T18:03:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://modding.kerbal.wiki/index.php?title=Migrating_from_SpaceWarp_1.x&amp;diff=1517</id>
		<title>Migrating from SpaceWarp 1.x</title>
		<link rel="alternate" type="text/html" href="https://modding.kerbal.wiki/index.php?title=Migrating_from_SpaceWarp_1.x&amp;diff=1517"/>
		<updated>2025-11-29T02:41:08Z</updated>

		<summary type="html">&lt;p&gt;Munix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; Note: This page is a work in progress.&lt;br /&gt;
Redux features a brand new version of SpaceWarp. While it&#039;s all shiny and cool, it breaks support with older versions. Now you&#039;re probably wondering: How do I migrate to SpaceWarp 2.x? This guide is for you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;What&#039;s different?&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since Redux has SpaceWarp built-in, there&#039;s no need to have BepInEx anymore. This means all mods get stored in a dedicated Mods folder in the main KSP2 directory called &amp;quot;mods&amp;quot;... and that you can&#039;t use BepInEx&#039;s stuff anymore.&lt;br /&gt;
&lt;br /&gt;
The SpaceWarp namespace has been renamed to SpaceWarp2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;API&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2 now has following classes:&lt;br /&gt;
&lt;br /&gt;
GeneralMod&lt;br /&gt;
&lt;br /&gt;
MonoBehaviourMod&lt;br /&gt;
&lt;br /&gt;
KerbalMod. (technically a Redux thing) It has access to useful game classes like Game, Assets, Messages, etc. Equivalent to BaseSpaceWarpPlugin. Found in Redux.ExtraModTypes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2 also has a bunch of different members. Some of it has also been split up into ReduxLib and Redux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2.API.Configuration = ReduxLib.Configuration&lt;br /&gt;
&lt;br /&gt;
SpaceWarp.API.UI.Appbar = SpaceWarp2.UI.API.Appbar&lt;br /&gt;
&lt;br /&gt;
BepInExConfigFile = JsonConfigFile&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;Example plugin before &amp;amp; after migration:&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Before:&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
using System.Reflection;&lt;br /&gt;
using BepInEx;&lt;br /&gt;
using JetBrains.Annotations;&lt;br /&gt;
using SpaceWarp;&lt;br /&gt;
using SpaceWarp.API.Assets;&lt;br /&gt;
using SpaceWarp.API.Mods;&lt;br /&gt;
using SpaceWarp.API.UI.Appbar;&lt;br /&gt;
using SpaceWarpModUI.UI;&lt;br /&gt;
using UitkForKsp2.API;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using UnityEngine.UIElements;&lt;br /&gt;
&lt;br /&gt;
namespace SpaceWarpModUI;&lt;br /&gt;
&lt;br /&gt;
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]&lt;br /&gt;
[BepInDependency(SpaceWarpPlugin.ModGuid, SpaceWarpPlugin.ModVer)]&lt;br /&gt;
public class SpaceWarpModUIPlugin : BaseSpaceWarpPlugin&lt;br /&gt;
{&lt;br /&gt;
    // Useful in case some other mod wants to use this mod a dependency&lt;br /&gt;
    [PublicAPI] public const string ModGuid = MyPluginInfo.PLUGIN_GUID;&lt;br /&gt;
    [PublicAPI] public const string ModName = MyPluginInfo.PLUGIN_NAME;&lt;br /&gt;
    [PublicAPI] public const string ModVer = MyPluginInfo.PLUGIN_VERSION;&lt;br /&gt;
&lt;br /&gt;
    /// Singleton instance of the plugin class&lt;br /&gt;
    [PublicAPI] public static SpaceWarpModUIPlugin Instance { get; set; }&lt;br /&gt;
&lt;br /&gt;
    // AppBar button IDs&lt;br /&gt;
    internal const string ToolbarFlightButtonID = &amp;quot;BTN-SpaceWarpModUIFlight&amp;quot;;&lt;br /&gt;
    internal const string ToolbarOabButtonID = &amp;quot;BTN-SpaceWarpModUIOAB&amp;quot;;&lt;br /&gt;
    internal const string ToolbarKscButtonID = &amp;quot;BTN-SpaceWarpModUIKSC&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs when the mod is first initialized.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public override void OnInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        base.OnInitialized();&lt;br /&gt;
&lt;br /&gt;
        Instance = this;&lt;br /&gt;
&lt;br /&gt;
        // Load all the other assemblies used by this mod&lt;br /&gt;
        LoadAssemblies();&lt;br /&gt;
&lt;br /&gt;
        // Load the UI from the asset bundle&lt;br /&gt;
        var myFirstWindowUxml = AssetManager.GetAsset&amp;lt;VisualTreeAsset&amp;gt;(&lt;br /&gt;
            // The case-insensitive path to the asset in the bundle is composed of:&lt;br /&gt;
            // - The mod GUID:&lt;br /&gt;
            $&amp;quot;{ModGuid}/&amp;quot; +&lt;br /&gt;
            // - The name of the asset bundle:&lt;br /&gt;
            &amp;quot;SpaceWarpModUI_ui/&amp;quot; +&lt;br /&gt;
            // - The path to the asset in your Unity project (without the &amp;quot;Assets/&amp;quot; part)&lt;br /&gt;
            &amp;quot;ui/myfirstwindow/myfirstwindow.uxml&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Create the window options object&lt;br /&gt;
        var windowOptions = new WindowOptions&lt;br /&gt;
        {&lt;br /&gt;
            // The ID of the window. It should be unique to your mod.&lt;br /&gt;
            WindowId = &amp;quot;SpaceWarpModUI_MyFirstWindow&amp;quot;,&lt;br /&gt;
            // The transform of parent game object of the window.&lt;br /&gt;
            // If null, it will be created under the main canvas.&lt;br /&gt;
            Parent = null,&lt;br /&gt;
            // Whether or not the window can be hidden with F2.&lt;br /&gt;
            IsHidingEnabled = true,&lt;br /&gt;
            // Whether to disable game input when typing into text fields.&lt;br /&gt;
            DisableGameInputForTextFields = true,&lt;br /&gt;
            MoveOptions = new MoveOptions&lt;br /&gt;
            {&lt;br /&gt;
                // Whether or not the window can be moved by dragging.&lt;br /&gt;
                IsMovingEnabled = true,&lt;br /&gt;
                // Whether or not the window can only be moved within the screen bounds.&lt;br /&gt;
                CheckScreenBounds = true&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        // Create the window&lt;br /&gt;
        var myFirstWindow = Window.Create(windowOptions, myFirstWindowUxml);&lt;br /&gt;
        // Add a controller for the UI to the window&#039;s game object&lt;br /&gt;
        var myFirstWindowController = myFirstWindow.gameObject.AddComponent&amp;lt;MyFirstWindowController&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // Register Flight AppBar button&lt;br /&gt;
        Appbar.RegisterAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarFlightButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register OAB AppBar Button&lt;br /&gt;
        Appbar.RegisterOABAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarOabButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register KSC AppBar Button&lt;br /&gt;
        Appbar.RegisterKSCAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarKscButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            () =&amp;gt; myFirstWindowController.IsWindowOpen = !myFirstWindowController.IsWindowOpen&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Loads all the assemblies for the mod.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    private static void LoadAssemblies()&lt;br /&gt;
    {&lt;br /&gt;
        // Load the Unity project assembly&lt;br /&gt;
        var currentFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory!.FullName;&lt;br /&gt;
        var unityAssembly = Assembly.LoadFrom(Path.Combine(currentFolder, &amp;quot;SpaceWarpModUI.Unity.dll&amp;quot;));&lt;br /&gt;
        // Register any custom UI controls from the loaded assembly&lt;br /&gt;
        CustomControls.RegisterFromAssembly(unityAssembly);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After:&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
using JetBrains.Annotations;&lt;br /&gt;
using Redux.ExtraModTypes;&lt;br /&gt;
using SpaceWarp2.UI.API.Appbar;&lt;br /&gt;
using SpaceWarpModUI.UI;&lt;br /&gt;
using UitkForKsp2.API;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using UnityEngine.UIElements;&lt;br /&gt;
&lt;br /&gt;
namespace SpaceWarpModUI;&lt;br /&gt;
&lt;br /&gt;
public abstract class SpaceWarpModUIPlugin : KerbalMod&lt;br /&gt;
{&lt;br /&gt;
    [PublicAPI] public const string ModGuid = &amp;quot;SpaceWarpModUI&amp;quot;; // ModGuid here&lt;br /&gt;
    [PublicAPI] public const string ModName = &amp;quot;SpaceWarpUIMod&amp;quot;; &lt;br /&gt;
    //[PublicAPI] public const string ModVer = MyPluginInfo.PLUGIN_VERSION;&lt;br /&gt;
&lt;br /&gt;
    /// Singleton instance of the plugin class&lt;br /&gt;
    [PublicAPI] public static SpaceWarpModUIPlugin Instance { get; set; }&lt;br /&gt;
&lt;br /&gt;
    // AppBar button IDs&lt;br /&gt;
    internal const string ToolbarFlightButtonID = &amp;quot;BTN-SpaceWarpModUIFlight&amp;quot;;&lt;br /&gt;
    internal const string ToolbarOabButtonID = &amp;quot;BTN-SpaceWarpModUIOAB&amp;quot;;&lt;br /&gt;
    internal const string ToolbarKscButtonID = &amp;quot;BTN-SpaceWarpModUIKSC&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs before the game is loaded, as early as possible. &lt;br /&gt;
    /// You would want to use this to register loading actions (like loading JSONs from addressables).&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnPreInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Pre Initialized&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs after the game is loaded and after your mod assets are loaded.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Is Initializing&amp;quot;); // You can use Debug.Log to log things.&lt;br /&gt;
        Instance = this;&lt;br /&gt;
&lt;br /&gt;
        // Load the UI from the asset bundle&lt;br /&gt;
        var myFirstWindowUxml = Assets.LoadAssetAsync&amp;lt;VisualTreeAsset&amp;gt;(&lt;br /&gt;
            // The case-insensitive path to the asset in the bundle is composed of:&lt;br /&gt;
            // - The mod GUID:&lt;br /&gt;
            $&amp;quot;{ModGuid}/&amp;quot; +&lt;br /&gt;
            // - The name of the asset bundle:&lt;br /&gt;
            &amp;quot;SpaceWarpModUI_ui/&amp;quot; +&lt;br /&gt;
            // - The path to the asset in your Unity project (without the &amp;quot;Assets/&amp;quot; part)&lt;br /&gt;
            &amp;quot;ui/myfirstwindow/myfirstwindow.uxml&amp;quot;&lt;br /&gt;
        ).Result;&lt;br /&gt;
&lt;br /&gt;
        // Create the window options object&lt;br /&gt;
        var windowOptions = new WindowOptions&lt;br /&gt;
        {&lt;br /&gt;
            // The ID of the window. It should be unique to your mod.&lt;br /&gt;
            WindowId = &amp;quot;SpaceWarpModUI_MyFirstWindow&amp;quot;,&lt;br /&gt;
            // The transform of parent game object of the window.&lt;br /&gt;
            // If null, it will be created under the main canvas.&lt;br /&gt;
            Parent = null,&lt;br /&gt;
            // Whether the window can be hidden with F2.&lt;br /&gt;
            IsHidingEnabled = true,&lt;br /&gt;
            // Whether the UI will use the &amp;quot;Scale&amp;quot; option in the settings.&lt;br /&gt;
            UseStockScale = true,&lt;br /&gt;
            // Whether to disable game input when typing into text fields.&lt;br /&gt;
            DisableGameInputForTextFields = true,&lt;br /&gt;
            MoveOptions = new MoveOptions&lt;br /&gt;
            {&lt;br /&gt;
                // Whether the window can be moved by dragging.&lt;br /&gt;
                IsMovingEnabled = true,&lt;br /&gt;
                // Whether the window can only be moved within the screen bounds.&lt;br /&gt;
                CheckScreenBounds = true&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        // Create the window&lt;br /&gt;
        var myFirstWindow = Window.Create(windowOptions, myFirstWindowUxml);&lt;br /&gt;
        // Add a controller for the UI to the window&#039;s game object&lt;br /&gt;
        var myFirstWindowController = myFirstWindow.gameObject.AddComponent&amp;lt;MyFirstWindowController&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // Register Flight AppBar button&lt;br /&gt;
        Appbar.RegisterAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarFlightButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register OAB AppBar Button&lt;br /&gt;
        Appbar.RegisterOABAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarOabButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register KSC AppBar Button&lt;br /&gt;
        Appbar.RegisterKSCAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarKscButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            () =&amp;gt; myFirstWindowController.IsWindowOpen = !myFirstWindowController.IsWindowOpen&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs after all mods have done their 2nd stage initialization.&lt;br /&gt;
    /// You would want to use this to interact with game systems, since they&#039;re guaranteed to be loaded on this stage.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnPostInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Post Initialized&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // You can create controls directly in Unity. No need for this method anymore.&lt;br /&gt;
    //private static void LoadAssemblies()&lt;br /&gt;
    //{&lt;br /&gt;
    //    // Load the Unity project assembly&lt;br /&gt;
    //    var currentFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory!.FullName;&lt;br /&gt;
    //    var unityAssembly = Assembly.LoadFrom(Path.Combine(currentFolder, &amp;quot;SpaceWarpModUI.Unity.dll&amp;quot;));&lt;br /&gt;
    //    // Register any custom UI controls from the loaded assembly&lt;br /&gt;
    //    CustomControls.RegisterFromAssembly(unityAssembly);&lt;br /&gt;
    //}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;For more examples you can look at some of the &amp;quot;Reduxed&amp;quot; mods we&#039;ve made for Redux here: https://github.com/orgs/KSP2Community/repositories?type=all&lt;/div&gt;</summary>
		<author><name>Munix</name></author>
	</entry>
	<entry>
		<id>https://modding.kerbal.wiki/index.php?title=Migrating_from_SpaceWarp_1.x&amp;diff=1516</id>
		<title>Migrating from SpaceWarp 1.x</title>
		<link rel="alternate" type="text/html" href="https://modding.kerbal.wiki/index.php?title=Migrating_from_SpaceWarp_1.x&amp;diff=1516"/>
		<updated>2025-11-29T02:40:42Z</updated>

		<summary type="html">&lt;p&gt;Munix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote&amp;gt;Note: This page is a work in progress.&amp;lt;/blockquote&amp;gt;Redux features a brand new version of SpaceWarp. While it&#039;s all shiny and cool, it breaks support with older versions. Now you&#039;re probably wondering: How do I migrate to SpaceWarp 2.x? This guide is for you.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;What&#039;s different?&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Since Redux has SpaceWarp built-in, there&#039;s no need to have BepInEx anymore. This means all mods get stored in a dedicated Mods folder in the main KSP2 directory called &amp;quot;mods&amp;quot;... and that you can&#039;t use BepInEx&#039;s stuff anymore.&lt;br /&gt;
&lt;br /&gt;
The SpaceWarp namespace has been renamed to SpaceWarp2.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;API&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2 now has following classes:&lt;br /&gt;
&lt;br /&gt;
GeneralMod&lt;br /&gt;
&lt;br /&gt;
MonoBehaviourMod&lt;br /&gt;
&lt;br /&gt;
KerbalMod. (technically a Redux thing) It has access to useful game classes like Game, Assets, Messages, etc. Equivalent to BaseSpaceWarpPlugin. Found in Redux.ExtraModTypes&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2 also has a bunch of different members. Some of it has also been split up into ReduxLib and Redux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SpaceWarp2.API.Configuration = ReduxLib.Configuration&lt;br /&gt;
&lt;br /&gt;
SpaceWarp.API.UI.Appbar = SpaceWarp2.UI.API.Appbar&lt;br /&gt;
&lt;br /&gt;
BepInExConfigFile = JsonConfigFile&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;big&amp;gt;Example plugin before &amp;amp; after migration:&amp;lt;/big&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Before:&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
using System.Reflection;&lt;br /&gt;
using BepInEx;&lt;br /&gt;
using JetBrains.Annotations;&lt;br /&gt;
using SpaceWarp;&lt;br /&gt;
using SpaceWarp.API.Assets;&lt;br /&gt;
using SpaceWarp.API.Mods;&lt;br /&gt;
using SpaceWarp.API.UI.Appbar;&lt;br /&gt;
using SpaceWarpModUI.UI;&lt;br /&gt;
using UitkForKsp2.API;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using UnityEngine.UIElements;&lt;br /&gt;
&lt;br /&gt;
namespace SpaceWarpModUI;&lt;br /&gt;
&lt;br /&gt;
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]&lt;br /&gt;
[BepInDependency(SpaceWarpPlugin.ModGuid, SpaceWarpPlugin.ModVer)]&lt;br /&gt;
public class SpaceWarpModUIPlugin : BaseSpaceWarpPlugin&lt;br /&gt;
{&lt;br /&gt;
    // Useful in case some other mod wants to use this mod a dependency&lt;br /&gt;
    [PublicAPI] public const string ModGuid = MyPluginInfo.PLUGIN_GUID;&lt;br /&gt;
    [PublicAPI] public const string ModName = MyPluginInfo.PLUGIN_NAME;&lt;br /&gt;
    [PublicAPI] public const string ModVer = MyPluginInfo.PLUGIN_VERSION;&lt;br /&gt;
&lt;br /&gt;
    /// Singleton instance of the plugin class&lt;br /&gt;
    [PublicAPI] public static SpaceWarpModUIPlugin Instance { get; set; }&lt;br /&gt;
&lt;br /&gt;
    // AppBar button IDs&lt;br /&gt;
    internal const string ToolbarFlightButtonID = &amp;quot;BTN-SpaceWarpModUIFlight&amp;quot;;&lt;br /&gt;
    internal const string ToolbarOabButtonID = &amp;quot;BTN-SpaceWarpModUIOAB&amp;quot;;&lt;br /&gt;
    internal const string ToolbarKscButtonID = &amp;quot;BTN-SpaceWarpModUIKSC&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs when the mod is first initialized.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    public override void OnInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        base.OnInitialized();&lt;br /&gt;
&lt;br /&gt;
        Instance = this;&lt;br /&gt;
&lt;br /&gt;
        // Load all the other assemblies used by this mod&lt;br /&gt;
        LoadAssemblies();&lt;br /&gt;
&lt;br /&gt;
        // Load the UI from the asset bundle&lt;br /&gt;
        var myFirstWindowUxml = AssetManager.GetAsset&amp;lt;VisualTreeAsset&amp;gt;(&lt;br /&gt;
            // The case-insensitive path to the asset in the bundle is composed of:&lt;br /&gt;
            // - The mod GUID:&lt;br /&gt;
            $&amp;quot;{ModGuid}/&amp;quot; +&lt;br /&gt;
            // - The name of the asset bundle:&lt;br /&gt;
            &amp;quot;SpaceWarpModUI_ui/&amp;quot; +&lt;br /&gt;
            // - The path to the asset in your Unity project (without the &amp;quot;Assets/&amp;quot; part)&lt;br /&gt;
            &amp;quot;ui/myfirstwindow/myfirstwindow.uxml&amp;quot;&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Create the window options object&lt;br /&gt;
        var windowOptions = new WindowOptions&lt;br /&gt;
        {&lt;br /&gt;
            // The ID of the window. It should be unique to your mod.&lt;br /&gt;
            WindowId = &amp;quot;SpaceWarpModUI_MyFirstWindow&amp;quot;,&lt;br /&gt;
            // The transform of parent game object of the window.&lt;br /&gt;
            // If null, it will be created under the main canvas.&lt;br /&gt;
            Parent = null,&lt;br /&gt;
            // Whether or not the window can be hidden with F2.&lt;br /&gt;
            IsHidingEnabled = true,&lt;br /&gt;
            // Whether to disable game input when typing into text fields.&lt;br /&gt;
            DisableGameInputForTextFields = true,&lt;br /&gt;
            MoveOptions = new MoveOptions&lt;br /&gt;
            {&lt;br /&gt;
                // Whether or not the window can be moved by dragging.&lt;br /&gt;
                IsMovingEnabled = true,&lt;br /&gt;
                // Whether or not the window can only be moved within the screen bounds.&lt;br /&gt;
                CheckScreenBounds = true&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        // Create the window&lt;br /&gt;
        var myFirstWindow = Window.Create(windowOptions, myFirstWindowUxml);&lt;br /&gt;
        // Add a controller for the UI to the window&#039;s game object&lt;br /&gt;
        var myFirstWindowController = myFirstWindow.gameObject.AddComponent&amp;lt;MyFirstWindowController&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // Register Flight AppBar button&lt;br /&gt;
        Appbar.RegisterAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarFlightButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register OAB AppBar Button&lt;br /&gt;
        Appbar.RegisterOABAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarOabButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register KSC AppBar Button&lt;br /&gt;
        Appbar.RegisterKSCAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarKscButtonID,&lt;br /&gt;
            AssetManager.GetAsset&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;),&lt;br /&gt;
            () =&amp;gt; myFirstWindowController.IsWindowOpen = !myFirstWindowController.IsWindowOpen&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Loads all the assemblies for the mod.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
    private static void LoadAssemblies()&lt;br /&gt;
    {&lt;br /&gt;
        // Load the Unity project assembly&lt;br /&gt;
        var currentFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory!.FullName;&lt;br /&gt;
        var unityAssembly = Assembly.LoadFrom(Path.Combine(currentFolder, &amp;quot;SpaceWarpModUI.Unity.dll&amp;quot;));&lt;br /&gt;
        // Register any custom UI controls from the loaded assembly&lt;br /&gt;
        CustomControls.RegisterFromAssembly(unityAssembly);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;After:&amp;lt;syntaxhighlight lang=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
using JetBrains.Annotations;&lt;br /&gt;
using Redux.ExtraModTypes;&lt;br /&gt;
using SpaceWarp2.UI.API.Appbar;&lt;br /&gt;
using SpaceWarpModUI.UI;&lt;br /&gt;
using UitkForKsp2.API;&lt;br /&gt;
using UnityEngine;&lt;br /&gt;
using UnityEngine.UIElements;&lt;br /&gt;
&lt;br /&gt;
namespace SpaceWarpModUI;&lt;br /&gt;
&lt;br /&gt;
public abstract class SpaceWarpModUIPlugin : KerbalMod&lt;br /&gt;
{&lt;br /&gt;
    [PublicAPI] public const string ModGuid = &amp;quot;SpaceWarpModUI&amp;quot;; // ModGuid here&lt;br /&gt;
    [PublicAPI] public const string ModName = &amp;quot;SpaceWarpUIMod&amp;quot;; &lt;br /&gt;
    //[PublicAPI] public const string ModVer = MyPluginInfo.PLUGIN_VERSION;&lt;br /&gt;
&lt;br /&gt;
    /// Singleton instance of the plugin class&lt;br /&gt;
    [PublicAPI] public static SpaceWarpModUIPlugin Instance { get; set; }&lt;br /&gt;
&lt;br /&gt;
    // AppBar button IDs&lt;br /&gt;
    internal const string ToolbarFlightButtonID = &amp;quot;BTN-SpaceWarpModUIFlight&amp;quot;;&lt;br /&gt;
    internal const string ToolbarOabButtonID = &amp;quot;BTN-SpaceWarpModUIOAB&amp;quot;;&lt;br /&gt;
    internal const string ToolbarKscButtonID = &amp;quot;BTN-SpaceWarpModUIKSC&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs before the game is loaded, as early as possible. &lt;br /&gt;
    /// You would want to use this to register loading actions (like loading JSONs from addressables).&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnPreInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Pre Initialized&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
    &lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs after the game is loaded and after your mod assets are loaded.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Is Initializing&amp;quot;); // You can use Debug.Log to log things.&lt;br /&gt;
        Instance = this;&lt;br /&gt;
&lt;br /&gt;
        // Load the UI from the asset bundle&lt;br /&gt;
        var myFirstWindowUxml = Assets.LoadAssetAsync&amp;lt;VisualTreeAsset&amp;gt;(&lt;br /&gt;
            // The case-insensitive path to the asset in the bundle is composed of:&lt;br /&gt;
            // - The mod GUID:&lt;br /&gt;
            $&amp;quot;{ModGuid}/&amp;quot; +&lt;br /&gt;
            // - The name of the asset bundle:&lt;br /&gt;
            &amp;quot;SpaceWarpModUI_ui/&amp;quot; +&lt;br /&gt;
            // - The path to the asset in your Unity project (without the &amp;quot;Assets/&amp;quot; part)&lt;br /&gt;
            &amp;quot;ui/myfirstwindow/myfirstwindow.uxml&amp;quot;&lt;br /&gt;
        ).Result;&lt;br /&gt;
&lt;br /&gt;
        // Create the window options object&lt;br /&gt;
        var windowOptions = new WindowOptions&lt;br /&gt;
        {&lt;br /&gt;
            // The ID of the window. It should be unique to your mod.&lt;br /&gt;
            WindowId = &amp;quot;SpaceWarpModUI_MyFirstWindow&amp;quot;,&lt;br /&gt;
            // The transform of parent game object of the window.&lt;br /&gt;
            // If null, it will be created under the main canvas.&lt;br /&gt;
            Parent = null,&lt;br /&gt;
            // Whether the window can be hidden with F2.&lt;br /&gt;
            IsHidingEnabled = true,&lt;br /&gt;
            // Whether the UI will use the &amp;quot;Scale&amp;quot; option in the settings.&lt;br /&gt;
            UseStockScale = true,&lt;br /&gt;
            // Whether to disable game input when typing into text fields.&lt;br /&gt;
            DisableGameInputForTextFields = true,&lt;br /&gt;
            MoveOptions = new MoveOptions&lt;br /&gt;
            {&lt;br /&gt;
                // Whether the window can be moved by dragging.&lt;br /&gt;
                IsMovingEnabled = true,&lt;br /&gt;
                // Whether the window can only be moved within the screen bounds.&lt;br /&gt;
                CheckScreenBounds = true&lt;br /&gt;
            }&lt;br /&gt;
        };&lt;br /&gt;
&lt;br /&gt;
        // Create the window&lt;br /&gt;
        var myFirstWindow = Window.Create(windowOptions, myFirstWindowUxml);&lt;br /&gt;
        // Add a controller for the UI to the window&#039;s game object&lt;br /&gt;
        var myFirstWindowController = myFirstWindow.gameObject.AddComponent&amp;lt;MyFirstWindowController&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // Register Flight AppBar button&lt;br /&gt;
        Appbar.RegisterAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarFlightButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register OAB AppBar Button&lt;br /&gt;
        Appbar.RegisterOABAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarOabButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            isOpen =&amp;gt; myFirstWindowController.IsWindowOpen = isOpen&lt;br /&gt;
        );&lt;br /&gt;
&lt;br /&gt;
        // Register KSC AppBar Button&lt;br /&gt;
        Appbar.RegisterKSCAppButton(&lt;br /&gt;
            ModName,&lt;br /&gt;
            ToolbarKscButtonID,&lt;br /&gt;
            Assets.LoadAssetAsync&amp;lt;Texture2D&amp;gt;($&amp;quot;{ModGuid}/images/icon.png&amp;quot;).Result,&lt;br /&gt;
            () =&amp;gt; myFirstWindowController.IsWindowOpen = !myFirstWindowController.IsWindowOpen&lt;br /&gt;
        );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /// &amp;lt;summary&amp;gt;&lt;br /&gt;
    /// Runs after all mods have done their 2nd stage initialization.&lt;br /&gt;
    /// You would want to use this to interact with game systems, since they&#039;re guaranteed to be loaded on this stage.&lt;br /&gt;
    /// &amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    public override void OnPostInitialized()&lt;br /&gt;
    {&lt;br /&gt;
        Debug.Log(&amp;quot;Post Initialized&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    // You can create controls directly in Unity. No need for this method anymore.&lt;br /&gt;
    //private static void LoadAssemblies()&lt;br /&gt;
    //{&lt;br /&gt;
    //    // Load the Unity project assembly&lt;br /&gt;
    //    var currentFolder = new FileInfo(Assembly.GetExecutingAssembly().Location).Directory!.FullName;&lt;br /&gt;
    //    var unityAssembly = Assembly.LoadFrom(Path.Combine(currentFolder, &amp;quot;SpaceWarpModUI.Unity.dll&amp;quot;));&lt;br /&gt;
    //    // Register any custom UI controls from the loaded assembly&lt;br /&gt;
    //    CustomControls.RegisterFromAssembly(unityAssembly);&lt;br /&gt;
    //}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;For more examples you can look at some of the &amp;quot;Reduxed&amp;quot; mods we&#039;ve made for Redux here: https://github.com/orgs/KSP2Community/repositories?type=all&lt;/div&gt;</summary>
		<author><name>Munix</name></author>
	</entry>
	<entry>
		<id>https://modding.kerbal.wiki/index.php?title=Setting_up_Unity&amp;diff=1483</id>
		<title>Setting up Unity</title>
		<link rel="alternate" type="text/html" href="https://modding.kerbal.wiki/index.php?title=Setting_up_Unity&amp;diff=1483"/>
		<updated>2025-10-15T21:47:20Z</updated>

		<summary type="html">&lt;p&gt;Munix: Removed link to Lux&amp;#039;s Notion (broken)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page will help you install everything you need to use Unity for KSP2 modding.&lt;br /&gt;
&lt;br /&gt;
== Installing Unity ==&lt;br /&gt;
&lt;br /&gt;
# Download Unity Hub from https://unity.com/download.&lt;br /&gt;
# Download Unity 2022.3.5f1 by clicking on the &#039;&#039;&#039;Install this version with Unity Hub&#039;&#039;&#039; link on this page: https://unity.com/releases/editor/whats-new/2022.3.5.&lt;br /&gt;
# Download and install Git from https://git-scm.com/downloads.&lt;br /&gt;
&lt;br /&gt;
== Initializing the Unity project ==&lt;br /&gt;
# Open &#039;&#039;&#039;Unity Hub&#039;&#039;&#039;.&lt;br /&gt;
# Click on &#039;&#039;&#039;New Project&#039;&#039;&#039; at the top right of the window.&lt;br /&gt;
# At the top of the new interface, set the &#039;&#039;&#039;Editor Version&#039;&#039;&#039; to &amp;lt;code&amp;gt;2022.3.5f1&amp;lt;/code&amp;gt;. You can keep the project template set to &#039;&#039;&#039;3D (Core)&#039;&#039;&#039;.&lt;br /&gt;
# Set the &#039;&#039;&#039;Project name&#039;&#039;&#039;, it can be whatever you want, for example &amp;lt;code&amp;gt;MyModId.Unity&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Set the &#039;&#039;&#039;Location&#039;&#039;&#039; to the folder you want the Unity project to be saved in.&lt;br /&gt;
# Click &#039;&#039;&#039;Create project&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Configuring the Unity project ==&lt;br /&gt;
&lt;br /&gt;
=== Installing the Addressables package ===&lt;br /&gt;
Unity doesn’t come with this package natively, so we need to install it first:&lt;br /&gt;
&lt;br /&gt;
# Open the Package Manager by clicking &#039;&#039;&#039;Window&amp;gt;Package Manager&#039;&#039;&#039; in the toolbar at the top of Unity.&lt;br /&gt;
# This will open a new window where you can manage most of the packages in your project.&lt;br /&gt;
# Go where it says &#039;&#039;&#039;Packages: In Project&#039;&#039;&#039; and change that to &#039;&#039;&#039;Unity Registry&#039;&#039;&#039;.&lt;br /&gt;
# In the search bar, look for &#039;&#039;&#039;Addressables&#039;&#039;&#039;. Select it and click &#039;&#039;&#039;Install&#039;&#039;&#039;. It will show a couple pop-ups, and once it is finished, it will show a green checkmark next to the &#039;&#039;&#039;Addressables&#039;&#039;&#039; package version.&lt;br /&gt;
&lt;br /&gt;
=== Installing ThunderKit ===&lt;br /&gt;
&#039;&#039;ThunderKit&#039;&#039; is a package for Unity which we use to import the game&#039;s components into the Unity editor. However, it is not hosted in the official Unity package repository and needs to be installed directly from its GitHub repository.&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;&#039;Window&amp;gt;Package Manager&#039;&#039;&#039; and click on the &#039;&#039;&#039;+&#039;&#039;&#039; sign in the top left corner of the window that opens, after that click on &#039;&#039;&#039;Add Package from Git URL&#039;&#039;&#039;, paste &amp;lt;code&amp;gt;https://github.com/PassivePicasso/ThunderKit.git&amp;lt;/code&amp;gt; and click &#039;&#039;&#039;Add&#039;&#039;&#039;.&lt;br /&gt;
# The &#039;&#039;ThunderKit&#039;&#039; Settings window should open, if it doesn’t, just go to &#039;&#039;&#039;Tools&amp;gt;ThunderKit&amp;gt;Settings&#039;&#039;&#039; in the toolbar at the top of Unity.&lt;br /&gt;
# Go to &#039;&#039;&#039;Import Configuration&#039;&#039;&#039; and in &#039;&#039;&#039;Import Project Settings,&#039;&#039;&#039; change the dropdown value to &#039;&#039;&#039;Everything.&#039;&#039;&#039;&lt;br /&gt;
# Go to &#039;&#039;&#039;ThunderKit Settings&#039;&#039;&#039; and in &#039;&#039;&#039;Locate and load game files for project,&#039;&#039;&#039; click on &#039;&#039;&#039;Browse&#039;&#039;&#039; and select your main Kerbal Space Program 2 executable found at &amp;lt;code&amp;gt;&amp;lt;KSP2 root folder&amp;gt;/KSP2_x64.exe&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Click &#039;&#039;&#039;Import&#039;&#039;&#039; and wait for KSP2 to be imported. If asked, click &#039;&#039;&#039;I made a backup, Go Ahead&#039;&#039;&#039;.&lt;br /&gt;
# If Unity asks you to restart your project, confirm it by clicking on &#039;&#039;&#039;Restart Project&#039;&#039;&#039;.&lt;br /&gt;
# After the process is finished, to check if the game was correctly imported, select or create any game object and in the inspector click &#039;&#039;&#039;Add Component&#039;&#039;&#039; and search for &#039;&#039;&#039;Core Part Data&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Installing KSP2 Unity Tools ===&lt;br /&gt;
&lt;br /&gt;
# Go to &#039;&#039;&#039;Window&amp;gt;Package Manager&#039;&#039;&#039; and click on the &#039;&#039;&#039;+&#039;&#039;&#039; sign in the top left corner of the window that opens, after that click on &#039;&#039;&#039;Add Package from Git URL&#039;&#039;&#039;, paste &amp;lt;code&amp;gt;https://github.com/KSP2Community/KSP2UnityTools.git&amp;lt;/code&amp;gt; and click &#039;&#039;&#039;Add&#039;&#039;&#039;.&lt;br /&gt;
 If you have previously installed an older version of KSP2 Unity Tools manually from a .unitypackage file, you will need to delete the whole &amp;quot;KSP2UnityTools&amp;quot; folder from your Assets folder and then do the installation.&lt;br /&gt;
&lt;br /&gt;
=== Setting up swinfo.json and addressables ===&lt;br /&gt;
&lt;br /&gt;
# After installing KSP2UnityTools, go to &#039;&#039;&#039;Tools&amp;gt;KSP2 Unity Tools.&#039;&#039;&#039;&lt;br /&gt;
# Follow one of two following steps, depending on which applies for you:&lt;br /&gt;
# &#039;&#039;&#039;If you have a mod you want to copy addressables into&#039;&#039;&#039;:&lt;br /&gt;
## Set &#039;&#039;&#039;Build Mode&#039;&#039;&#039; to &amp;quot;&#039;&#039;&#039;Copy Assets Only&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
## In the build path select the &amp;lt;code&amp;gt;addressables&amp;lt;/code&amp;gt; folder in your mod&#039;s directory.&lt;br /&gt;
## At the bottom of the window, press &#039;&#039;&#039;Import swinfo.json&#039;&#039;&#039; and select your mod&#039;s &amp;lt;code&amp;gt;swinfo.json&amp;lt;/code&amp;gt;.&lt;br /&gt;
# &#039;&#039;&#039;If you want to build a full mod from Unity&#039;&#039;&#039;:&lt;br /&gt;
## Set &#039;&#039;&#039;Build Mode&#039;&#039;&#039; to &amp;quot;&#039;&#039;&#039;Everything&#039;&#039;&#039;&amp;quot;.&lt;br /&gt;
## Set build path to where you want to output your packaged mod (you can set this later, just set it before build).&lt;br /&gt;
## If you already have a swinfo.json file, you can skip the next steps using the import swinfo.json button as described in the previous section.&lt;br /&gt;
## Input your mod&#039;s ID (this is critically important).&lt;br /&gt;
## Setup the rest of your mod&#039;s info (these correspond to the swinfo).&lt;br /&gt;
# After following one of the previous two processes, press &#039;&#039;&#039;Set Up Addressables From Mod Info&#039;&#039;&#039;, and it should automatically set up the addressables groups for you.&lt;br /&gt;
&lt;br /&gt;
[[Category:Getting started]]&lt;/div&gt;</summary>
		<author><name>Munix</name></author>
	</entry>
	<entry>
		<id>https://modding.kerbal.wiki/index.php?title=Part_Modding&amp;diff=1482</id>
		<title>Part Modding</title>
		<link rel="alternate" type="text/html" href="https://modding.kerbal.wiki/index.php?title=Part_Modding&amp;diff=1482"/>
		<updated>2025-09-01T20:40:29Z</updated>

		<summary type="html">&lt;p&gt;Munix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;So, you want to make a custom part for KSP2. Great! But where do you start? What tools do you need? &lt;br /&gt;
&lt;br /&gt;
The pages below contain all the information you need to create your very own parts mod. The first step to any modded part is modelling it; most modders use Blender for this. KSP2 uses some standard part sizes you will need to keep in mind while making your model. Next, you will learn how to properly texture your model, including how to make it repaintable in the VAB, using a program like Adobe Substance Painter or similar. Finally, you will set up your part pack mod in Unity, and you will at last have your very own custom part in KSP2. Go wild!&lt;br /&gt;
&lt;br /&gt;
=== Before you go ===&lt;br /&gt;
&lt;br /&gt;
* [[How to name your part]]&lt;br /&gt;
&lt;br /&gt;
=== Modelling ===&lt;br /&gt;
&lt;br /&gt;
* [[Modeling the mesh in Blender]]&lt;br /&gt;
* [[Sizes|Standard Part Sizes]]&lt;br /&gt;
* [[Size Category|Standard Size Categories]]&lt;br /&gt;
&lt;br /&gt;
=== Texturing ===&lt;br /&gt;
&lt;br /&gt;
* [[Configuring Substance Painter]]&lt;br /&gt;
* [[Texturing|Texturing Basics]]&lt;br /&gt;
* [[Texturing the mesh in Substance 3D Painter]]&lt;br /&gt;
&lt;br /&gt;
=== Importing in Unity ===&lt;br /&gt;
&lt;br /&gt;
* [[Setting up Unity]]&lt;br /&gt;
* [[Configuring the part in Unity|Configuring the part in Unity (deprecated)]]&lt;br /&gt;
* [[Parts Pack Production Procedure|Parts Pack Production Procedure In Unity]]&lt;br /&gt;
* [[Configuring parts|General info on configuring core part data]]&lt;br /&gt;
* [[Family|Setting up a custom Part Family]]&lt;br /&gt;
* [[Configuring the reentry effects]]&lt;br /&gt;
* [[Creating custom engine plumes]]&lt;br /&gt;
* [[Configuring the part animation]]&lt;br /&gt;
* [[Part modding videos (tutorials)]]&lt;br /&gt;
&lt;br /&gt;
=== Finishing up ===&lt;br /&gt;
&lt;br /&gt;
*[[Sounds for parts with Wwise and Unity]]&lt;br /&gt;
* [[Creating a part icon]]&lt;br /&gt;
&lt;br /&gt;
=== See Also ===&lt;br /&gt;
* [[Part Modules]]&lt;br /&gt;
* [[Stage Type|Stage Types]]&lt;br /&gt;
* [[Staging Icon Asset Address]]&lt;br /&gt;
* [[Category|Part Category]]&lt;br /&gt;
* [[Family]]&lt;br /&gt;
* [[Resources]]&lt;/div&gt;</summary>
		<author><name>Munix</name></author>
	</entry>
</feed>