-
Notifications
You must be signed in to change notification settings - Fork 7
Audio
CCL will automatically add the basic audio to your car (wheels, brakes, collisions...).
Locomotives will also include those sounds automatically.
For locomotives (slugs included), you will need to create an audio prefab. Each child of this prefab should be for 1 sound.
Clips are single use sounds that happen on certain events. For these, you use an AudioClipPortReader component. You can use all clips together on the same GameObject.
Examples of usage are:
- Turning off a diesel engine
- Contactors changing on the TMs
- Compressor finished charging reservoirs
These are used for any sounds that are constantly affected by ports.
Layered audio uses layers for complex output. The DE2's engine at idle has 3 layers, the engine itself, the shaft, and the compressor's whine.
Each layer has its own audio source. Position them where you want the sound to come from.
Each sound source you want affected by the doppler effect needs to have a component named DopplerProxy.
To actually affect the LayeredAudioProxy component, you'll need LayeredAudioPortReaderProxy components on the same object. Multiple can affect the same audio.