バージョン

menu_open
Wwise SDK 2023.1.3
統合の詳細 - ゲームオブジェクト

Game objects are entities to which elements such as interfaces, sounds, and triggers can be attached.

ゲームオブジェクトは、 AkGameObjectID (符号なし64ビットフィールド)として定義できます。IDは、0から0x‭FFFFFFFFFFFFFFDF‬(つまり符号付き整数として -33)までの範囲で、自由に選択できます。 ゲームオブジェクトID範囲0xFFFFFFFFFFFFFFE0(-32)から0x‭FFFFFFFFFFFFFFFF (-1) は、内部使用のために予約されています。オーサリングツールによって登録されたトランスポート・ゲーム・オブジェクトは、ゲームオブジェクトID 0xFFFFFFFFFFFFFFFE(-2)を使用するようになりました。

ゲームオブジェクトの関連性

Every Event triggered in the sound engine is associated with a game object. All Event Actions are associated with the game object passed as a parameter of the AK::SoundEngine::PostEvent() function, if they target a specific game object. If Event Actions do not target a game object, they ignore the game object specified. If an Action affects a single game object, but the game object specified in AK::SoundEngine::PostEvent() is not valid, the Action is not executed.

Every game object can have an associated 3D position, a Switch for every existing Switch Group, an RTPC value for each RTPC, and multiple values (for example, a volume) that can be set on a specific item (Sound SFX, Actor-Mixer, bus, and so on) for a specific game object. サウンドエンジンは、これらの値に関連付けられているゲームオブジェクトが登録解除されるまでこの情報を格納します。

ゲームオブジェクトの登録

Before you can use game objects, you must register them. When you no longer need the game objects, unregister them. If you leave them registered, the memory used to store this information (3DPosition, RTPCs, Switches, and so on) is wasted.

AK::SoundEngine::RegisterGameObj() 関数が2バージョン存在します:

および

AK::SoundEngine::RegisterGameObj( AkGameObjectID in_gameObjectID, const char * in_pszObjName );

2番目の関数バージョンは監視を目的としています。It displays the real name associated with objects that are playing. AK_OPTIMIZED モードでは、2番目のバージョンはオブジェクト名を無視します。

You can use either of the following two functions to unregister game objects:

および

AK::SoundEngine::UnregisterAllGameObj() performs a complete clean-up of all parameters currently set for every game object and removes all game object associations. UnregisterGameObj() does the same thing but only for a single game object. After a game object is unregistered, you must register it again before you can reuse it.

注釈: Reusing game object IDs can lead to unreliable associations between game objects and names in the Wwise Profiler (see Profiling) because the Profiler only displays the most recently used name when the view is refreshed.

For an example of game object integration, refer to ゲームオブジェクト統合例.

参照
AKSOUNDENGINE_API AKRESULT UnregisterAllGameObj()
AkUInt64 AkGameObjectID
Game object ID
Definition: AkTypes.h:142
AKSOUNDENGINE_API AKRESULT RegisterGameObj(AkGameObjectID in_gameObjectID)
AKSOUNDENGINE_API AKRESULT UnregisterGameObj(AkGameObjectID in_gameObjectID)

このページはお役に立ちましたか?

サポートは必要ですか?

ご質問や問題、ご不明点はございますか?お気軽にお問い合わせください。

サポートページをご確認ください

あなたのプロジェクトについて教えてください。ご不明な点はありませんか。

プロジェクトを登録していただくことで、ご利用開始のサポートをいたします。

Wwiseからはじめよう