AudiokineticのコミュニティQ&AはWwiseやStrataのコミュニティ内でユーザ同士が質問・回答をし合うことができるフォーラムです。Audiokineticテクニカルサポートチームからの回答をご希望の場合は、必ず サポートチケットページ をご利用ください。

0 支持
Hi,

Is it possible to get the State Groups under the States of a Switch Container object?

Do I need to create a StateGroup object with its children State objects under the parent SwitchContainer object?

Thanks!
Michelle A. (220 ポイント) General Discussion

回答 1

0 支持

To get the switch container assignments states or switches, use: ak.wwise.core.switchContainer.getAssignments
https://www.audiokinetic.com/library/edge/?source=SDK&id=ak__wwise__core__switchcontainer__getassignments.html

To create assignments:

  1. Create the StateGroup and States in your project (under States, in project explorer game sync tab)
  2. Use ak.wwise.core.switchContainer.addAssignment to create an assignment in your switch container
To retrieve or set which switch group or state group is being used on the Switch Container:
  1. To get, use ak.wwise.core.object.get with reference name SwitchGroupOrStateGroup and DefaultSwitchOrState
     "return": [ "@SwitchGroupOrStateGroup", "@DefaultSwitchOrState" ]
  2. To set, use ak.wwise.core.object.setReference, with SwitchGroupOrStateGroup or DefaultSwitchOrState
Bernard R. (Audiokinetic) (35.8k ポイント)
Bernard R. (Audiokinetic) 編集
I do use getAssignments, but that only seems to get the Assigned Objects in the Contents Editor.  I'm not sure why I'm not also getting the States/StateGroups.  Would they require different WAAPI calls?  Thanks!
Thanks for the precision, I updated the answer.
Thanks for the update.  I'm able to set those references under the General Settings tab, but I'm trying to add State Groups to an object in the States tab.  Is it possible to do that with WAAPI?  When I use get/setAssignments, am I only able to assign objects for whatever switch/state is set in General Settings?  When I set the reference to a Switch, it gets and sets the switches under Assigned Objects.  Do I need to set the Group to a State before I can get/set State Groups?  Thanks!
Sorry, I misunderstood your question. No, it is not possible to set or get the State values in the States tab. I noted your request.
...