コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

0 支持
Hello audiophiles

When I drag my switch event onto a game object in unity, as well as the AKSwitch script, and play the game the error "No Valid Switch" comes up.

Can anyone explain this to me, is it something I'm not doing in Unity, or is it something that I've missed in the Wwise program ?

 

Thanks!

 

Arnaud
Arnaud B. (310 ポイント) General Discussion

回答 1

0 支持

In Wwise, Make sure your Switch Container is assigned to a switch group:

  • In the Property Editor for your Switch Container, under "Switch Type", assign a switch group, and a default Switch/State
  • In the Contents Editor, assign children to Switches (under "Assigned Objects")
  • Re-generate your SoundBanks

For more information on Switches, you can refer to the Wwise help (In Wwise Authoring: Help > Wwise Help), under Wwise Help > Using Sounds and Motion to Enhance Gameplay > Defining Object Playback Behaviors > Defining the Contents and Behavior of Switch Containers

Benoit S. (Audiokinetic) (16.0k ポイント)
I've done exactly that and I still get the error.
I've tried with various projects in Wwwise and in Unity. Can't seem to get past this error... Any other ideas?

Thanks for the help Benoit!
Here is a bit of the process I would you to verify things on the way to the game.

Verify Sound Object Assigned for Switch Type: Switch in Actor Mixer.
Verify (correct) Switch Container added as an Event Action to Event.
Verify Event has been included in the Soundbank.
Verify Events/ Structures for the Switch Container/ Event that the Switch
-Make sure all Structures are included.
-Make sure all Media is included.
Verify the Soundbank is getting updated with your changes.
Verify the Soundbank is being loaded by your Unity Project.
-Must exist in correct location within (Streaming Assets)
-Run Game in Unity Editor, Connect Wwise, Profile F6 (Soundbanks Tab).
Verify Event can be triggered while connected.
-Do other switches work?
-If you add a sound to the Event with no switch, does it work?
-What are the errors in the Profiler?
How is the AKSwitch being executed by Unity? (in code, OnStart, OnAwake, etc)

You're almost there, keep at it!
-lcl
Hi Damian

Thanks a lot for help. I went through everything you mentioned and the switches work now!
There were a few things I was doing wrong, using the profiler in Wwise is extremely helpful.
The sounds were actually working when just played in the events, it's the switches that were causing a problem. Somehow I wasn't using them correctly and they weren't compiled in the right way either.
Anyway. All good now. Got a beautiful footstep switch now and will definitely use switches for other sounds as well. They're great!

Even though everything is working fine now, I am wondering if I am doing it the mist efficient way. As I'm sure there must be a few different ways to get these switches to work.
I currently have 2 AKSwitchs on my floor collider:
1- OnTriggerEnter + tag.player + keydownW, that triggers a Walk switch.

2- Update, that triggers a Surface_Snow switch on Update.

I then have the AKEvent that containes the footstep switch on the floor collider, that triggers when I enter the collider.

Is this correct?

Thanks a lot again!

Arnaud
...