1. Audiosource pitch Speed Play default = 1 battle there are twice times the speed of 3 times times the corresponding skill sound also has the need of simultaneous double play.
2. Scene switch background music has gradient requirements, with the help of Dotween plug-ins, it is important to note that Dofade () requires volume=0
Audiosource.volume = 0
Audiosource:dofade (self.musicvolume,2.5)
3. Background music is relatively large, each file is named a assetbundle is the wise choice, in the scene switch when the previous background music unloading
4.Load Type
Decompress on Load
Once the audio file is loaded, it will be decompressed. Use this option for smaller compressed sounds to avoid the performance overhead of immediate decompression. Note that extracting Vorbis encoded sound at load is about 10 times times more memory than using it (approximately 3.5 times times for ADPCM encoding), so do not use this option for large files. Applies to sound files
Compressed in Memory
Save memory by keeping sound compressed in memory and uncompressed while playing. This option has a small performance overhead (especially for ogg/vorbis compressed files), so it can only be used for larger files, such as background music.
Streaming
Dynamically decode sounds. This method uses a minimum amount of memory to buffer the compressed data that is gradually read from the disk and decoded in the run.
Note: Even if no audio data is loaded, the streaming fragment will have an overload of about 200KB. So it is more suitable for larger files, such as background music.
Unity Development Tips for eight audio usage tips