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.
[1123] Udon Objects with Udon Children initialize late despite execution order overrides
To reproduce: Create a behaviour with ExecutionOrder -100000 Create a child of it with another behaviour with no execution order overrides Create a behaviour with ExecutionOrder -100000 and NO child objects as a control Create a new separate behaviour with ExecutionOrder +100000 Add a log to Start() to keep track of it Expected result: Behaviours with -100000 to log first Behaviours with no override to log second Behaviours with +100000 to log third What actually happens: Behaviours with -100000 and NO children log first Behaviours with no override log second Behaviours with +100000 log third Behaviours with -100000 WITH children log fourth Repro world: https://vrchat.com/home/world/wrld_f43e6a53-97c2-4a6b-88af-60612f4b3cce This also creates another large issue If you also try to disable those -100000 objects (with Default children) via the +100000 Start() method - the -100000 behaviour will enter a broken state where it will never initialize or receive any events no matter what. You can toggle them on and off after - no methods will ever fire I have created a test world that illustrates the above: https://vrchat.com/home/world/wrld_06ab5f32-ffbe-44dd-9930-b3b28074fcfd Checking the logs when loading in - you'll see a bunch of objects logging OnEnable (the ones that report withChild False ), and a bunch of Default objects which are children of other -100000 objects. Then they will all get disabled by the +100000 behaviour. Clicking the sphere enables those -100000 parents, but they never log either Start() or OnEnable
2
·

tracked

Checking a system-defined enum with equality operators fails
Checking the equality/inequality of a system-defined enum with equality/inequality operators ( == / != ) will fail. As a result, this example codes in the document don't work as expected: https://creators.vrchat.com/platforms/android/android-best-practices/#2-detect-mobile-players-in-your-world-automatically public override void OnInputMethodChanged(VRCInputMethod inputMethod) { if (inputMethod == VRCInputMethod.Touch) { // Run code for touch input } else { // Run code for non-touch input } } (The UdonGraph version (attached image) also has an identical issue.) Workaround Cast to underlying values and compare them. if ((int)inputMethod == (int)VRCInputMethod.Touch) Analysis UdonSharp compiles the expression inputMethod == VRCInputMethod.Touch into EXTERN, "SystemObject.__Equals__SystemObject__SystemBoolean" Although Object.Equals(Object) is overridden by Enum.Equals(Object) , which the inputMethod may have, with comparing underlying value, this EXTERN seems to call the Object.Equals directly (maybe via reflection API), and it returns the unexpected result (by only comparing the referencing instances). The EXTERN, "SystemObject.__Equals__ comes from here https://github.com/vrchat-community/UdonSharp/blob/22307065bd408dfd163fe46b0b8b701a4efcbc00/Packages/com.vrchat.UdonSharp/Editor/Compiler/Binder/BoundNodes/BoundInvocationExpression.cs#L420 And replacing the System_Object of this line with System_Enum doesn't work because the Enum.Equals is not exposed. Suggestions Temporary, rewrite the example codes using cast operator Expose System.Enum.Equals And replace the EXTERN with System.Enum.Equals
2
Load More