Leçon 5

Table des matières

Playback Limits

Playback limits can be used to constrain the amount of concurrent voices, and so reduce stress on the CPU. Like many other properties, the Playback Limit options can also be linked or unlinked on selected platforms. This allows you to clamp the amount of concurrent voices on platforms with less resources, while using priority settings to specify what voices are active. Let’s enable Playback Limit on the Coin_Spawn Sound SFX, allowing only up to 3 instances at once.

  1. In the Search field, type ‘coin’ then select the Coin Sound SFX.

    All virtual voice settings are located in the Advanced Settings tab.

  2. In the Sound Property Editor, select the Advanced Settings tab.

  3. In the Playback Limit group box, enable the Limit sound instance to check box.

  4. Set its linked limit to 3.

    The current settings will allow three voice instances per game object; however, the goal is to create a global limit so that ten coin drops would only trigger three voice instatiations. As such, change the list from Per game object to a global limitation.

  5. From the Limit sound instances to list, select Globally.

    This limit will now be applied to all other platforms. Let’s now use unlinking to give the Android platform a custom limit.

  6. From the Platform Selector, make sure Android is selected.

  7. Right-click the rightmost Link/Unlink Indicator next to the Limit sound instances to: property and select Unlink.

    This platform will now have its own property rather than sharing it with any other platform. Let’s set a new limit.

  8. In the Limit sound instances to property field, set the limit value to 1, meaning no more than one coin spawn sound will be heard at one time.

You’ve now successfully lowered the Playback Limit on Coin Spawns to 1 on Android.


Cette page a-t-elle été utile ?