[[Category:Parts modding]]
Sounds for parts with Wwise and Unity
First, install your Unity environment, SpaceWarp template, ....
There are already excellent tutorials that explain these steps:
https://github.com/SpaceWarpDev/SpaceWarp.Template
First step: Wwise
You need to create an account : https://www.audiokinetic.com/fr/products/wwise/
![](/images/3/34/2024-02-09_16_13_04-Wwise_Audiokinetic.png)
Next : Install Wwise Launcher
![](/images/e/ea/2024-02-09_16_15_29-Wwise_Audiokinetic.png)
Wwise is free for a 200 sounds databank.
Ok, now a warning :
When I started my mod, I couldn't get the sound to work with the latest 2023 version of Wwise.
So I continued to use version 2021 of Wwise to prepare my sounds and I integrated version 2023 of the Wwise libraries into Unity for maximum compatibility.
So I will explain how I did it but maybe you can try directly with the latest 2023 versions. If you succeed, let me know so that I can modify this tutorial.
So, this tutorial will first install version 2021 to be able to have a Wwise project in 2021 format then I update the Wwise libraries in Unity in 2023 format.
For these reasons, here are the versions of Wwise on my computer:
![](/images/8/8c/2024-02-09_16_17_46-Audiokinetic_Launcher.png)
Ok, now let's prepare the environment for Unity. Wwise normaly will found your existing projects. We'll integrate Wwise on projects now :
![](/images/1/1f/2024-02-09_16_24_33-Audiokinetic_Launcher.png)
Next, select Wwise version (2021.1.13.8036 for me) and plateform(s) you want :
![](/images/f/fc/2024-02-09_16_33_22-Audiokinetic_Launcher.png)
If some packages are missions for destination plateform(s), this message will appear :
![](/images/7/7c/2024-02-09_16_34_07-Audiokinetic_Launcher.png)
Clic Modify Wwise…. And add it.
The SDK is required. It should also be added.
![](/images/a/af/2024-02-09_16_35_29-Param%C3%A8tres.png)
Clic on Next to perform installation.
When ok, come back to Unity integration.
If SDK is not set, choose it :
![](/images/0/03/2024-02-09_16_30_58-Audiokinetic_Launcher.png)
Wwise project need to be created. For that, leave the field empty :
![](/images/4/4a/2024-02-09_16_32_18-Audiokinetic_Launcher.png)
Unity integration is ready :
![](/images/4/49/2024-02-09_16_38_02-Param%C3%A8tres.png)
Then, clic on Integrate.
![](/images/3/3e/2024-02-09_16_48_45-Audiokinetic_Launcher.png)
Now that the Wwise project is created in 2021 format, I can update the Wwise libraries in the Unity project.
![](/images/4/4a/2024-02-09_17_21_46-Audiokinetic_Launcher.png)
It's OK. In the screenshot I can update to the latest version 2023. I won't do that because I'm sure everything is fine with the versions I chose.
I will do a test later for the latest updates.
![](/images/e/e2/2024-02-09_18_29_10-Audiokinetic_Launcher.png)
Normaly, now, your Wwise project will appear on the Wwise Launcher. I work on my projects with the 2021 version of Wwise. I will open the Wwise project that was created:
![](/images/7/79/2024-02-09_18_31_21-Audiokinetic_Launcher.png)
Step 2 : Wwise project
You need to create your sound databank :
![](/images/c/ce/2024-02-09_18_32_27-Kesa_solar_-_Wwise_2021.1.13.png)
![](/images/d/d2/2024-02-09_18_33_01-Kesa_solar_-_Wwise_2021.1.13.png)
Your soundbank is now created.
![](/images/8/8d/2024-02-09_18_34_25-Kesa_solar_-_Wwise_2021.1.13.png)
I'm only using windows plateform and English language but you can add/remove/modify :
![](/images/c/c3/2024-02-10_08_38_58-.png)
![](/images/0/09/2024-02-10_08_38_19-.png)
Next step : importing your audio files. I'm using .wav format.
![](/images/a/aa/2024-02-09_18_35_12-.png)
![](/images/1/1a/2024-02-09_18_36_43-Kesa_solar_-_Wwise_2021.1.13.png)
Select your wave file on your computer.
Then, import :
![](/images/9/92/2024-02-09_18_37_25-Audio_File_Importer.png)
My new sound appears on the list :
![](/images/e/ee/2024-02-09_18_38_28-Kesa_solar_-_Wwise_2021.1.13.png)
You can double click on you audio (for example if you want to set a loop) :
![](/images/4/46/2024-02-09_18_40_54-Property_Editor.png)
And close the window.
Now, you have to set events with your audio for using in Unity : one for playing it, one for stopping it :
![](/images/7/79/2024-02-09_18_44_46-.png)
![](/images/3/38/2024-02-10_05_45_52-Kesa_solar_-_Wwise_2021.1.13.png)
Clic on your new event for setting it :
![](/images/c/c4/2024-02-10_05_47_01-Kesa_solar_-_Wwise_2021.1.13.png)
Right clic on Target field for assign an audio to this event :
![](/images/d/d0/2024-02-10_05_47_57-Kesa_solar_-_Wwise_2021.1.13.png)
Select your audio :
![](/images/c/ca/2024-02-10_05_48_24-Kesa_solar_-_Wwise_2021.1.13.png)
Same event creation for stopping audio action :
![](/images/f/f3/2024-02-10_05_49_57-Kesa_solar_-_Wwise_2021.1.13.png)
Same for playing, assign your audio to this envent.
Now both events appear on the list :
![](/images/c/c5/2024-02-10_05_51_23-Kesa_solar_-_Wwise_2021.1.13.png)
To finish, you must assign new events to your soundbank. For that, select your soundbank and drag and drop your events on the bottom window :
![](/images/1/1a/2024-02-10_05_52_56-Kesa_solar_-_Wwise_2021.1.13.png)
Ok, ready now.
Now, just generate your soundbank for using it with Unity and your final mod :
![](/images/4/4b/2024-02-10_05_54_02-Kesa_solar_-_Wwise_2021.1.13.png)
![](/images/4/4a/2024-02-10_05_55_16-Generating_SoundBanks_-_Completed.png)
Your soundbank is now in your wwsise folder <Wwise Project>/GeneratedSoundBanks/Windows
You have to copy the file .bnk in your KSP2 mod folder <Your Mod>/assets/soundbanks/
Now, keep your Wwise Project open and start Unity.
Step 3 : Unity project
Normaly, both are connected. We will verify in the wwise picker window :
![](/images/5/5f/2024-02-10_06_18_27-kesasolar.Unity_-_Default_-_Windows%2C_Mac%2C_Linux_-_Unity_2022.3.5f1_DX11_.png)
All your soundbank events normaly appear on this window.
I will show you 2 ways for using them.
Example 1 : add an engine sound
First, I create an empty gameobject for sound : u_amb_Engine
![](/images/9/97/2024-02-10_06_24_23-kesa.Unity_-_Default_-_Windows%2C_Mac%2C_Linux_-_Unity_2022.3.5f1_DX11_.png)
And on it few Components :
![](/images/a/a2/2024-02-10_06_25_59-Kesa_solar_-_Wwise_2021.1.13.png)
In Rigidbody, check "Is Kinematic" and uncheck "Use Gravity" !
Next, add audio Components :
![](/images/e/e4/2024-02-10_06_27_52-kesa.Unity_-_Default_-_Windows%2C_Mac%2C_Linux_-_Unity_2022.3.5f1_DX11_.png)
![](/images/3/3a/2024-02-10_06_28_21-kesa.Unity_-_Default_-_Windows%2C_Mac%2C_Linux_-_Unity_2022.3.5f1_DX11_.png)
END