Version

menu_open
Warning: you were redirected to the latest documentation corresponding to your major release ( 2022.1.17.8543 ). Should you wish to access your specific version's documentation, please download the offline documentation from the Audiokinetic Launcher and check the Offline Documentation option in Wwise Authoring.
Wwise SDK 2022.1.17
Quick Start Sample Integration - Game Objects

Game Object Example

For an overview of Game Objects, please refer to Concept: Game Object.

Game objects must be registered before you can use them to post events, set positions, and so on. The following code registers two game objects with predefined IDs. Note that you can use any 64-bit unsigned integer ID ranging from 0 to 0x‭FFFFFFFFFFFFFFDF you want, such as an incremented counter or an object pointer cast into an AkGameObjectID.

When a game object becomes obsolete, for example when the corresponding entities are removed from the game's world, you should unregister them to free up any resources that might be associated with them:

Refer to Integration Details - Game Objects for more information on game objects.

Note: This sample code comes from the Sound Engine Integration Sample Project available in the Samples section. Refer to Integration Demo Sample for more information.
AkUInt64 AkGameObjectID
Game object ID.
Definition: AkTypes.h:128
AKSOUNDENGINE_API AKRESULT RegisterGameObj(AkGameObjectID in_gameObjectID)
AKSOUNDENGINE_API AKRESULT UnregisterGameObj(AkGameObjectID in_gameObjectID)

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