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.
Synced arrays have unexpectedly large overhead (in bytes)
Synced arrays have about 40 bytes of overhead which I cannot explain how those bytes could be used internally. For a long time I thought synced objects had 12 bytes of base overhead, 4 bytes of overhead per synced variable and then the actual variable data. That would explain the 20 bytes for a single synced int... though the single synced byte with 14 is new to me. Either way, in the case of a script with a single synced byte array, let's assume the 12 + 4 bytes of overhead are correct (base + per variable), so that's 16. Then let's assume it stores the length of the array in an int, even though that could be done in a space optimized way, but let's just go with 4. That's 20 bytes of total expected overhead for a script with a single synced byte array. However as we can see in the demo log output at the end, it's 64 byteCount when syncing an empty byte array. Ok but where is the issue? I've created a lockstep networking implementation on top of VRChat's networking. It requires "heartbeats" to be sent by a tick sync script, that's how clients know they're allowed to advance to the next tick(s). This script sends both the current tick as well as all associated input action ids. Must be in the same script to avoid race conditions. That's a variable amount of data, so it must use an array (I ended up just using a single byte array for all synced data). Even if no input actions are sent and it just syncs the current tick, that's 68 bytes per sync, which at a tickrate of 10 equates to 680 bytes per second, which is over 5% of the 11kb global manually synced limit. I wanted a tickrate of 20, but then we're at 10% while the system is effectively idle. Not to mention that to my knowledge avatar syncing also counts to this 11kb limit. Ultimately I feel bad for wasting both server and user bandwidth... but it is outside of my control. The actual payload is just 2 to 3 bytes per sync (because ticks (uint) are serialized in a space optimized way), so 97% to 95.5% is overhead. Reducing the overhead by 66% (getting rid of those 40 unknown bytes) would be huge. I think there's a high chance for this to be unintended behavior, so the bug report category fits best. Demo synced array script: https://gist.github.com/JanSharp/4e59bd352d97b4001a82b5b868f13fdf#file-syncedarraydemo-cs Demo scene and all scripts: https://gist.github.com/JanSharp/4e59bd352d97b4001a82b5b868f13fdf Demo world: https://vrchat.com/home/world/wrld_6bf7ead7-fc62-412d-bbac-f0ee310f0fad Potential demo log output: (<dlt> stands for debug log tracker, so not actually relevant) <dlt> single synced byte variable - result.success: True, result.byteCount: 14 <dlt> single synced int variable - result.success: True, result.byteCount: 20 <dlt> result.success: True, result.byteCount: 64, data.Length: 0 <dlt> result.success: True, result.byteCount: 68, data.Length: 1 <dlt> result.success: True, result.byteCount: 68, data.Length: 2 <dlt> result.success: True, result.byteCount: 68, data.Length: 3 <dlt> result.success: True, result.byteCount: 68, data.Length: 4 <dlt> result.success: True, result.byteCount: 72, data.Length: 5 <dlt> result.success: True, result.byteCount: 72, data.Length: 6 <dlt> result.success: True, result.byteCount: 72, data.Length: 7 <dlt> result.success: True, result.byteCount: 72, data.Length: 8 <dlt> result.success: True, result.byteCount: 76, data.Length: 9 <dlt> result.success: True, result.byteCount: 76, data.Length: 10
2
·
Bug Reports
Using Odin Inspector with VRC SDK (Worlds) within Unity, prevents script changes during PlayMode
(I think it is both a bug report and a feature request, but it is more of a bug report due to it not working as expected) Issue: - I cant seem to change the variable's values in realtime in unity playmode while also using the plugin called Odin Inspector. Within the inspector window (using the plugin) there seems to be an issue when variable values get attempted to change upon click, dragging, or setting, then nearly instantly reset to the value that the variables were in before entering playmode. Goals: - The idea was to use Odin Inspector to make the scripts look nicer for my team so they dont have to think so hard when changing the values in a script. - Also, to be able to quickly iterate and test using playmode using a cleaner look for the scripts. I have tried: - Changed the inspector to debug, then back to normal, This breaks drawing the custom inspector and it works, but defeats the purpose of having odin... - Going through the preferences (there is "update editor" and checkboxes for each script type). (I suspect that it has to do with odin/udon drawing constantly and preventing the value to update?) - I contacted Odin Support (via Discord) and they say it has to do with either the assemblies vrc is using, or it is competing for drawing on the same inspector, hence the variables are not serialized (or sending and updating the values). Other notes: - I have noticed that when messing with multiple inspectors in unity, having one with and without odin's custom inspector, the one without odin works as expected. - Also for some reason the script in question tends to sometimes get "multi-object editing not supported" (but unsure why vrc's sdk is throwing that when I have only that gameobject selected. Maybe a hidden proxy is triggering it?) So my questions are: - Why is playmode making it not work, but setting the values outside of playmode make it work only for the new set values (repeating the issue again when playmode is turned on once more)? - Is VRChat going to support (natively or not) custom editors/plugins that can help integrate things like Odin Inspector? - What can be done that could allow for plugins like this to work if it does not get supported? Included is an image of what I am trying to do (testing a light attactched to a GameObject)
0
·
Bug Reports
Load More