|
Post by wokamoka on Jun 10, 2018 16:29:10 GMT
Hi,
We at Disruptive Learning Solutions (https://disruptive-learning-solutions.com) are currently integrating Master Audio in the new version of a game. We experience issues about Audio sources.
We set-up sound for props (ex : lasers, power grid) using an AmbientSound component. It appears that the associated AudioSource that is added to MasterAudio hierarchy is always instantiated at position 0, 0, 0. The sound is not loaded in the GroupMixer. In the _Followers sub object of MasterAudio hierarchy, the associated SphereCollider is set-up at correct position.
Following this setup, there is logically no sound for props.
Could you help us to figure out why it is not working?
Thanks for your help.
|
|
|
Post by DarkTonic Dev on Jun 10, 2018 16:45:45 GMT
All Audio Sources are always at 0,0,0 initially. The "Follower" objects follow the caller or actors and know when things are in audible range according to the distance from Audio Listener and Max Distance setting of the Audio Source.
The last release last week fixed the bug that the Audio Source does not move to the closest position of the collider, did you download the last update? If you weren't using that option, the Audio Source will be in the position of the Actor when it starts playing. If you check the option "Follow Caller" then it will also move if the caller moves.
|
|
|
Post by wokamoka on Jan 6, 2019 20:35:47 GMT
Hi,
It has been a long time since I put aside audio in the game. Finally this subject is back.
I followed your former solution. And it helped.
I had to add a script to enable AmbientSound to ensure to trigger the creation of follower GameObject. Surely because of an order of loading objects. Anyway it solved another issue.
Unfortunately : - in the MasterAudioGroup, the audio group stays red, it is not played - if I manually activate the play of the audiogroup, it moves from red to green color, and percentage is progressing. But the sound is not heard when the player enters the trigger.
This project is a Unet implementation. I applied the same parameters in a single player test scene and sound is played correctly.
Could you please help me. I don't know what I missed.
Thank you.
|
|
|
Post by DarkTonic Dev on Jan 6, 2019 20:58:05 GMT
You are posting in the wrong forum, this is for Master Audio, not the multiplayer version. I don't know why you would need to add a script to enable Ambient Sound.
However, the Master Audio game object with the multiplayer stuff enabled will be disabled by default if you started the Scene without being connected to a multiplayer game. Maybe that's your problem.
You should show me what you mean by red and green (screen shots). Also, if you don't hear the audio but it's playing, that's usually because it's too far away to hear (change the Max Distance on your Audio Source template and re-apply it). If it doesn't play with Ambient Sounds and the follower exists, then you are not in audible range (Audio Listener game object distance to Ambient Sounds script game object is more than Max Distance), so it will not play. That's how it's supposed to work.
|
|