SDK Bug & Feature Requests

Please check out the following rules and use the provided template when posting a bug report! Off-topic posts will be deleted.http://bit.ly/vrchat-bug-reports
[3.10.2,3.10.3] VRCSceneTemplateInitializer does not create sample scene if UDON preprocessor symbol is defined at first launch since VRCSDK 3.10.2.
VRCSceneTemplateInitializer does not create the default sample scene when the UDON preprocessor symbol is already defined on the first launch. Steps to reproduce Prepare a VRChat Worlds template with the UDON preprocessor symbol already defined. The original report used a project template generated by ALCOM 1.1.5 or earlier. (We added a workaround in 1.1.6.) However, the issue can also be reproduced by modifying a VCC template to include the UDON preprocessor symbol in ProjectSettings.asset . For reference, ALCOM's Worlds template included the UDON preprocessor symbol to reduce the initial Unity launch time by avoiding recompilation of most assemblies. Launch Unity. VRCSceneTemplateInitializer should create the default scene, but it does not. Cause of the bug This bug is triggered by the combination of the following conditions: UdonSharpDataLocator does not exist in the project. This causes Assets/UdonSharp/UtilityScripts to be generated during the first assembly load. The UDON preprocessor symbol is already defined before the first compilation. This causes [InitializeOnLoad] in VRCSceneTemplateInitializer to run during the first assembly load. The sequence of events is as follows: Unity compiles scripts normally. Unity calls the static constructor of VRCSceneTemplateInitializer because of [InitializeOnLoad] . VRCSceneTemplateInitializer checks SessionState.GetBool(HasRunStateKey, false) , which is false , so it sets HasRunStateKey to true and registers an EditorApplication.delayCall to generate VRCDefaultWorldScene . Unity calls some [InitializeOnLoad] methods from UdonSharp, and UdonSharp generates Assets/UdonSharp/UtilityScripts . Unity recompiles Assembly-CSharp and reloads the domain. Note that the registered delayCall is never executed before this reload. Unity calls the static constructor of VRCSceneTemplateInitializer again because of [InitializeOnLoad] . This time, SessionState.GetBool(HasRunStateKey, false) returns true , so nothing happens. As a result, the logic that generates VRCDefaultWorldScene is never executed. (The order of steps 2 and 3 may differ, but the result is the same.) For comparison, the following sequence does not cause the bug when the UDON symbol is not initially defined: Unity compiles scripts normally, but the VRC.SDK3.Editor assembly containing VRCSceneTemplateInitializer is not compiled because of "defineConstraints": ["UDON"] . Unity calls some [InitializeOnLoad] methods from UdonSharp, and UdonSharp generates Assets/UdonSharp/UtilityScripts . EnvConfig.cs checks for VRC.Udon.UdonBehaviour and adds the UDON preprocessor symbol. Unity recompiles all assemblies and reloads the domain. Unity calls the static constructor of VRCSceneTemplateInitializer because of [InitializeOnLoad] . SessionState.GetBool(HasRunStateKey, false) returns false , so it sets HasRunStateKey to true and registers an EditorApplication.delayCall that generates VRCDefaultWorldScene . Unity executes the EditorApplication.delayCall , and VRCDefaultWorldScene is generated correctly. Suggested fix The issue is that HasRunStateKey is set to true before the EditorApplication.delayCall is actually executed. I believe moving the HasRunStateKey assignment into the EditorApplication.delayCall lambda would fix the issue.
12
·
Bug Report
·
tracked
[BUG] [SAFETY] Avatar Stations On By Default
Issue A bug with the current SDK requires the GameObject which a VRC_Station is attached to, to be enabled on upload. As a result, stations are on by default if safety settings block user animations. This is BAD. Stations may be added by creators for special purposes, such as carrying other players, or animation-tied amusement. Having these on by default can create experiences where a player with stations receives UNWANTED interactions if animations are disabled. This is especially true for Quest/Mobile/Android, where animations are more likely to be disabled by default. This therefore poses a safety risk that is not mitigable by avatar creators. Potential Resolutions Add a "Disabled by Default" dropdown to the script with the options "Never"; "Always", which would disable the GameObject the VRC_Station is attached to on enable; and "Collider Only", which would disable only the provided box collider itself on enable. This would account of different creator preferences. — Whilst VRChat officially recommends disabling the collider only, the behavior of disabling the GameObject itself may be highly desirable in some case, and some popular station add-ons use this behavior. Giving developers the ability to choose between implementations allows for greater flexibility, and prevents breaking existing animations. Allow uploading with script disabled. — If the script can be disabled on upload, it won't matter anymore, as the station will be disabled when the avatar loads, making it opt-in via animation, not opt-out.
3
·
Bug Report
·
tracked
UdonSharp compiler doesn't export SDK proxied event methods unless they're referenced externally, breaking event delivery (e.g. `OnAudioFilterRead`)
SDK Version: 3.10.3 When a UdonSharpBehaviour contains an SDK-proxied event method (such as public void OnAudioFilterRead ) that isn't referenced externally elsewhere in the program, the UdonSharp compiler fails to export the symbol under the expected proxied event name. The entry point ends up exported as something like __0_OnAudioFilterRead (the internal/mangled name) instead of _onAudioFilterRead . This causes the entry-point check inside UdonBehaviour to fail, so the event proxy is never registered and the user's method silently never fires. Reference code path on the SDK side: if (_program.EntryPoints.HasExportedSymbol("_onAudioFilterRead")) { RegisterEventProxy<OnAudioFilterReadProxy>(); } Because HasExportedSymbol("_onAudioFilterRead") returns false, RegisterEventProxy<OnAudioFilterReadProxy>() is never called and the proxied event is never delivered. Steps to reproduce: Create a UdonSharpBehaviour with public void OnAudioFilterRead(float[] data, int channels) . Don't reference the method from any other script, UI event, or SendCustomEvent call. Enter Play mode with an audio source that should drive the filter. Observe that OnAudioFilterRead is never invoked. Inspect the compiled program's exported symbols — the entry point is __0_OnAudioFilterRead instead of _onAudioFilterRead . Note: OnAudioFilterRead is also not available in udongraph
1
·
Bug Report
·
tracked
Upgrade Harmony to 2.4
The Harmony package, used by Udon Sharp, and a handful of third-party community plugins for runtime patching in the editor, has been updated to officially support ARM64 on all platforms (Windows, Linux, and yes, Mac). This will correct any in-editor issues when running the Unity Editor on these platforms. Whilst VRChat itself may only support PC & Android, the Unity Editor is a cross-platform utility, and there are a variety of folks with ARM-equipped machines who use such hardware for primary development, and therefor experience issues with the editor without patching. With the advent of full iOS support on the horizon, this may further increase the # of Mac-based content creators. Please update the provided package. Release notes for version where ARM64 support was added Addendum An experimental VPM package can be found at MisutaaAsriel/VRCHarmony which installs a packaged release of Harmony 2.4.1. Unity appears to, in all testing, prefer the package's copy of Harmony over the version included by the VRC Base SDK. This package may also be installed using the following VPM repository: Dreemurrs-Repository VRChat may use the DLL provided from this repository if need be, or take over the package if they so wish. — It is currently built off of the Release target of Harmony, at the solution level, with .NET Framework 4.5.2 using GitHub Actions Note Building Lib.Harmony against the DebugFat target at the project level, or building it for Release against net452 at the solution level creates a successful drop in replacement. The release builds when built at the .NET project level or downloaded from the main Harmony repository currently output a mangled DLL that Unity Burst is incompatible with. A bug report is open on this here: pardeike/Harmony/issues/728 For further reference, the original copy of Harmony is built against .NET 4.5.0, which is no longer a valid target. 4.5.2 was chosen as its nearest replacement. Edited @ EPOCH 1757603286
2
·
Bug Report
·
tracked
UV-tile discard, Potential SDK issue
I'm going to copy the post I made in Poyiomis discord because I saw another person having the same issue I'm having with a completly different shader. This is making me question if this is an SDK issue maybe? Info - Latest Poiyomi Pro release 9.3.49, Unity 2023.3.22f1, SDK 3.8.2 When I upload to VRC or emulate in unity the discard checkboxes instantly defaults to OFF. It only happens when I have them in an animation clip (If I completely remove the FX and don't animate the properties the values stay). It also ONLY happens on 1 of my materials on 1 of my meshes. When the discard animation plays, it discards correctly on the keyframes but as soon as the animation is done, it defaults back to OFF. The animations that controls the discard checkboxes also contains other keyframes for discards on other meshes and all of those work fine. It's only this specific material on this mesh. What I've tried to fix it: I've changed the location of the UV tiles in blender (I moved them from row 0 to row 1) I've re-made the animations and layers in the FX (multiple times) I've 100% made sure that they don't get overwritten by any other animation I've re-made the material 2-3 times I've tried Write defaults on/off I let Chatgpt check my FX controller for any state machines being referenced/pointed to more than once (duplicate layers issue) I've downgraded the SDK to 3.8.1, 3.8.0, 3.7.6 - issue persists Tried with renamed discard parameters (RA) and without (A) I've looked through the locked in shader code and couldn't find anything obvious relating to it being a shader issue. Downgraded to 9.10 (pro) -> problems was COMPLETLY GONE. This lead me to think it is shader related but seeing as I saw someone have the same issue on another shader, I'm not sure anymore. The fact that it works on everything except 1 mesh also makes me more lenient towards this actually being an SDK issue. Especially with the other animated property issues that I've seen in the latest SDK. UPDATE: I just found a fix for this after days of slamming my head against a wall. I had 2 materials on this mesh. 1 material for 1 part of the mesh and another for another part of the mesh. The part I had issues with was called "bodysuit", the other part "hair". Bodysuit was in material slot 1 and hair in material slot 0. I swapped them in blender and re-exported. Now I have Bodysuit in material slot 0 and hair in slot 1. Now my discards work without any issue at all???? I have no idea if this is a unity bug, VRC-SDK bug, poyiomi bug or whatever it is but this seemed to fix it. Luckily I don't discard anything on hair on this particular mesh, cause I'm not sure if that discard works now.
1
·
Bug Report
·
tracked
Load More