Setting up Unity

From KSP 2 Modding Wiki
Revision as of 10:57, 28 October 2023 by Polo (talk | contribs) (Added content)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page will help you install everything you need to work your on Unity.

Installing Unity

  1. Download Unity Hub. https://unity.com/download
  2. Download Unity 2022.3.5f1. https://unity.com/releases/editor/whats-new/2022.3.5
  3. Click on “Install this version with Unity Hub”.

Initializing the Unity project

As the Unity project is very large (~4 GB), we will use it for all our mods.

  1. Follow the instructions on this page : https://luxstice.notion.site/Creating-a-Unity-Project-dae1a51ab2a84fc4b5c5e1eeef4b90b3.

For a quick presentation of the Unity interface: https://luxstice.notion.site/Learning-Unity-faf0ab10f24c4925bf4b51a997a41666.

Configure the Unity project

Importing ThunderKit

  1. Follow the instructions on this page : https://luxstice.notion.site/Installing-ThunderKit-7e00f13efe804f12a31a9f31d7f9fd6e.

Importing Unity KSP tools

  1. Download the package here : https://github.com/SpaceWarpDev/KSP2UnityTools/releases.
  2. Click on the download file then click on “Import”.

Other configurations

  1. In the project explorer, go to Assets > AddressablesAssetData > AssetGroups > Built In Data.
  2. In the Inspector window, click on “Inspect Top Level Settings”.
  3. Set the “Shader Bundle Naming Prefix” field to “Default Group GUID”.

Without this manipulation, Unity generates bundles with an ID calculated from the project name. Since we are using the same project for multiple mods, there will be a name conflict for the standard shader that Unity incorporates into all addressables. Using the GUID of the default group will help avoid collisions (you will need to remember to make the mod group the default group).