Community Q&A

Welcome to Audiokinetic’s community-driven Q&A forum. This is the place where Wwise and Strata users help each other out. For direct help from our team, please use the Support Tickets page. To report a bug, use the Bug Report option in the Audiokinetic Launcher. (Note that Bug Reports submitted to the Q&A forum will be rejected. Using our dedicated Bug Report system ensures your report is seen by the right people and has the best chance of being fixed.)

To get the best answers quickly, follow these tips when posting a question:

  • Be Specific: What are you trying to achieve, or what specific issue are you running into?
  • Include Key Details: Include details like your Wwise and game engine versions, operating system, etc.
  • Explain What You've Tried: Let others know what troubleshooting steps you've already taken.
  • Focus on the Facts: Describe the technical facts of your issue. Focusing on the problem helps others find a solution quickly.

0 votes

Is there a way to import, say, from a text file, Switches into a Switch Group? Have a fairly long list that typing out could not just be tedious but also human error prone.
Thanks in advance for any thoughts on this.

closed with the note: Answer Worked
in General Discussion by Kenneth W. (290 points)
closed by Kenneth W.

1 Answer

+1 vote
 
Best answer

Hi Kenneth,

I believe this should be possible using the Wwise Authoring API (WAAPI).

WAAPI allows you to programmatically interact with a Wwise project, and it's an ideal solution for scripting tasks like the one you've described.

In particular, I would recommend using Python for this. You can write a simple script that reads your text file line by line and then makes calls to WAAPI to create the corresponding Switches within the correct Switch Group. The general workflow would be:

1) Read the list of Switches from your text file into a list in your Python script.
2) Connect to Wwise using a WAAPI client.
3) Get the ID of the Switch Group you want to target. You can do this using the function ak.wwise.core.object.get. You would query for your Switch Group by name to retrieve its unique ID.
4) Create the new Switches. You would then loop through your list of names and for each one, call the function ak.wwise.core.object.create. In the arguments for this function, you would specify the name of the new Switch, set the type to 'Switch', and most importantly, provide the ID of the parent Switch Group you retrieved in the previous step.

For further details, you can refer to the official WAAPI documentation here: https://www.audiokinetic.com/en/library/2024.1.5_8803/?source=sdk&id=waapi.html

by Alessandro Famà (4.5k points)
selected by Alessandro Famà
Thank you!  Really appreciate the response and info on this.
...