World/Udon Bugs & Feature Requests

Post about current World or Udon bugs feature requests. One item per post!
Non-constructive and off-topic posts will be moved or deleted.
Using [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] just continues using last set value on an object with no other scripts
When adding [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] to an udon# class, It will just continue using the last setting. For example if you add [UdonBehaviourSyncMode(BehaviourSyncMode.Continuous)] and then compile, then change it to [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] and compile again, you get the expected behavior, and calling SendCustomNetworkEvent() works. If you then change it to [UdonBehaviourSyncMode(BehaviourSyncMode.None)] and compile, then change it to [UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)] and compile again It will continue to behave exactly as if it's still set to None. SendCustomNetworkEvent() does not work. This is on an object that doesn't have any other scripts on it. I haven't tested the case with other scripts. You can look at the debug inspector to confirm that this is what is happening. From the documentation: "NoVariableSync: Enforces that there are no synced variables on the behaviour, hides the sync mode selection dropdown, and allows you to use the behaviours on GameObjects that use either Manual or Continuous sync." It seems like the case where a script using NoVariableSync being used on an object that doesn't have another script on it may have been overlooked. Since I'm updating a script in a prefab I'm releasing from None to NoVariableSync because I want to use network events now, it's not going to work for anyone updating to the new version. I am forced to set it to Continuous. Does anyone know if it makes any difference to bandwidth usage?
1
·

tracked

Issue on implementing custom DSP algorithms with OnAudioFilterRead
I have encountered a problem related to Unity's DSP chain and Udon. I am planning to create an audio focused world, where I need to implement a custom DSP algorithm on audio that can respond to player behavior/controls in real-time. In the native Unity Mono framework, I can insert custom effects into the audio DSP chain by implementing the OnAudioFilterRead method in MonoBehaviour (see https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnAudioFilterRead.html ). In the UdonSharp documentation, I found that there is a method stub for OnAudioFilterRead in Unity events (see https://udonsharp.docs.vrchat.com/events/ ), so I should be able to implement it. However, it does not work in my Unity setup. I also saw a post on Canny mentioning that a component called OnAudioFilterReadProxy should be automatically added to the object if OnAudioFilterRead is implemented (See: https://vrchat.canny.io/udon/p/order-of-onaudiofilterreadproxy ), but this is not happening on my end. Any idea what could be going wrong with my script or configuration? Or it is a bug? My test code is like the following: using UdonSharp; using UnityEngine; using VRC.SDKBase; using VRC.Udon; public class SimpleSineGenerator : UdonSharpBehaviour { [SerializeField, Range(0, 1)] private float amplitude = 0.5f; [SerializeField] private float frequency = 261.62f; private double phase = 0; private double sampleRate = 48000; public void Update() { // verify that the script is running transform.Rotate(Vector3.up, 90f * Time.deltaTime); } public void OnAudioFilterRead(float[] data, int channels) { // DSP code double phaseIncrement = 2 * Mathf.PI * frequency / sampleRate; for (int i = 0; i < data.Length; i += channels) { phase += phaseIncrement; if (phase > 2 * Mathf.PI) { phase -= 2 * Mathf.PI; } float value = amplitude * Mathf.Sin((float)phase); for (int j = 0; j < channels; j++) { data[i + j] = value; } } } }
1
·

tracked

Load More