UdonSharp icon indicating copy to clipboard operation
UdonSharp copied to clipboard

Method is not exposed to Udon: 'Audiomixer.SetFloat(VarName,slidervalue)'

Open blackcat1101 opened this issue 1 year ago • 3 comments

Describe the bug in detail: Audiomixer.SetFloat isnt working at all, it keeps saying Assets/map_UdonProgramSources/EQvalueset.cs(12,8): Method is not exposed to Udon: 'Audiomixer.SetFloat(VarName,slidervalue)'

Provide steps/code to reproduce the bug: have this code on a slider

using UdonSharp; using UnityEngine; using VRC.SDKBase; using VRC.Udon; using UnityEngine.Audio; public class EQvalueset : UdonSharpBehaviour { [SerializeField] private AudioMixer Audiomixer; [SerializeField] private string VarName; private void update(float slidervalue ) { Audiomixer.SetFloat(VarName,slidervalue); } }

Expected behavior: To set the audio mixers Eq gain to what ever the slider is.

Additional Information: i dont know if im just being stupid or if this hasnt been implomentded yet, but i cant even find the audio mixer value on udon graph.

blackcat1101 avatar Aug 04 '23 16:08 blackcat1101

You can check VRC SDK -> UdonSharp -> Class Exposure Tree to check whether something is exposed. I don't believe these methods are exposed by VRChat.

Actually, come to think of it, I don't even think the AudioMixer component is allowed on upload

jellejurre avatar Aug 04 '23 16:08 jellejurre

ill check now if they allow audio mixers, i mean, im useing one right now but i dont see anything going wrong with it or even them saying anything about it, i dont see why they wouldnt be allowed for worlds.

blackcat1101 avatar Aug 04 '23 16:08 blackcat1101

so i took a look and yea they arent exposed, we can have them in the world by default, it dosent cause an issue, but why arent we allowed to use them in scripting, this makes no sence.

blackcat1101 avatar Aug 04 '23 17:08 blackcat1101