Version

menu_open
Wwise Unity Integration Documentation
Using AkRoomPortal and AkRoomPortalObstruction from the Inspector

Portals play an important role in all Spatial Audio Concepts. The Integration implements portals with two Wwise components: AkRoomPortal and its complementary (not mandatory) AkRoomPortalObstruction.

AkRoomPortal

  • Initial State: Sets the portal to begin closed or open.
    • Open On: Provides a list of Unity events that will open the portal. You can choose more than one Unity event, in which case the field will display as "Mixed…". You can also code your own triggers, so they appear in the list for your co-workers. See Adding New Triggers for Wwise Events.
    • Close On: Provides a list of Unity events that will close the portal. You can choose more than one Unity event, in which case the field will display as "Mixed…". You can also code your own triggers, so they appear in the list for your co-workers. See Adding New Triggers for Wwise Events. Also see SDK doc: Using Rooms and Portals.
  • Back Room An AkRoomPortal connects two rooms. The Back Room is the highest priority, active and enabled room on the negative side of the portal (opposite to the direction of the local Z axis). A disabled room will not be selected at runtime.
  • Front Room An AkRoomPortal connects two rooms. The Front Room is the highest priority, active and enabled room on the positive side of the portal (aligned with the direction of the local Z axis). A disabled room will not be selected at runtime.

AkRoomPortalObstruction

Obstructs the spatial audio portal of the current GameObject from the spatial audio listener, if at least one object is between them, through a call to SetPortalObstructionAndOcclusion(). When there is an object between the current GameObject and the spatial audio listener, this script will call SetObjectObstructionAndOcclusion() with an obstruction value of 1.

You can only add AkRoomPortalObstruction to GameObjects which already have an AkRoomPortal component. Also, there will be no obstruction if no spatial audio listener has been registered.

  • Fade Time: The number of seconds for fade ins and fade outs.
  • Layer Mask: Indicates which layers act as obstructers.
  • Max Distance: The maximum distance at which to perform obstruction. A negative value will be interpreted as inifinite distance.
  • Refresh Interval: The number of seconds between obstruction checks. If 0, obstruction checking continues non-stop.
Note: Do not use AkRoomPortalObstruction if using spatial audio diffraction.
See also

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise