Hey! Just in case anyone views this and if having trouble, double check that your tag on your camera is set to player. I didn't have the tag set correctly on a standard out of the box unity project and since the call is tag based you have to set it on the main camera.
@patrizio.sound.london3 жыл бұрын
I`m a beginner here, but I didn`t catch the reason why you did code a "string" instead of i.e. "public eventname" so you could have just dragged and dropped the wwise event, instead of typing it as a string. sorry in advance if the question is gonna sound stupid :D
@renardsound Жыл бұрын
Hey Bjørn, thanks for this - Had a little problem using this script on the "3DGameKit" on Unity, just writing this down in case someone has the same issue : nothing would trigger even though I added the right TAG to Ellen (the character / listener) Or added a Rigidbody to her (which isn't on the character in the beginning and can cause problems when using the functions - void ontrigger[...]) - the last problem that I found on this project while using triggers and that actually fixed the issue was on >> Edit - ProjectSettings - Physics - Scroll down and where there is the “Layer Collision Matrix”, on the first line: Default, look for the column “Player” and check the check box. And then the trigger functions should be working fine again. Hope this can help someone!
@CujoSound Жыл бұрын
Oh that's a nice find and good tip :)
@jonasmemborg41965 жыл бұрын
If you want to reference the Events directly in the inspector, you can write: public AK.Wwise.Event[] wwiseEvent; - You have to set the size to something larger than 0 first, but you can then choose events from the inspector. In the script, instead of AkSoundEngine.PostEvent(), you use: wwiseEvent[].Post(gameObject); - In the [] you write the number assigned to the event you want to call. Wwise is giving me some problems currently, so I haven't actually tested it, but that should work. - No strings attached (Haha... I'll show myself out).
@CujoSound5 жыл бұрын
Haha. Yea. You can definitely make things easier and code look and feel better, and more efficient with things like these.
@patrizio.sound.london3 жыл бұрын
It works perfectly. Thanks!
@Guitartom-rh5zm2 жыл бұрын
Wow , this seems like an amazing tutorial, learning so much . Totally new to Wwise and unity so this is kind of a big step for me but given me a great insight to how game audio works
@danolaf837711 ай бұрын
Really useful video as always
@neverknowsbest17172 жыл бұрын
oof i just had to restart my project from scratch as i just lost like the last 5 years of work off my external hard drive and now my own comment advise isnt working. rip Edit: I kinda just dragged the event from Wwisepicker to the emitter for the time being. That should work for others as well i think.
@nico_crowned4 жыл бұрын
Hi Bjorn, your tutorials are amasing!. My English is not very good, but I will try to write my question. I did everything step by step, when I press play in Unity, no errors appear to me, in fact it says that the integration was successful or something like that, but... NO SOUNDS COME OUT!. When I connected Wwise and Unity in real time, I could notice that no event was firing, instead I get the "VOICE STARVATION ERROR". I read out there that this error could be due to CPU overload due to many voices or effects, but I only put ONE sound with a simple spatialization curve, just like in the tutorial ... please, I need help, I can't get out of this problem!!
@CujoSound4 жыл бұрын
That's a good question, it's quite hard to determine what the error may be, but it's clearly not a code or unity issue as such, it sounds quite a lot like the integration of Wwise / Unity has some setting which isn't correct.
@Yinless5 жыл бұрын
God I love wwise :D
@neverknowsbest17172 жыл бұрын
If anyone else is not getting sound from their project, write 'Debug.Log("Entered Zone");' in the void OnTriggerEnter. If you enter the zone in the game and nothing shows up in the console in unity, it never registers the player entering the collider. Edit: just got mine to work. Make sure you have "Akbank" on wwiseglobal gameobject
@Tonestrom3 жыл бұрын
Hey Bjørn thank you so much for this video its a really great way to start working with unity and wwise. I followed everything in this video tutorial and double checked everything but when you would have sound in this video I would still have silence and I could not figure out why. However I found this video kzbin.info/www/bejne/aIiwiIxrg9-NnNU in which you introduce Wwise unity to non-programmers and where you setup the scene for this video. if anyone else watching this video cannot get any sound from just watching this video I encourage you to watch the introductory video :). Thank so much Bjørn for this amazing series its awesome!
@CujoSound3 жыл бұрын
Thanks a lot - that explains a lot actually, I should make new ones of all these really.
@russjohnson17154 жыл бұрын
Thanks for doing this. The script is really flexible. But I just cannot get any sound out. Oh well.
@CujoSound4 жыл бұрын
What does it say? do ?
@russjohnson17154 жыл бұрын
Ok. There are no errors at all. The script you made is all good is Visual Studio. Wwise soundbanks/events/audio folders are all good and no errors in Wwise to unity or VS to unity. There is nothing showing though on Wwise profiler. All Ak objects/scripts in Unity are correct with no errors. If I use Unity's Audio listener, and load it up just through unity then it's all good. I tried without attenuation from Wwise, still not working. Spent 5 hours going over your video and triple checking my triple checks. I've literally done the same thing that you have. Tried swapping Unity camera tags from MAIN to PLAYER but no audio, tried using standard asset camera, no audio, Made my own camera, no audio. The listener is on main cam, not on my Fps controller. I've no doubt that it's something to do with how Wwise and Unity 2019.3.3 are talking to each other as every single one of your scripts is solid. Don't worry though. I'm not complaining. There are other ways to skin this cat and your videos are a real resource, so thanks!
@CujoSound4 жыл бұрын
@@russjohnson1715 Do you have a Wwise listener in the scene and all that ? on the camera / player / something?
@russjohnson17154 жыл бұрын
Yup. But don't worry. I just mentioned it for reference in case one day someone else has the same issue and sees this. They might even have a fix for it.
@sneakBeats13 жыл бұрын
@@russjohnson1715 I've literally got the same problem! I actually had all this working in the same project but through version control lost my scripts and deceided to re-write for practice... Now I get no sound at all. If I simply use AkEvent script then I can hear and see the sound in the Wwise profiler, but with this sxcript, I get nothing...
@davidmiller64523 жыл бұрын
great tutorial. In play mode i am getting "Event ID not found" . Thought I had set up correctly. Any suggestions?
@CujoSound3 жыл бұрын
That's when you haven't built the banks in Wwise.
@davidmiller64523 жыл бұрын
Soundbanks were built. i am using arcamera as my player. I see in the console the trigger was working but maybe the path is wrong?
@CujoSound3 жыл бұрын
@@davidmiller6452 and the right soundbank has been loaded and in the correct location ? That error is only when an event doesn't exist in the current bank context. Should work out of the box . :)
@davidmiller64523 жыл бұрын
@@CujoSound i may need to do a prior tutorial on a basic setup for wwise soundbank creation.
@CujoSound3 жыл бұрын
@@davidmiller6452 it's possible. Let me know how it goes. :)
@ayahuasca57874 жыл бұрын
very useful totutial.
@kinglee_653 Жыл бұрын
Wow,I have a question,If I creat sphere collider trigger in and exist,what's the different with audio emitter script?
@CujoSound Жыл бұрын
No, any collider should work :)
@kinglee_653 Жыл бұрын
@@CujoSound Thanks.Ak ambient trigger enter,is this OK?
@CujoSound Жыл бұрын
@KIng Lee _李程 yes, should work like any other collider with the same code
@kinglee_653 Жыл бұрын
@@CujoSound Hi,Bjorn “error CS0117: 'AkSoundEngine' does not contain a definition for 'RegisterGameObject'” What shoud I do?
@CujoSound Жыл бұрын
@MTMFX that sounds like that AKEngine isn't initialized properly. I've never found a solution to it really. Except starting over :(
@jonasnorrman81415 жыл бұрын
Is it possible to get this Unity-project? Can't find that game on Unity's Assets-Store! Would be perfect for practice :) !
@CujoSound5 жыл бұрын
Sure . Let me try
@jonasnorrman81415 жыл бұрын
@@CujoSound Awesome! Hope you find it :-) !
@methenry905 жыл бұрын
Hey Bjorn, Thank you so much for making these videos, I found them more useful than the Audiokinetic tutorials themselves. I'm still struggling to get any sound coming out of unity though, even if I followed your video step by step. I'm using the Unity 2D Game Kit as a sample project, which has all sounds already implemented but I'd like to replace them all using Wwise instead, so I integrated wwise into the project and followed your tutorial but no sound is triggered when I start playing the game. Considering that none of the sounds that came with the Unity 2D Game Kit are playing either, do you have any idea of what the issue might be? ps. I'm not getting any error in the unity console
@CujoSound5 жыл бұрын
I haven't tried in a 2D project. But, maybe we can make a case of this, if you send me the project? B at cujo dot dk and let's see if I can make anything of it ?
@CujoSound5 жыл бұрын
And thank you, for liking these videos. Really appreciate it.
@methenry905 жыл бұрын
@@CujoSound Absolutely deserved, your tutorials and insights into the industry are absolute gold!
@jocker0yt5 жыл бұрын
@@CujoSound Hey Bjorn, Same as @methenry90 I have the same problem. I followed the video step by step and no sound coming out. Not getting any errors either. I can get the sound playing through the AkEvent though so there is not a problem with ntegration I think. Did you find any solution?
@CujoSound5 жыл бұрын
@@jocker0yt actually I didnt. But when you say you have sound coming from AKEvent, but no sound plays, that makes it a little confusing to me? If you can get an AKEvent to fire from the game, then audio should be playing. It could either be that there is no listener or that the sound is 3D and typically positioned really far away in that context.
@samycolombano98325 жыл бұрын
Nice. Why not use the already created component with the multi position in large mode though ? (Which is maybe obvious but not enough). Just to get the control on play and stop ?
@samycolombano98325 жыл бұрын
Also with registering the gameobject ? I never had to do that. It is crucial?
@CujoSound5 жыл бұрын
You could do that, but then you also lose control of anything else happening in the script.
@fnm19004 жыл бұрын
Hi, Bjorn. I'm trying to implement this stuff in Unity's 3D Game Kit project. I checked everything 3 times and checked out the comments here too but I cannot hear any sound + I'm keep getting this error below. If you have time to look over what might be the problem, I'd be very appreciated. Thank you for awesome tutorial videos by the way. Big fan from Korea! [Error Message on Unity Console] NullReferenceException: Object reference not set to an instance of an object AkGameObjListenerList.Init (AkGameObj akGameObj) (at Assets/Wwise/Deployment/Components/AkGameObjListenerList.cs:47) AkGameObj.Awake () (at Assets/Wwise/Deployment/Components/AkGameObj.cs:104)
@CujoSound4 жыл бұрын
Ahoy. That error looks really strange and I've never seen it before. I take it that you have just added the AKlistener object somewhere and not tried to create your own listener through code? Does this happen if you start a new project too ?
@fnm19004 жыл бұрын
@@CujoSound Thank you for getting back to me. I didn't care about the AKlistener at first, bc it seems like Wwise has already automatically created one somewhere. But I got an error message soon that I don't have a Listener. I started to make AKListener here and there until I googled and realized Unity usually do that when we're integrating with Wwise so we don't have to care about that. And I realized that I misspelled the Event name and put the sphere collider in the wrong game object. So I made everything right, and double checked everything, finally played the game again, and again. But I kept getting that NullReferenceException error message. I don't know if it does the same on the other project because this is the one and only project that I've been working on. I'll try it on another project and get back. Thank you!
@CujoSound4 жыл бұрын
@@fnm1900 hmm. that is strange. It's difficult to say when all we see is the error message, but the message is about the AkListener, so I assume it's because that is misplaced somewhere. I understand you don't normally have to put it somewhere, but it's really important that you place the listener where you need it, else I assume Wwise will just generate a listener whereever or on the camera - but if you don't want it on the camera, then that is obviously a problem.
@fnm19004 жыл бұрын
@@CujoSound Yeah I understand that it's really hard to get much info out of a single error message. Thank you again for helping me out with not so much clues. AKAudioListener is currently located at 'CameraRig>CameraBrain' object where everything seems pretty much the same as it is in your video. I tried to move AKAudioListener from CameraBrain to Player by simply 'deleting AKAudioListener in CameraBrain and creating new one in Player' but the result was the same. I'm getting the same error message. I honestly don't know exactly where I want to put AKAudioListener but I suppose it should be located in CameraBrain because Audio Listener script was there before this Unity project is integrated with Wwise. I'll try the same in new project (3D Game Kit Lite) and see if it brings the same outcome next morning.
@fnm19004 жыл бұрын
@@CujoSound I just did the same thing in a new project (3D Game Kit Lite version). I still cannot hear the sound but I didn't get that NullReferenceException this time. All I got is this error message below twice: "There are no audio listeners in the scene. Please ensure there is always one audio listener in the scene" AkAudioListener script is in CameraRig > CameraBrain.
@EminYILDIRIM3 жыл бұрын
how can i do this in fmod? Can anyone help with this?
@CujoSound3 жыл бұрын
I can try to make a video for you about it.
@EminYILDIRIM3 жыл бұрын
@@CujoSound you are the LEGEND, thank you so much Bjørn
@EminYILDIRIM3 жыл бұрын
@@CujoSound do you have time for the video Bjorn I guess you're busy, but can you make a very short video? :( I'm sorry for taking up your time