Wwise Unity Integration Documentation
Obstruction and Occlusion

It is possible to obstruct or occlude sounds in Unity. You can either use:

A. Emitter Obstruction/Occlusion

An emitter can be obstructed or occluded in Unity when the AkEmitterObstructionOcclusion component is added to its GameObject. When an object is found in the path between the emitter and a listener, the component will call SetObjectObstructionAndOcclusion() with an obstruction/occlusion value of 1. When your map doesn't use spatial audio (that is, it doesn't have any AkRoom components), the AkEmitterObstructionOcclusion component will use occlusion. In a spatial audio scene, this same component will use obstruction with the spatial audio listener only; the GameObject with the AkSpatialAudioListener component. Emitter obstruction is applied to emitters that are in the same room as the spatial audio listener.

AkEmitterObstructionOcclusion component

To make sure obstruction or occlusion is done on desired objects, use layer masks. For example, you can specify a layer for the player object and exclude it from the AkEmitterObstructionOcclusion component so that the listener's body doesn't obstruct or occlude sounds.

Layer Mask options for the Ak Emitter Obstruction Occlusion component

B. Portal Obstruction

Sound emitted through portals can also be obstructed. If you are not using Spatial Audio Diffraction, you can use the AkRoomPortalObstruction component on the GameObject with an AkRoomPortal. When an object is found in the path between the portal and the spatial audio listener, the component will call SetObjectObstructionAndOcclusion() with an obstruction value of 1.

AkRoomPortalObstruction component

The meshes of Rooms that a Portal is connecting will cause obstruction with the AkRoomPortalObstruction component. If you are using Surface Reflectors, they may obstruct the portal opening too. Make sure you put these in different layers to exclude them from the AkRoomPortalObstruction component's Layer Mask.

Layer Mask options for the Ak Room Portal Obstruction component