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.
Add direct uGUI value passing support to Udon
I would like to request support for passing values directly from uGUI to Udon, by providing public fields or properties in Udon for types commonly used by standard uGUI events. ## Background Currently, passing values from uGUI into Udon is not always straightforward. If the UI is static and predefined, this can be handled by assigning references from Udon to specific uGUI elements in advance. However, problems arise when UI elements need to be created dynamically. In my case, when dealing with such dynamic UI, I end up using workarounds such as: keeping references from uGUI to Udon, which still requires locating the relevant UI element from the Udon side identifying the calling object indirectly via MeshRenderer.probeAnchor (since Transform can be assigned from uGUI events) These approaches are technically possible, but they do not lead to a natural or scalable implementation. They often require indirect patterns or additional setup, especially when working with dynamically instantiated UI. Another possible approach is to attach a separate Udon behaviour to each UI element. However, using Udon components only to pass UI values introduces unnecessary overhead and does not scale well. ## Proposal I propose adding public fields or properties in Udon for types supported by standard uGUI events, such as: string (Input Field) bool (Toggle, ) int (Dropdown) float (Slider, Scrollbar) Vector2 (Scroll View) UnityEngine.Object This would allow a uGUI event to: write a value directly into a Udon behaviour call a CustomEvent let Udon read the value from the assigned input field or property ## Why UnityEngine.Object should be included I would also like UnityEngine.Object to be supported. This would allow a uGUI element to pass a reference to itself, making it much easier for Udon to identify the source of the event. Compared to current indirect methods, this provides a more direct and understandable way to determine which UI element triggered the interaction. ## Example of the intended flow A typical flow would look like this: A uGUI event assigns a value to a Udon behaviour The same event calls SendCustomEvent The Udon behaviour reads the value and handles it Conceptually: using UdonSharp; using UnityEngine; public class UiReceiver : UdonSharpBehaviour { // These are assumed to be provided by Udon itself // public string InputString { get; set; } // public UnityEngine.Object InputObject { get; set; } public void _OnUiTriggered() { Debug.Log(InputString); if (InputObject != null) { Debug.Log(InputObject.name); } } }
0
·
Feature Requests
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; } } } }
2
·
Bug Reports
·
tracked
Load More