menu
 

在 Audiokinetic 社区问答论坛上,用户可对 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!
分类:General Discussion | 用户: Michelle A. (220 分)

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.
...