HolographicWings / LethalSDK-Unity-Project

Unity Project using Lethal Company SDK
MIT License
43 stars 4 forks source link

Noise Maker Audio is not working in Multiplayer #60

Open Arebs opened 5 months ago

Arebs commented 5 months ago

Hey there, I have a scrap with the "Noisemaker" Type. It has the following Settings under the Noisemaker settings: image If I use the scrap while playing solo, it works fine. If used with other players, only the player using the scrap is hearing the sound. The other players are not hearing it.

I tried to create an audio source as a prefab and assigned it to both the "Noise Audio" and "Noise Audio far" properties. If I have these assigned, the sound is not working for the user either with the Message "Can not play a disabled audio source" in the log. (I don't have much Unity experience, so I might made a error here using a prefab for the Audio source?)

Any ideas how to fix this?

HolographicWings commented 5 months ago

You must refer an audio source from the same object, not an external, but i haven't tested the network for the new scraps types

dbeesonmann commented 5 months ago

Been having the same issue. I tried about all combinations of audiosources on different prefabs, adding sounds to the manifest and referencing them in the scrap object, setting it as a network prefab... Not sure what to try next. @HolographicWings, have you had any luck getting noise makers to work over network? The sounds work locally just fine.

I added an audio source to my scrap prefab and an AudioOutputInterface like you mentioned in a previous thread, but I get getting errors in the log that delete out the "illegal audioOutputInterface"

I just want to annoy my friends with a trombone. also thanks for all the hard work with the API for the most part its been super great!

HolographicWings commented 5 months ago

Been having the same issue. I tried about all combinations of audiosources on different prefabs, adding sounds to the manifest and referencing them in the scrap object, setting it as a network prefab... Not sure what to try next. @HolographicWings, have you had any luck getting noise makers to work over network? The sounds work locally just fine.

I added an audio source to my scrap prefab and an AudioOutputInterface like you mentioned in a previous thread, but I get getting errors in the log that delete out the "illegal audioOutputInterface"

I just want to annoy my friends with a trombone. also thanks for all the hard work with the API for the most part its been super great!

I forgot to whitelist the audio output interface, i will do it today But I have no idea about the networking Can I see the network object of your scrap?

dbeesonmann commented 5 months ago

I tried assigning my scrap to be a network prefab in the asset bank file hoping that would fix the noisemaker issue, but I eventually figured it was meant for something else. Maybe you could shed some light on what exactly the network prefabs are suppose to be used for?

So if I have this right. I have a noismaker prefab and assign an Audio Source Component, with my sound in the audio clip field, and nothing in the output field. Then I also have an AudioOutputInterface component with the audio source referenced. Then in my scrap settings file I reference that same AudioSource from the prefab

image image

Do I still need to reference the sound from the assetbank file? Or is that specifically for client side sounds? image

Thanks again!

HolographicWings commented 5 months ago

you don't need to put it in the assetbank, it's automatically done with scraps oh.. don't put the clip in the audio source put them in the Noise SFX array

dbeesonmann commented 5 months ago

Sorry, where is the SFW array located? This is all feeling pretty nebulous to me!

HolographicWings commented 5 months ago

Sorry, where is the SFW array located? This is all feeling pretty nebulous to me!

in the scrap asset, theres something called Noise SFX