#udon-general
59 messages ยท Page 41 of 1
I made a button for post processing but it doesnt work its the same code as the mirror button i made but the mirror button works fine why is that
post processing is set up correctly too bc if i enable the cube that controls it manually in unity it works
@prisma abyss i always suggest 0.18.6
@prisma abyss ive not seen the latest sdk, but if you need an older version that ive been using, i can send
i have many sdks stored, let me know which sdk is good
@haughty depot define "cube that controls it manually in unity"
i put the post processing volume on a cube
@prisma abyss 11.16.12.43 has been kind to me
ok lemme see
if i check the box to enable object the bloom works
@haughty depot thats not right
wdym
a mesh filter should not have a pp component
priority also needs to be 1
also it cant have over abundents of components unless youre seperating layers (its weird but in game, itll treat it as another layer)
correct\
must i delete VRCSDK map for rollback?
@prisma abyss define "map" cus that sounds dangerous
directory basically ๐
@haughty depot just remake the whole pp component in a game object
@prisma abyss oh yea correct
11.30 seems also work
Im new to udon and I think its a bit hard to understand how it works, how would I make fog density in the Lighting tab controllable through code? And is there a way to see the players distance away from a certain point in the map? Is stuff like this managable to do in udon as a beginner?
@jagged crag im not even sure how to do so, but if i can remember, theres a graph node that can alter lighting settings, but i cannot remember. it may be written in a doc somewhere. sorry if this doesnt clear too much
hmm post processing doesnt seem to work in game at all?
ignoring the button why doesnt it work in game?
aah, no worries! Do you know how you would see the distance from the player to another point in the map?
@haughty depot does it work in unity? assuming so, cthe reference camera must be set, and the main ref cam needs to be indeterminated. correct?
@jagged crag define "see the distance from the player to another point in the map"
it works in unity
just not in game
@haughty depot can you prove that this is the ref cam?
uh.. sorry I dont really know what I should do, most of the nodes in the VRChat prefabs are basically hieroglyphs for me
how do i do that
wdy,
u mean like the trigger
i just double checked te camera is the triger
should i also set the camera layer to pp
@haughty depot open up the scene descriptor and find where it says "reference camera" and put the main camera there
as it needs that to know what filter to over lay in game
ok
@jagged crag what about udon sharp? i still wouldnt be able to help, but theres some more active smart people in the udonsharp community that would most likely know ways to help
okay, im sorry for being a bit dumb but... what is udon sharp?
@jagged crag its like C#, but for vrchat udon, you can find their discord and stuff, but if youve never heard of it, might be a bit hard for you
@jagged crag have youve watched any vowgan tutorials on udon graph?
aah, yeah im not entirely sure, I do (did) know a bit of C# but I kind of also want to try to code with the graph and not with text, so i dont really know which one i want to use
no I havent, would you reccomend me doing that=
yes, hes like the main tutorial man (imo) for udon learning
aha
you can join his discord and ask him questions
okay, thank you for the help!
Hmm, ok, playing around with some ClosestPoint nodes, but they seem to be crashing on run. Am I missing something obvious?
This code takes the player position and gets the distance between it and the cloest point on a collider, then when it's within 150m, it sets a volume slider from 0 to 100 as you get closer. (Yes, there is a reason why I'm doing it this way and not just using a native audiosource, unless someone can tell me how to make a box-shaped audio source)
Is it possible to have a system that works like Udon arms, but on a avatar? I have characters with wings and it would be really nice to be able to puppet them directly with IRL arms instead of awkwardly using a bunch of gesture animations for specific poses.
Constraints, though that's an avatar question
@bitter orbit i believe so with locamotion, but id double check 3.0 avatar
Testing different things, the only error that pops up when I run in Editor is:
An exception occurred during EXTERN to 'VRCSDKBaseVRCPlayerApi.__GetTrackingData__VRCSDKBaseVRCPlayerApiTrackingDataType__VRCSDKBaseVRCPlayerApiTrackingData'.
Parameter Addresses: 0x00000006, 0x00000007, 0x00000005
Object reference not set to an instance of an object
But I have to assume that's because there is no localplayer for it to reference in the editor, right?
Correct
So, I just finished installing the vrchat udon sdk. What do I do next?
@scarlet lake add world into scene, then add the vrcworld prefab, then open the control panel, log in, then build and publish
I mean for the udon part
so, I noticed two new folders and a new section at the top where file, edit and all that is called Cinemachine
@scarlet lake oh, never touched cinemachine. but its fairly basic coding and such
Ok
I'm just going to upload the vrchat udon example scene to see if I have everything working correctly
um ok, ig
How do i make it so that an avatar pedestal can only be used by me and my friend
have a script that can enable the pedestal (disabled by default), and it enables it locally if your name matches one form a whitelist
on script start, disable the object
If disabled people can still see the avatar but they just cant use it right
And all this can be done in udon graph right?
they shouldn't see it, and yes, though I myself use u#
start simple, look at some u# prefabs and see how they work
The only thing ive made is an audio visualizer in my udon world
takes some practice but its not that bad
Ok
It's still not possible to set the text of a textmeshpro in udon yet is it?
Nevermind, got it with a textasset
could someone tell me how to setup cards respawning to a location? like object sync.respawn? Can't seem to figure out how
it's a prefab of playing cards, can't seem to get it to work
If it's a synced object, the simplest way to do this is to iterate through them all in an array using a For node, setting the position of each one to 0, -1000, 0. Since they're now magically below VRChat's default respawn object height, VRChat will handle the actual respawning itself and you're home free ๐
hmm
is there a way to just select the parent object and do that?
it's 102 cards so just don't want to have to all of them selected
For the videoplayer how do i make it not owner only
Thats not trivial
?
In other words: Thats hard.
The easiest way
is to just make whoever enters a url the owner of the video player
so the prefab av pro version can i just drag and drop into world and it works?
but in that case it would be owner only
how would i do this
There is a node called Networking.SetOwner
eh ill just use the prefab version then but then only the instance owner can choose the video?
Yeah. There are other prefabs from other people that allow that
but all I know use UdonSharp
I have a gameObject with a VRC Pickup (Script) component on it that has Pickupable = True. I need to set it to false during runtime. When I call:
GAME_OBJECT.GetComponent<VRC_Pickup>().pickupable = false;
It breaks my Udon Script. Is there a way to turn off picking up the object?
is the userlist prefab something that is public for udon?
for desktop, is there any way to lock the mouse, like it does when you open your settings?
@hoary ocean like pressing tab?
Sortof
I mean, I want to be able to try to find some weird way of capturing the mouse
It allows mouse capturing when you have another menu open
I want to know if there is a way to emulate it
hold down the tab button
then thats all i can think of
cursor lockstates are blocked from udon. hmm
I'll figure it out. might have to opt for a physical menu, then use a raycast to draw a cursor on it
How to make an avatar stand that only i can use
or does that work if i leave it as private
Join the nazbol gang to find out
I used a menu + cursor as well.
Yea nah we good.
pretty sure leaving it as private is all ya need.
@haughty depot If your avatar is set to private than you're already the only one that can use it, but there's a few different ways you can go about it. If you're okay with the stand being in the world for everyone but only you being able to use it, than you're fine. If you want to hide it if the person doesn't have your username, than that's a different option.
For the second option, add this in Start() on the UdonBehaviour attached to the avatar stand.
if (Networking.LocalPlayer.displayName != "Player Name")
{ gameObject.SetActive(false); }
I'm assuming they're using graph, so likely it would be the Start node going into a Branch that checks String Equality between the custom name and the Networking.Localplayer node with a drag out to Get Displayname.
Man graphs are hard to verbalize.
Lmao this
Graphs are a visual tool. Using words is basically ineffective, or at least sub-optimal.
The issue comes when you have more that a direct line haha
Yea, kinda have to speak as to the implication that the person at least knows the basics of navigating the graph's UI. That's just a lesson on it's own otherwise.
have a question when you make a switch for a game object like a video screen to turn it off and on but instead of it being a local control ..how do you make it world controlled
you mean global? or like a time delay event?
global
if you have udonsharp, theres a premade global script you could use
so if i tur it on everyone sees it on
i just have the graph isnt udon sharp something you have to add
yea
im pretty sure the graph for global (since its a network thing) is offully huge and hard to make in graph imo
frankly i am not a programmer so anything i would make would be huge and buggy
so then how do i go about finding the udon sharp and the global script
yea, i suggest udonsharp for beginners or people that arent into coding, since it comes prepackaged with stuff sdk2 would automatically have on hand
lemme send you my copy of u#
the first one is good enough also if ur the real Vowgan ur button video really helped me out ty
Glad to help ๐
Is there a tin foil avatar in VRChat?
Is there a way to check if you're world creator and if so, give them an icon above their head?
is there a way to really optimize udon worlds with occlusion? I heard there was better ways
D:
How to prevent object blocking avatars but still with colliders for picking and standing on the floor?
would anyone know how to do like a touch slider or physical button?
@vague mantle #udon-showoff message
discord search > google
there's loads of stuff here
yeah, im brand new to udon, so not sure where to even start or what to do with that
paste what to what?
it means to add an udon behavior component to the object, click new program, copy the code example, and paste it into the udon graph window that comes up, I believe, but I didn't watch it
you might want to do the videos on the website first. They're quite old but they'll tell you at least how to use a node graph for an interface
I spent about a week grinding transform and I can do a lot of stuff now, it's worth just getting a handle on the basics
Is there any seamless portal asset on the unity store that is known to work with SDK3? I've given up on trying to find something for free, haha
Seemless Portals are one of the hardest things to do probably.
Yeah, I've been looking into it, thinking that maybe I could build one myself. Lol, nope. I found a VRC Prefab for one that supposedly worked with SDK2, but that's all
I made one before and it used a lot of rendering tricks and jank
Also teleporting didnt really work
VR makes it even more complicated
Hey isnt there a way to enable "legacy locamotion" or whatever in SDK3?
like with stutter step
anyone know what this means? "[<color=#FF00FF>UdonSharp</color>] Assets/Physical Interaction/Scripts/PlayerHeightDetector.cs(6,0): System.Exception: User type PlayerHeightDetector could not be found"
or what this means? "[<color=#FF00FF>UdonSharp</color>] Assets/Physical Interaction/Scripts/Buttons/PIButton.cs(6,0): System.Exception: User type PIButton could not be found"
We have a world that has been public since 2019, we uploaded a new version and the "last updated" date isnt changing on the world page, nor is it under recently updated
was the sdk updated?
as of today, yes
we moved the world from SDK2 to SDK3
and it was the newest SDK3 as of today
whats the console saying?
when, when we upload?
yes, or whenyou press play if the error console gets cleared by that
theres a certain error that usually makes it so it looks like it uploaded, but doesnt acc update the existing world, you miht be having that issue
interesting, mustve been updated when there was a hiccup, or its just a problem from transitioning from sdk2 to 3
its a full rebuild of the map with the same blueprint ID.
we're trying to upload again maybe it'll work this time ยฏ_(ใ)_/ยฏ
hopefully
nope, last updated 2019
any errors this?
nope
hmmm. my only assumption i could think of is that if you change the existing world that was first uploaded as sdk2, and then reupload it under the same name in sdk3, it wont show that it was updated
its bizarre. literally updates the world though. Thats a bug if thats how it works
yea, bug time
@warm goblet Yeah if you search for PlayerApi > UseLegacyLocomotion there's a node for it
In the api the last update date is fine so it might be getting cached on the website and hasn't updated yet
Or actually huh
Yeah no that's weird
I can even edit the title of another world and that changes the update date immediately
but if I do that for this world it doesnt.
definitely a bug.
Yeah I see the new world upload you did but the last updated didn't change
How do i stop the player from raycast hitting ui? have text infront of a button but the ui keeps blocking it tried shutting everything off but the player still hits it
collides with the ui
I set the height of the text box to 0
Lemi try that
Anyone know how to set buttons to react globally? I have been looking everywhere for a tutorial or documentation on setting basic toggle buttons to global instead of local and can not find it... Please VRChat Udon community.. You are my only hope ๐ซ
@hardy fog โค๏ธ thanks it worked
You'll need to synchronize the boolean variable that's being toggled, and then use an Event.OnDeserialization node to continually update the state of whatever you're toggling off/on
@void ridge thanks! I'll see if I can get that working.
How can I get a texture2d from a texture? I cant find anything that works within udon/u#
i'm trying to work on a new world, but keep seeing this pop up. anyone know a fix?
Restart your unity project/install cinemachine from the package manager
First should be enough but sometimes not
@gaunt musk i am currently on that version
Wait sorry I just realized its different
@native estuary ill try
do you know what script Cinemachine is from? Is that something you added yourself?
no
Cinemachine is a default dependency for the sdk
Sometimes it doesn't get imported properly automatically requiring a restart/manual import
oh wow, you really know your stuff @native estuary
Restart worked?
Nice
does anyone know hoe to get the "Build & Test" button to work properly? All it does it launch VR Chat normally
You need to point the client path in the sdk settings to be directly to the VRChat.exe
I'm pretty sure that's what I have. But when it launches vrc it takes me to my "home" world instead of what I'm trying to test
Oh I misread your question
https://github.com/oneVR/VRWorldToolkit/releases
Import this and check VRWorld Toolkit > World Debugger from the top bar
If you aren't sure show a picture of it
Thanks so much! I'll try that toolkit out
this is the path to the .exe I'm using, fairly sure this is it since it launches
Yeah no that solution was to the problem I misread you asking ๐
Your problem is something else
oh okay, just making sure lol
@native estuary thank you thank you thank you thank you
turns out i messed up when I created the descriptor and it wasn't serving as a spawn point
I only found that out using the debugger
you're a legend
Yeah if you make it manually by default it won't have a spawn point
isn't there supposed to be one in a folder somewhere? I could only find it in the SDK2 not 3
Yeah the VRCWorld prefab should be there
probably just another case of me glossing over it too quickly tbh
but ty again! can't wait to finally get started on this project
No worries
Does anyone know how to set vrc_pickup pickupable true or false via U# script?
I used the following code and it doesn't work, the error is 'VRCSDK3ComponentsVRCPickup.__GetComponet__T'.
public GameObject item;
item.GetComponent<VRC_Pickup>().pickupable = true;
You cannot use the generic form of GetComponent on VRC components. Use (VRC_Pickup)GetComponent(typeof(VRC_Pickup))
@fiery yoke Then how do I set the pickupable attribute in VRC_Pickup?
Exactly like you did before, but use what I wrote instead of GetComponent<VRC_Pickup>()
**(VRC_Pickup)**GetComponent(typeof(VRC_Pickup)) you forgot something...
like this?
No. In front of the GetComponent
No thats a warning, or a hint
It works. But it tells you to do the other thing, which you cant use, because it doesnt work.
Yes you need to enclose it in extra brackets
(InOutBoundBox.(VRC_Pickup)GetComponent(typeof(VRC_Pickup))).pickupable = true;
or
VRC_Pickup pickup = InOutBoundBox.(VRC_Pickup)GetComponent(typeof(VRC_Pickup));
pickup.pickupable = true;
Hmm not sure whats going on there
Check through all the code to make sure nothing is incorrect. The slightest of typo can affect something on the whole other side of the program
The syntax is wrong as the error indicates, it's supposed to be VRC_Pickup pickup = (VRC_Pickup)InOutBoundBox.GetComponent(typeof(VRC_Pickup));
@serene moat That's right, thank you.
@fiery yoke Thank you also for the sample code!
Are there any chessboard prefabs for sdk3 ?
https://vrcprefabs.com/ seems to have a 4d chess prefab for SDK3.0
Is it possible to have a collider on pickable object that does not interact with avatar anyhow?
I need a pickable object with gravitation that does not glitch when you pick it up
Probably the issue is related to its size as you can easily put it under your feet
ah then you go flying off yeeet
Yep
afaik, and honestly i am not a expert on this topic, but i think pickups dont interact with your model, but if the pickup is part of a larger complex object other part of the object can interact with your model. so i think it depents on what level in the tree you put the pickup
It's on the root
Object's root
together with rigidbody and collider
Oh, I should try single big collider instead of multiple detailed colliders
Hi is there a way to write a file using udon?
no it's not
Are there any prefabs out there for touch controlled buttons? The kind that move when pressed? I assume it's just a collider that moves when collided with, but i thought I should ask.
ok so it's impossible to save any data in VRChat? I heard you cannot use any external database either.
there are a few keypads on https://vrcprefabs.com maybe you can reverse engineer how they work
Do you know which specifically Jarno? Or should I just search through them.
just try a few, i havent tried each and every keypad myzelf ๐
Okay I'll have a browse
I have a problem with my world it has a black screen for 1 min and then send me back to my home world?
try deleting it and install it again
U funny
why am i funny? tell me
are u on quest 2?
no pc
im making a world
thats confusing why ur screen turns black for a min
hm
oof
i hav no idea what u can do
np
sorre
np np
@pure canyon what console say, and is it flashy black or black=black
No when i try to upload it right and test the world it turns black and send me back home
any oversized reflection probes? what shaders present? you using a stable sdk?
1 nope 2 Poyomi 3 vrchat sdk 3 for worlds
check for duplicate pipeline managers
in your scene
https://github.com/oneVR/VRWorldToolkit/releases
You can also import this and check VRWorld Toolkit > World Debugger from the top bar for a quick glance on what might be going wrong ^^
OHHHH bet
Show a picture of it if you aren't sure
jup jup just trying something rn
Is there a 'get' function for getting the privacy mode of a world instance?
Mmm probably not I guess, since this request exists
https://feedback.vrchat.com/vrchat-udon-closed-alpha-feedback/p/request-instance-type-nodes
If (instance.type != WorldType.Public) unlockBackRoom(); ๐
Is a joke.
OK, hah, I figured, sorry.
Np
Yes, opening areas is one use case. I'd use it to open global controls like play/stop music and atmosphere.
๐ค
Don't want people in public instances to have that (because: trolling), but I think it's valuable to have global controls as often as possible.
Ayyyy globally controlled mirrors in non-public world.
||(My touch controls would be perfect for that)||
๐
Vaugely related, has dan given any kind of teaser/info about what the networking update might entail yet?
If no, any plans to?
i have an elevator thing that is just moving GameObject.position.y over time, is there a way i should be descending it to stop the player bouncing ?
The proper way is to store entering time and position and update position to calculated by time passed from entering
so i am not sure if its a bug or smth but whener i try to do a VRC node with udon i will not have some commands and i re imported SDK3 and didnt seem to fix it instead of having this
i got this , im kinda not familiar with udon so idk im just stupid and not able to see it or idk
The only way I've found to minimize (not remove) bouncing/shaking, is by having a volume attached to the elevator that on player entering, it sets the gravity to some higher amount.
The namespace prefixes were removed.
It's not perfect, but as far as I'm aware, there is absolutely no way to have a player be perfectly sync'd with a moving object, even stations have some jitter on moving objects
Things like 'SDKBaseVRC' was a namespace for the type. For the list, it appears to have been updated to not show that part of the type's name.
I played around with having the player be teleported every frame to their exact location on the elevator, and my god it only made it worse
There's a reason why 99.9% of elevators in VRC are just teleports, haha
interesting! ill play around with it and may just end up having a fake elevator without a window
You might be able to get away with setting player velocity to the same speed and direction as the elevator movement...
Havent tried myself, just an idea.
ohhh i see .. do i have to do it within udon sharp to fix it ?
No. It's an udon sdk thing that is hardcoded (afaik) that cant be changed.
๐ just vrchat things ๐
hmm , so thers no way of getting it to this project?
Getting the prefixes back you mean?
yeah
Not that I am aware of without downgrading to an older version.
Kinda just have to memorize how to find the different types that are available.
โจ i hate unity(:โจ
Well, it's an udon specific thing.
They did it so that people could see the actual types within the list.
Cause some of those prefixes were too long.
For example the video player prefixes.
Made it difficult to see which one was being selected.
w8 so you say they may still be able to work with but its just not in the right place ? bc the lighting and mirrors works just fine its the teleportation that doesnt seem to appear
Teleportation is under the PlayerAPI type shown in your pic.
PlayerAPI -> TeleportTo
idk if its easy for you to see but all it does it that it will just light up the "OK" button on top right with no respawns
oof well it doesnt show the menu for some reason .. basicly im typing teleport to and it doesnt sspawn
umm nevermind ... i dont know what was going on but now its spawned lel .. anywho thank you smm !
๐ค something to consider is that under the settings menu in the top right of the udon panel, you may have "Search on Selected Node" active. That does an implicit limitation of the search for other nodes that are only related to the current one that is focused/selected.
If you toggle that off, the search should be consistent no matter what.
Helo!, so I am trying to make my first vr chat world, should I use SDK3 with udon or SDK2 and learn how to make one of those worlds first?
Depends on your world's needs.
well SDK2 is kinda more simple to use in my opinion but in the end of the day is the same codes and thers lots of youtube tutorials on how to use both of them , i think this is kinda umm maybe personal decision with what you want to work with . i suggest maybe looking threw some tutorials to see what looks easier for you and easy to follow
Sdk3 is for worlds that need or want custom logic (like complex games or interactive gimmicks).
Sdk2 is more drag-n-drop with only being able to connect components through a limited set of events.
Sdk3 is still considered alpha and is under active development, so if you make an sdk3 world, expect to need updates regularly for the newest stuff. Sdk2 is more or less considered stable, but a lot less development effort being put into it (except things like security fixes or bug patches).
That being said, sdk3 (udon) has a very dedicated community for helping people adapt to the ecosystem since the udon docs are minimal at this point. Lot of cool things can be made with it and having cool new complex gimmicks in your world (whether existing or made by you) can help make your world more interesting.
(The above being my strong opinion on the topic)
Bassically i just want to make a simple world with a few avatars and mabye a fire place, a mirror, possible some weather, a mirror, and some interactive beds
If you know you arent good with programming logic (which udon is heavily influenced by), then I'd suggest starting off with sdk2.
Then gradually explore sdk three on your own, and when you get more comfortable you can adapt your world to the new ecosystem.
alright, ill probably do that. i think the main think i would love to do would to design some sort of apartment world or mabye a cabin
Udon is the future for VRC, so it's good to get a handle on it's concepts at some point.
Thanks so much, i will look through more into the tutorials and start off with SDK2 and then go into 3 since im not that great at programing

As someone who's done a lot of learning brand new things, I support the idea of starting with a limited scope, and SDK2 does sound like a good way to limit scope. That can get you comfortable in Unity, at least.
I'd encourage giving SDK3 a try as soon as you feel comfortable in Unity. You might surprise yourself with how much you can figure out of Udon.
Fix for issue where you can't edit a VRCUrl variable on your UdonBehaviour - just import this package into your project.
thanks for reporting the Canny for this, @prisma abyss^
what is udon?
I feel like y'all ought to just program VRCBot to parse "what is udon" in this channel and send that reply ๐
I've definitely thought about it. I bet we could think up 10 or so common questions that have easy links / replies
I was just doing that too hahaha. It's a little unfair because it cuts out "is" and returns sentences with "what" and "udon," which is a lot
That docs page has been linked 21 times since August
Just about exactly once a week ๐
how old is udon?
Hi folks, does the AV Pro video player support any SBS shaders? TCL987 doesn't seem to work on it when I tested.
I've used this shader for SBS 180 video
@floral dove Thanks. I'll check it out.
hey am I limited when it comes to particle emitters? I just want to make a burst effect when a cannon goes off. Any reason I shouldn't be able to do that?
sure, you can use ParticleSystem.Emit to do that
great stuff thanks
Also, this? I don't know what distinguishes between a burst particle system and the standard one
I used ParticleSystem.Play for what I was doing
ey, I'm going a little crazy trying to get an UdonSharp script to work -- wondering if anyone can help me out here...
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class FS_Settings : UdonSharpBehaviour
{
public GameObject obj;
public int numberOfObjects = 5;
public float radius = 0;
void Start()
{
for (int i = 0; i < numberOfObjects; i++)
{
float angle = i * Mathf.PI * 2 / numberOfObjects;
float x = Mathf.Cos(angle) * radius;
float z = Mathf.Sin(angle) * radius;
Vector3 pos = transform.position + new Vector3(x, 0, z);
float angleDegrees = -angle * Mathf.Rad2Deg;
Quaternion rot = Quaternion.Euler(-90, angleDegrees, -90);
UdonSharpBehaviour.Instantiate(obj, pos, rot);
}
}
}```
It's throwing this error on the line where I'm attempting to run Instantiate.
```System.Exception: Unknown type/field/parameter/method 'Instantiate'```
If I run this script as a MonoBehavior without the udon sharp stuff, it works fine -- of course, only in unity. I'm trying to get this to work for vrchat.
Hoping someone can help me out here -- Thanks in advance.
VRChat uses a special instantiation method called "VRCInstantiate"
Yes... I have tried that, but get a different error:
error CS1501: No overload for method 'VRCInstantiate' takes 3 arguments
Yeah it only takes a GameObject as a template
you then need to get the resulting gameobjects transform and set position and rotation after the fact
ooof... might have bitten off more than I can chew with this one
but... hey, that solved the compiler issue
ok... I can move forward with cautious optimism
Thanks for the help @fiery yoke
optimism? whats that? :^)
heh
so... I suppose I've got another question
do these scripts not work in unity?
They do... as long as they dont use any of VRChats stuff
since that stuff only runs/exists/works inside the client
well, the whole thing is a "UdonSharpBehaviour" instead of a "Monobehaviour
Suppose the easiest way to test is to just do a build/test
Ohh
I mean you put the resulting asset inside of an UdonBehaviour
which inherits from MonoBehaviour
I'm not getting any compiler errors now, but at the same time, I don't see any of the clones in playback
You should probably ask UdonSharp related stuff in Merlins discord
This is for general udon questions like "Is X possible in Udon?"
and... to clarify something...
public class FS_Settings : MonoBehavior
{
public GameObject obj;
public int numberOfObjects = 5;
public float radius = 0;
void Start()
{
for (int i = 0; i < numberOfObjects; i++)
{
float angle = i * Mathf.PI * 2 / numberOfObjects;
float x = Mathf.Cos(angle) * radius;
float z = Mathf.Sin(angle) * radius;
Vector3 pos = transform.position + new Vector3(x, 0, z);
float angleDegrees = -angle * Mathf.Rad2Deg;
Quaternion rot = Quaternion.Euler(-90, angleDegrees, -90);
Instantiate(obj, pos, rot);
}
}
}```
that works in unity/playback
but monobehavior doesn't work in vrchat, so I'm trying to rework this in udonsharp
Is it possible to add rigidbody hitboxes parented to the player that dont interfere with the player or any objects the player equips but still make it possible for their objects to effect other player's hitboxes?
Udon doesnt have direct access to the player'a transform, so it cannot parent something to it. You can use an Update method to constantly update positions of objects in the world based on position data from the player though.
Yeah in addition, on top of the regular vrchat layers you can add more of your own and adjust the physics matrix of the new layers as long as you don't change the required ones. Not sure how vrchat's layers correspond to players but there might be something you can do with that
Does OnDeserialization code execute in local testing mode with multiple clients? Trying to figure out if its not executing because of that or if there's an error i missed somewhere that's stopping execution
Yes OnDeserialization exists for multi-local client test setups. I use it all the time.
do you know if it executes when you just run play in the editor as well? or do you have to actually be testing in vrchat for it to work?
what is the equivelant to VRC_PlayerAudioOverride in SDK3?
its all exposed in VRCPlayer's udon interface like you can set the voice gain, distances, and all that
but in a world, I want to have players enter an area, and others outside of that area not hear them, how do I add it to the box collider. It's not there
I believe you'd need CyanEmu imported for that to work.
so the box collider gameobject will have to have an udon script on it. and in the udon script you will want the event "OnPlayerTriggerEnter" or "OnPlayerTriggerStay" to get access to the players that enter
I'm on the virge of going back to SDK2 on this project, serious lack of documentation
That's udon alpha for ya.
Experimentation + community support is the flavor we have currently.
It's too bad because it has potential, but every little thing is literally taking me hours
I expect the docs to be more focused on once they stabalize things.
I'm not a programmer
Well udon is heavily influenced by programming concepts.
udon is more or less just unity functions with a whitelist. Its far more capable than the previous system, but as such it also means it takes some more work to do things that were easier before. with time, I think we will see prefabs that will make it easier
there is a better audio player prefab that you can pick at and learn from
Making easy-to-use interoperable generic prefabs/systems is generally pretty hard. Its usually better to make something tailored to your needs yourself then using something generic someone else made.
I just want an area in the world where people can go yak and not bug everybody else
I'll re-visit this another night, much too tired tonight to have to figure it out :)
i believe there was a system somewhere for "soundproofing" but i have no idea where it went
You could try using OnPlayerTriggerEnter/Exit combined with PlayerAPI -> SetVoiceGain to control whether or not the local player can hear someone.
Not sure if that's exactly what's needed, just some inferring about how udon player audio might work.
okay thanks, that gives me a step in the right direction anyway

For additional details, if you pull up the node search on the PlayerAPI type and look for SetVoice, there are a few other actions there as well
ok I'll take a look
I guess the easiest way to explain what I'm trying to do is have an 'invisible' box or an area, that if a player enters it, other players outside of that box or area, cannot hear them
Yeah thats relatively simple to do, but requires a few "components" and understanding a little bit about local vs remote view
I see some things in the player audio section, I assume I'll need to experiment with that a bit
how do you fix the one eye glitch in your quest world for udon?
@scarlet lake make sure absolutly every shader is set to standard lite
i set everything to toon lit
is there any implementation of public static inside vr?
where would I ask for help with errors when importing a 3.0 world sdk? currently it's erroring at line 854 of the unity event filter in the world validation about the button interaction and targetgetgraphic not being definitions.
I'm not sure how to fix this. I'm using the latest SDK and the latest version of UdonSharp.
@dapper lion it still didn't fix it
@dense halo 3.0 world or UDON world?
they show just fine on avatars. why not the world?
theres a bug with the sdk where switching platforms through it causes the one eye issue
go to unity build setting and swap platforms to pc and back to android
I thought 3.0 WAS udon?
SDK3 for worlds is for Udon
Are you importing SDK3 into a project that previously used SDK2?
Soo I want udon to press a UI button similar to how we used to get animations to click UI buttons but for the life of me cant work it out. Anyone able to give some direction?
If you're just trying to have udon do the same thing as a button, it would be better to have the button send an event to an udon behaviour that does what you want it to, then you can just call that same event from your other udon behaviour that you're using.
I've managed to create an object spawner that drops pickup-able objects (thanks @cunning mist for that video tutorial!) but I'm noticing they're not synced across users. Has anyone found a workaround for this? I've done some vague reading about object pooling as a workaround, but have failed to find any in-depth info on using it. Any thoughts?
Yeah object-pooling is the only way to work with that currently
The easiest ways to make object pools usually use Stacks or Lists which are both not accessible in Udon.
You can still make it, but its not that trivial.
So you mean I'd have to jump into udonsharp?
No not necessarily. The graph and UdonSharp are for the most part feature-identical, so if you prefer the graph then you should still be able to do it.
Networked instantiation is unfortunate not available yet, but yeah if you can learn how ObjectPooling works than that's you're setup.
Okay thanks, and are there any solid examples y'all can recommend?
I guess my main question so far is how to define an array of objects to iterate over? Is there a "childrenOf" node? That would make it easy to transition from a GameObject that has all of my synced objects to a list I can iterate over
If I get banned I can't create another account? ๐ข ๐ข ๐ฅบ I want to play with my friends ๐ญ
I didn't mean to annoy anyone ๐ข
Not trying to get a button to do the same as Udon just want to call the "Press ()" function with udon. Basically trying to avoid alot of work load of switching it all to udon. Have Ui panel button that will do things and rather than setting udon up to do the same thing from a different event trigger I thought why not just have udon press the button.@cunning mist
I guess I could have udon play a animation that press's the button but like to keep things simple.
Not sure how it works in graph, but if you get a GameObject.transform or gameObject.transform and iterate a foreach on that specifically, it contains all of the children in order defined in the hierarchy.
Pretty sure this is the right path
The for loop would control which objects to iterate over, for now you'd hard code it to the exact number of objects minus one. The body would then run code based on the transform from the Get child node.
And then if you wanted U#, it's literally as simple as:
public GameObject[] ObjectHoldingObjects;
foreach (Transform Child in ObjectHoldingObjects.transform)
{
do stuff;
}```
stupid question, how would one go and create a mirror button with sdk3?
(i'm alittle unaware if i'm asking this in the right place)
https://www.youtube.com/watch?v=ibDu0dCeUE8 (not a stupid question, just a basic one ๐)
Also check out https://ask.vrchat.com/t/phaxenors-examples-graph-u/273/5 and skim around there for other good examples of basics stuff
If you're going to have multiple mirrors however, make sure you assign them to something so you can turn off all other instances. Don't want players complaining about performance now. :P
in addition to Joker's resources, the SDK comes with a Mirror Toggle example! Check out VRChat Examples/UdonExampleScene for a working Mirror Toggle. The readme alongside it has details on that and all the other programs that are in that Example Scene.
๐ค
Is there any video(s) that walks through the example scene parts aside from the door video you did?
not really
@viscid reef so switch back to windows then back to andraid? yeah already did that to fix spawn points. then back to andraid to set it to standard lite
I was just thinking too, a series like that would be fantastic. I'm tinkering with the UI canvas right now and an explainer would be nifty.
Yeah, it's just a readme for now. I will make a series of tutorials going through the ExampleUdonScene. I've been waiting until we release the networking update because the scene will change a bit and I don't want to make the tutorials twice.
Yea that's fair. Does the team have any sort of idea when that networking update might be expected? (like rounding to the quarter year)
I am hopeful that it will be this quarter!
Nice. Have the devs echoed that feeling as well?
...but I am a dev...
I want to enable/disable a particle system on a pickup. Can I enable/disable the component, or do I have to stick with play/stop commands for the particle system?
ParticleSystems don't work like typical Unity Components - Play/Stop is what you want.
And set the particle system to not play on start. Thanks.
That was a simple fix. And the graph looks less cluttered too.
nice!
I meant "the rest of"
I don't have an open udon graph button but i need to go to it!
you accidentally made an 'assembly program asset'. Select 'none' as the source, then make sure you choose new Udon Graph Program (fixed this in the upcoming release, sometimes it defaults to the wrong one)
So like this? o:
exactly
well, we all hope it will get out soon. It also seems reasonably likely - but it all depends on testing. We'll release it when it's ready. We're working on it every day, it touches A LOT of our codebase, including SDK2. So we have to test everything and look for regressions, make sure all existing content works seamlessly with the new system, etc. If I could tell you the exact day it would release, I would ๐
Could I ask if this looks correct for a mirror toggle? I'm following a tutorial but I'm unsure if I've done this correctly eeek
Well yea I get that. Was just curious about the teams confidence on the feel of how "soon" y'all are looking to get it in ready state.

sure - when someone Interacts with this Gameobject, set the "Active" state of the Target Gameobject to the opposite of its current state (activeSelf > unaryNegation)
I believe I have it right maybe? Coz it's supposed to be set inactive at first
this channel is for help developing world with SDK3 and Udon. Take a look at #faq for ideas on where to ask for help
hi, i just up upgraded a very old udon project and I'm getting this with a simple SendCustomNetworkEvent to a referenced udonbehaviour. (U#) [Network Processing] RPC called PlayerManager:UdonSyncRunProgramAsRPC:All and 16 bytes [VRC_EventDispatcherRFC] SendRPC/AlwaysUnbuffered on PlayerManager blocked for ville672 (local master owner)
for UdonSharp-specific help, try the UdonSharp discord
the wiki is linked in pinned messages on this channel
alright thanks
In this case thats not a UdonSharp specific problem. They simply named the GameObject "PlayerManager" which is illegal/reserved.
Heres a canny on that matter:
https://feedback.vrchat.com/vrchat-udon-closed-alpha-bugs/p/sendcustomnetworkevent-does-not-work-on-an-object-named-playermanager
Is there a Layer on which colliders on a UI canvas won't physically collide with players, but a player can still interact via laser pointer (without opening their menu)?
Walkthrough I think
hmm ๐ค setting the collider to "Is Trigger" also seems to work, but I don't like that
Well then other things will not collide with it
if you set it to Walkthrough things like pickup will collide with it, but the player wont
I want nothing at all to collide with it, except the UI laser
Is there a doc for all the layers somewhere? Didn't find it by searching
The collision matrix is your doc
And if you dont want anything to collide then make it isTrigger
What exactly does this mean? o:
Anyone get the index right hand joystick click working in VrChat? I tried both "Fire2" and "Cancel" and neither work
@scarlet lake click play button before build&pub. and check compile errors
using the left controller thumbstick as "Oculus_CrossPlatform_PrimaryThumbstick" works fine
following this https://docs.google.com/spreadsheets/d/1_iF0NjJniTnQn-knCjb5nLh6rlLfW_QKM19wtSW_S9w/edit#gid=0
on interact, even though the bool is printing TRUE on update in debug.log, this network event is still sending. WHY ;_;
Have you tried putting a Debug.Log before the branch to see if the bool's value is still true at that point?
what would be the best way for me to do syncing such as someone pushing a button and enabling a object for everyone?
@quartz meadow it's been a while since I've tested index so if that's not working, it's possible the sheet is out of date. However it's also possible that you just have a steamvr binding that doesn't send the joystick click event. If that's the case, you can try switching to the default binding or modify your binding to send the right events. Here's a world to test: https://vrchat.com/home/world/wrld_d1100558-f88d-4feb-a01c-d03afe9d350d
hi idk if this is related to udon, but i cant find the vrc_trigger component when i try adding it to a block.
ive reinstalled sdk3, and im using the latest version of unity (that it supports on the documentation site for SDK3)
if anyone can help me pls ping me!
there's no vrc_trigger component in SDK3
hello
Those keys work on index. To get the action of the trigger, use Input.GetAxisRaw("ButtonName") > 0.5f.
0.5f being how far the trigger needs to travel to be considered a click.
Are there any properties or anything that can be set that can carry across world portals?
or potentially a way to see what the previous world a user visited for the purpose of assigning a different spawn point
SDK3 works entirely differently than SDK2. Stick to SDK2 if you like that workflow.
Fire2 and Cancel are not axes, they are buttons. You would use Input.GetButtonDown
can you build warp system base off of world you come?
for ex:
world A Warp A go to world B Warp A
World B Warp A go to World A Warp A
World B Warp B go to World C Warp B
i get feeling that world warp cant be set up like that but i going ask anyway...
No, you can't do cross-world stuff like that.
too bad. be cool set up if you know what i mean ๐
So no Referer or anything
You can have portals to other worlds but you can't control the instance that they go to. You also can't transfer any data between worlds
Oh, misread sorry. Thought it was referencing the crossplatform button names.
maybe 1 day they come up away. but i am sure that will not happen ๐
What node was it where player Trigger when player touch within the block
Never mind. i found it looking at my old world
it is On Player Trigger Enter
can someone tell me why the heck in my sdk3 world even after adding a vrc ui shape component and having my canvas in the default or player layer my users STILL cannot click buttons without opening there menu or at all???
When you change the canvas to Default, you also need to set all the children to Default as well. Move it off default and swap it back, selecting "Change Children" or whatever it's called.
lol just watched your video bud
i've watched your video on it about a 100 million times
made sure all the children are the same as well
i've tried so many different layers
Try putting a random cube in your environment to make sure your updates are actually what you're loading into and you aren't stuck on the old version.
It might also help to compare your UI setup to the big UI wall in the VRCSDK Example scene that comes with SDK3. I got my UI canvas working pretty much just by copy-pasting that and deleting the stuff I didn't need ๐
i like your funny words magic man
thanks guys i'll give it a shot
if it doesn't work i'll mock it up to penut brain
Just watch Vowgan's UI video, got some nice tips I'd missed before. Also, favorite moments: low-key burping mid-sentence, forgetting to do the graphs ๐
Does anyone know about how expensive performance-wise are UI canvases, though? Does each add a draw call? They don't use a material, just a sprite, so I'd hope they'd be cheap. But the question is whether they're cheaper than a button with a mesh ๐ค
I should be asking this in #world-optimization , moving it there
i'd have to take a guess and say they should def be cheaper than any mesh stuff
Hey it's not my newest video now is it
Ui is alright, though too much of it gets funky
Also don't use animators with UI. Then you're just asking for optimization issues.
Why?
It likes to think that the UI needs to constantly update
System.DateTime.Now.Hour;
Does that get the system clock time of the local user?
This grabs it locally off their machine, if you need to get a certain timezone than that's a bit different.
Is that even possible? You'd need to know their time zone, or someone's time zone and time. Which sounds like privacy concerns
The script runs locally on their machine, so it just grabs their system's date information.
Right, but if you wanted to have a global clock that displayed UTC time, for example. You can't do that without time zone info, right? Or just directly referring to UTC time
Right, you have a private DateTime variable and a TimeZoneInfo variable. Then in update you set your DateTime variable to be TimeZoneInfo.COnvertTimeFromUTC(DateTIme.Whatever, timezoneinfo variable)
Then just print your DateTime variable to a string and output that to whatever UI you're using or whatnot.
Oh, wow, heck, yeah we really do have access to clients' time zone info ๐ค cool, also spoopy
https://docs.microsoft.com/en-us/dotnet/api/system.timezoneinfo?view=netframework-4.8
Also yeah, looks like for the UTC clock example we just have a direct reference. Neat!
i've gotten to the point now where if i see udon graph i'm like wait that's udon? but where is the code
this is my clock
but it only works on one orientation
it would be so much more elegant if I could make just this one clock face a prefab
that would then work if I rotated it
suggestions? idk how to use set rotation...
Transform.Set localEulerAngles?
I don't know, but that's what I'd guess to start with
Cool, now I can derail with my question
Is it possible to remove the skybox layer/all background from the reflection of the VRC Mirror Reflection script? Alternatively, is it possible to reflect the reflection cubemap?
I baked a cubemap with a box projection that's a passable cheap alternative to reflecting the whole environment in real time. I want that to be the background of a reflection of only players. I'm pretty sure that a mirror like this exists in Summer Solitude
use a shader?
That's probably an answer. To do that I'd need to screw with the shader though, which is a whole different area I'd have to get into. I was hoping that the shader SDK3 provides made it possible already
it's a terrible answer, but that's the first place I'd look if I were going to do a camera trick like that because I'm more afraid of the weight of realtime reflections
I'm putting two questions open out there now ๐
but I was thinking more about this:
This is reading hour and minute every single frame, but really you only need it to read once every minute. Probably not any kind of performance issue unless somehow the scale of this was huge.
But that brings me to another question--is there an easy way to execute only when minute or second changes? I've run into this before, typically with counting seconds.
Execute when T=T+1 basically, T is the time in minutes, reset T first thing after the branch
alternatively make your minutes an integer, divide by 2, and set a bit high if the remainder isn't 0
Then time your event off the transition of that bit/boolean
isn't there a teleporter somewhere in the sdk?
PlayerAPI TeleportTo?
I used that and made a fancy little activator that pulsates
There's a really nice prefab that works with sdk2
Though now that I think about it, it might have been in a kit
Are there any wikis or videos on how to sync animations with every user?
Is there any way to sync a script with real world time?
Good time-ing ๐ we were just talking about Time stuff. Check out this conversation above:
#udon-general message
any assets that allow for direct thumbnail upload in 3.0 similar to how pumpkin would work in 2.0 with the camera overlay
Does anyone have a good example or prefab of synced UI sliders?
wasn't there a few on the default udon exemple scene?
just checked that out, it's master only. I'm struggling making one that anyone can change
Yeah that is indeed tricky
it feels like something I've seen in worlds before but I can't actually recall if that ever existed haha
SetBool and SetInt are both causing udon exception; is there anything that i can try to fix? script works fine up until this point EDIT program was bugged, remade it identically and it worked ๐คทโโ๏ธ
Somebody make a map that has cars on the side of the road that is correct for your timezone
Is there a way to debug a world once it's in VRC? Rather than running from the editor?
How do people make objects that function like buttons? Like it has the outline and HUD of a pickupable item in game, but triggers an event. Is there a component for this?
do udon behavior and add a toggle script if you have any
Ah, okay so it is through udon. Thanks
I wonder... if asking will save me a few hours of headache.
I've got five prefab variants with toggleable stuff that are all affected by the animator on the parent object. I made sure my scene and the respective prefabs all have an animator with the same controller. This results in a lot of yellow entries for one or the other in my timeline, but I want to assume that, if the keyframes find their target, they'll work...
All that said... my prefabs don't animate when I toggle the params in vrchat. Top level stuff works fine though.
Am I missing something, or is it just not possible for nested prefabs to animate, even if they share the controller that the parent uses?
the ironic thing is that the trigger that toggles the param is inside of the prefab...
Got you covered fam: https://gameliberty.club/@techanon/105552915290006587
Touch Controls v1.0 is now released (actually for a couple days now but forgot to post about it here).
Demo: http://odysee.com/@architechvr/ArchiTech-TouchControls-v1.0
Available at:
Booth (requires account to DL):
https://architechvr.booth.pm/items/2668806
Gumroad (needs an email to DL):
https://gum.co/architechcontrols
how do I do a dynamically sized array in udon (like a list)?
You can't, you would have to allocate a new array and copy the elements from the old array over to the new one
What would be the best way to setup a lock with udon? like a locked room that syncs with new players/current
Hi, is there a dictionary type in udon?
ok thx
Is there a quick prefab or script for toggling an something if a player is inside of a collider? I can see that you'd do a "on trigger" collision, based upon something on the player.
I want to use it for 1, heavy culling, and 2 counting the number of players in a certain room.
Is it possible to end the instance after certain amount of time? Like send all the ppl to home
@cedar cairn that sounds a bit malicious
@dense halo archanon has been working on collider toggles. ive never used them but may help you understand how to mold your set up
Is there is a countdown and it is expected i don't see it as malicious ๐ค
Thanks Lit.
@cedar cairn i mean, you could set up a thing where you have a home portal and after a set timer delay, have it teleport to players locations
Oh yeah that's an option, maybe teleport all to one small room with only the home portal.
but why exactly do you want this for your world?
Hard to explain without revealing too much
that's a good skill to have in any case, programming that mechanic
you need a game timer
@cedar cairn Force closing an instance is probably a no-no, but sending everyone to a room with only the home portal should be fine for a gamemode or some relevant story/gameplay element.
in the sense that you want there to be a way to say "Time's up!" and respawn everyone to their team's zone or whatever
spawn them into a hollow tube with the world portal at the bottom and let gravity take its course
sorry if a lot of my solutions involve spawning people into hollow tubes I just saw it in a game once and I need to use it
idk if dropping people to a portal works because they need to walk towards it to work. But i just do that empty dark room with one portal, should be enough and not being in a risk of getting banned
and tbh I love the idea of the whole world dissolving and you look around and all you see is black and then you look down and all you see is your death and you say "not again..."
I didn't know they had to walk toward it tho
The thing is that my idea isn't a game, it is gonna be an.. experience?
dude there's loads of fun stuff you can do just with the physics vrchat gives you
so branching out is A+ thinking
don't forget you can change the player mods on the fly
I saw one guy who scaled the player three ways
really fun world
Im just pretty bad with udon, i wonder if i can setup a timer with sdk2, so it would start when the instance is created and would be synced with late joiners
Super quick question
Does VRCPlayerApi.GetPlayerById(blah).displayName return null if the player leaves? I'm assuming yes, but VRC be weird sometimes.
Actually now that I think about it, GetPlayerById would return null by default I imagine for an empty player slot.
Not necessarily. The playerapi is not immediately nulled if someone leaves. Since there is no documentation on it, the exact behaviour is unknown to me.
Anyone had an issue where you can't open the Udon Graph?
I click the button and it doesn't do anything
I've tried reinstalling Unity and the VRCSDK
make a udon graph script in the assets folder, and tell it to open itself in graph
You can only reasonably open a graph from the asset itself, the "Open" button ususally just links you to the last graph you had open.
ok thanks
So I've got an SDK3/Udon world that works fine in both VR and Desktop when I do Build & Test. I am able to successfully upload it to the VRC Servers, but when I try to join from VRChat's client I get the download bar, then Initializing World, then it boots me back home. Any ideas what could be causing that?
https://github.com/oneVR/VRWorldToolkit/releases
Import this and check VRWorld Toolkit > World Debugger from the top bar
Ding Dong! I'm DumB!
I didn't set a spawn in the Scene Descriptor, apparently
but it's weird that I was able to spawn in without it in Build & Test Mode
yeah, gotta fix the spawn orientation first so I'm not facing a wall lol
Did you use the VRCWorld prefab or made the scene descriptor on your own?
VRCWorld prefab
Huh that should have it set automatically
so 1 is this Toolkit something you made?
Yeah
It was very useful (assuming this works lol) thanks a bunch!
I am still very curious how the spawn point got unset though
I find in unity that if you delete something with something like that set and you hit undo it shows up unset
But that's a prefab lol shouldn't get unset that way right?
Yeah ๐ค I'm gonna test around see if I can cause it being unset myself to find out what's causing it
I also used a tutorial that had me make the scene descriptor first, then I found out about the prefab so that could have screwed with it too
That could have cause it if you removed only the scene descriptor and not the pipeline manager with it
Which would cause a problem in build & publish and not in build & test
No worries
Hey 1, if you're really interested in what broke I made a package of my whole build pre-fix that I could upload somewhere if you wanted to download it and poke around.
I'm trying to add a different number for 3 different kinds of events, things are a little complicated (I got the base of this from the VRChat Udon example world) is there a way I can wire things up to add different integers for each type of event? (2 for redbox, 5 for redslope, 1 for redplank)
Does anybody know what would be a good note to make a simple 15 seconds delay for things happening, for example a Game object disappearing after [Value] of seconds after spawning.
uhh... animation maybe?
forgive me, i know absolutely nothing about scripting or stuff like that ๐
I dont know much about animation, but i will try. Thanks
I'm not sure I totally understand but if you want a number to be different depending on which event calls it, make a variable, and have the event trigger SetVariable before the Addition. Does that make sense?
there's a timer example in the UdonExampleScene which does this, though it repeats. The basic idea is:
- Create a bool variable to track whether you're counting down or not - we'll call it isWaiting, default to false.
- Set isWaiting to true when you want to start counting down, and save Time.time into a variable - we'll call it 'startTime'
- Save your desired interval into a variable - we'll call it waitTime (a float set to '15' in this case)
- On Update, check if Time.time - startTime > waitTime. If that's true (use a Branch), then fire your event and set isWaiting to false.
@floral dove Thank you soo much
thanks! I'm learning a lot picking thru the scripts
At least in SDK2, you can animate a portal's parent, so you'd teleport a player (and probably the spawnpoint if you don't want them escaping) into an empty room and sweep the room with the portal. It's pretty reliable. I don't think you'll get in any trouble, I've had a world up for more than a year now that uses that trick as part of a prank.
what do i do when the game keeps lagging and having errors forcing me to leave games
@dire dew change internet connection, also this is udon queries
oh sowwy ;-;
OnPlayerTriggerEnter is called when a player's capsule enters a Trigger Collider
according to the vrchat's docs
do players other than the local player have a capsule collider?
Technically no.
They have a sphere collider at their base.
๐
But yes, remote players will fire it locally as well as long as their collider still triggers it.
but they won't fire it if someone else in the world hits that trigger
unless i sync something
They will, those sphere colliders exist on their local versions of their body for you. Meaning if say "OnPlayerTriggerEnter -> Set Gravity to 0.1f"
Anyone that goes into that zone will make everyone else have low gravity, because their copy on your side also has that collider, just a smol one.
anyone ever used UpdateGIMaterials before?
have a script that logs fine, but isnt actually updating GI
is global illumination set to real time?
yeah worked before the script was implemented
ik its unchecked; my unity keeps unchecking it because i baked with bakery/enlighten combine
bakery doesnt like global illumination tho, i dont think udon can do it for bakery, but for unify like enlighten, it should
how do I get those sphere colliders for the trigger?
public void OnPlayerTriggerEnter(VRC.SDKBase.VRCPlayerApi player)
{
//stuff happens here
}
the contents only fires locally and not for observers, I guess because VRCPlayerApi is only the local player?
it does; i just showed a clip of it working
it just doesnt run in vrc bc of .UpdateGIMaterials for some reason
im on mobile sp the video is a bit cut off
ahh, so like a global emmisive illumination?
i believe you need to use a shader that supports real time gi
i'm pretty sure he is
hmm, then something incorrect
im not sure what is wrong, but i also cant see about 10-15% of the right side of the video
whats the rest of graph look like?
If you want to say "only do the thing if it's the local player"
Start the event with "if(player != Networking.localPlayer) return;"
no, i want to do the opposite
Then make it == instead of !=
where would you put that? OnPlayerTriggerEnter only fires locally if the argument is VRC.SDKBase.VRCPlayerApi player
i want it to fire on those colliders of other players in the world too, like the old difference between the localplayer and player layers
without having to sync an object attached to every player, if possible
OnPlayerTriggerEnter runs on each client anytime another player's reference collider (the sphere mentioned previously) enters the target collider.
Got code or noodles to show? That'd help.
this stuff
Thats just the method signature. Are you doing anything else within that method?
okay, i've got it - i was doing stuff to the player object that entered the collider
the collision was being seen by the other clients (other stuff was working inside the method), but seems like the player is off limits unless that player belongs to the client
so player A enters the collider, player B's client sees player A enter it and tries to teleport player A - not allowed - but player B's client can send a custom network event that tells player A to teleport
thanks for the help

That does not seem to be supported. A workaround would be to have the objects already in the world (hidden).
Yeah i did think of doing something like that instead, just a resource pool somewhere. It's a bit annoying though as it will eat up world loading speed
e.g if I wanted to make minecraft and keep it sync at all times I'd need like 400 block multiplied by players to ensure everyone's surrounding are rendered if they all wonder off
So I have been trying make clones of a prefab destroy themselves after some kind of action that effect only themselves and from what i have seen the problem is that cloned objects will take information about destroying themselves from the original object not from their own interactions. For example if you just make a delay that object destroys itself after 10 seconds of interacting with another collider then after the original does it every single clone will automatically destroy itself. There should be a way to make clones take that information only form their own interactions ,but i still haven't found it.
It would basically function like bullets disappearing 10 seconds after being fired.
That's a long-life bullet
yea, i will probably change the time to 3-6 seconds in the future
Call Oliver Stone
Hey guys, this is a super newb question and im sorry if its dumb but i honestly not sure. I have a world in sdk3, but i want to build a new one from scratch and then upload it to VRC to replace the old world completely. Would I just need to copy the blueprint id into the new project?
@ashen monolith yes sir
Thanks a lot!
pretty sure today I'm going to try to animate a car driving around a block, but really simple, just a cube and four cylinders that have basic rotation, so I'll just keyframe that position and rotation and kinda just drive it around....
Anyone got the graph for that?
seems like really the easiest way to get cars driving around the background of a city
obviously without like..bones for a steering wheel and axles for the wheels to turn and such
I mean if its all static animation I'd only do it as an animation and not involve udon other than starting and stopping it
what would be the best way to control a shader emission with spectrumdata? using udon graphs and not sure how to exactly
You'll either want a shader that directly supports that or use animations to blend between high and low emission
Hey, maybe not the time or place but I used a ton of your tutorials while building my world so I wanted to say thanks for doing what you do!
Happy to help ๐
@floral dove that sounds like it would theoretically work! Like this?
Weirdly, that just results in my ui text going from 0 to blank lol. It should increment by the respective "cost"
Also strangely, whenever I build and test, my set variables all change to the same value :/
Known bug, fixed in the open beta. Work around this by using a "Const Int" node and just setting the value in that node. Same is true for floats, booleans
This is probably because 0 is the default, and as soon as your script tries to set the UI text, it's blanking it because something is wrong in your script. Clean up your graph and post a screenshot
The network logic is from the default vrchat udon world
Is it valid to have the three branch nodes just feed directly into the "setRedCost" node? I figured that was the same as saying, "each event should eventually trigger the setRedCost"
When I disconnect 2 of them and only feed one of them into the set redCost, the uiText works as expected
I don't think that's allowed
Perhaps use a block
Set a complete boolean at the end of your true statements instead
Next node down off the block use a branch that executes on the complete boolean, execute the rest of your instructions, and then turn off the complete boolean.
I also met this weird bug, but i could not find anything better than to do it through a custom event.
Hello! I have a script that used OnEnterTrigger attached to the head of the player and check if the object that goes inside is a trigger or not, and it's working great, but I noticed that if you have an avatar with a collider (for example for a VRC Station) the script get an error for a NullReferenceException in the "get Is Trigger", I've tried to check both if the collider and the IsTrigger gets a Null before executing the script, but apparently it still give me that error and break the script, and the collision layer of this object it already excludes collisions with the player layers. How can I prevent it from break?
That's the nodes I'm talking about
How do you do VRC_Panorama in SDK3/Udon?
VRC_Panorama is not implemented in SDK3/Udon, they will make a new system to use images from the web, but it's still not implemented at the moment
@dawn plover cant it be done in code?
I don't think so as far as I know, there's no possibility to get an image from the web, maybe you could do some sort of trick with the video player, but I don't think it will work
Good evening! Is there any reason my pickup shouldn't teleport to the origin when entering a trigger collider (as is expected from this graph?)
Instead when entering the trigger it just does....nothing lol
You actually don't need the "This" or "Get Transform" nodes, as leaving any "Instance" value empty automatically assumes the object that the script is on. You may need to tell the Pickup to drop first though, otherwise it's still being pulled to the hand of the person carrying it.
So, I just started using udon and I have no idea where to begin with it
@scarlet lake make toggle script
A what
Oh interesting, thanks, @cunning mist like this?
a graph script for toggling objects for practice

Probably will work!
Also Vrcxoculus check out my youtubes
Hope they help :)
Sadly did not work
Is the pickup on the same object as the graph?
Also, I recommend using CyanEmu to test stuff in editor.
And yeah! That's me.
very much looks like it!
Not getting a lot of feedback on other channels for this question. So I want to take a thrown object and push a player back when they collide. Iโm trying to get the rigid body component of the player in the onPlayerCollisionEnter function?
The player objects are protected and cannot be directly accessed. There is a limited API surface with which to act upon a player: PlayerAPI)
oh i was just watching one of your videos last night lol
Hello, I have a bit of a headache right now trying to solve this... and need help... please.
The idea is to toggle between 2 animation states for a big door. the Bool is setup, and I have a script that works perfect... BUT only for local... and i need this to work to sync for players, and sync with new players joining the world.
I used a version of Jetdogs Graph prefab to do this, bit a Frankenstein monster sort of creation. it looks like it should work, but nothing happens. the button doesn't even toggle the animation to play at all. :c help please.
The original Jetdog graph worked for Objects, not animations, so I thought it would still work the same if I swap stuff out to animation instead :c
When someone clicks the door, you'll want to send a CustomNetworkEvent to all, named like "Toggle Door" or something. In that event, have a simple "Animation.Set Bool = UnaryNegation of Animation.Get Bool" to just swap it around. This will toggle it correctly for any players presently in the world.
To manage for late-joiners, you'll need a couple more events.
In the event "OnPlayerJoined" do a simple check to see if the user is the master with "Networking.IsMaster -> Branch". If so, have them use "Animation.Get Bool" to know the current state of the animation for them, a person who has gotten all the synced information up until now. If that bool is true (checked in a branch), send a CustomNetworkEvent to All that just sets the bool to be True, and the opposite for false. Setting the bool to what it already is in the case of anyone who isn't new wont change anything for them when it comes to the door, but will accurately update the animator for the person who just joined in.
@stable nebula
you can't directly get the Rigidbody in that function, BUT - you get the VRCPlayerApi, from which you can GetVelocity, returning a Vector3. Then you can apply the velocity you want to add from the object, and SetVelocity on the VRCPlayerApi with the result, which could give you the effect you want
Ah! thank you so much, I will look into this, love your videos btw, I used your video as reference when using Animated door graph hehe
Happy to help.
I see @floral dove . So you canโt add a force vector to the rigid body. You can get the vector for velocity, add a vector to the current velocity, then set that vector as the new velocity.
^ Correct
Nice. I canโt wait to get home and try it out. I appreciate the feedback :).
If you want something to watch through on it, I used this setup in order to do a basic flight system, essentially just propelling you in the direction you clicked with a pickup.
https://youtu.be/fiS-iMY1m5A
Want to fly in your VRChat world? Here's a basic way to get started! It will let you fly around your environment as you'd like while also having a speed limit, unless you want to learn what it's like to transcend reality itself. Not a bad idea.
00:00 - Intro
00:16 - Setting Up the Prefab
03:00 - Graph Scripting
07:00 - Infinite Acceleration
08:...
Oh shoot. I watched a couple of your videos @cunning mist . Those videos are amazing and it got me into making VRChat worlds recently.
@cunning mist Would you have any idea how to make the player able to swing from a rope?
I'm trying to recreate the web swinging from spider lair udon, and I think i have an idea on how to do the shooting the web, but the swinging is the part I'm having trouble with
You should look into how BlueAsis and them did the hookjunkers world. I haven't played around with it.
But that is grappling, im talking about like pendulum physics
Would you know anyone you knows about that kind of stuff?
You can do that really easily with Unitys Physics Joints
However the custom locomotion is the harder part
like no matter what you use, it will have some sort of problem.
How do you move the player?
I'm sorry I know nothing about making vrchat worlds so I'm kinda shooting blind hoping I get something that works
I know a tiny bit about making avatars but nothing more than how to publish one
Ohh well in that case making something like being able to swing around might be a little hard
If your able to check out spider lair udon, you will know what my end goal is
its pc only, and that's why I'm doing this
to try to do it on quest
For now I just want to be able to shoot webs, swing from them, and have the momentum be continued onto the player and be able to build up with every swing that doesn't hit stuff
then I will do the building up tension that can launch the player
pulling on the webs while swinging making you get pulled a little more in that direction
Sorry to ask again, but someone know how to solve this? I'm trying for hours but I can't find a solution other than changing all the collision layers of the world, and honestly I don't really wanna do that lol
I've tried everything I could, and apparently I can't do anything to prevent it from breaking the script, I just need to filter out the collisions of the VRC Stations in the avatar, but no matter how I'm trying it always give me a NullReferenceException
could you try using OnPlayerEnterTrigger instead of adding a collider to the Player's head?
I can try to see if it happens with that too, but I need a collision on the head instead of the whole body, the scripts is for preventing people looking through walls by going inside them with the head
Oh, OnPlayerEnterTrigger doesn't have a collision output, so I can't really test it, I need to know if the collider is a trigger or not
Remember that for remote players this will not really work since their collision is just a sphere at feet level.
As long as youre only testing that locally it should be fine however.
Oh, I'm stupid, I didn't understand what you were meaning, well, if I use OnPlayerEnterTrigger I have to put the script on all the walls I have on the world, that's why I thought that having a collision on the head have more sense, so it's just one script and one objects that does all
And you would be correct
There is as always many ways to achieve the same goal
but the simplest one would probably be to make your own collider that you always set to the TrackingData position of the head
Well, yes, but the problem for me it's not the remote players, it's for the local, because if their head goes inside the collider they have on the avatar (not the player capsule, I'm talking about sitting stations and things like that), the script will try to execute but it will return an error, breaking completely the script, and so they can look through walls again, and I don't want this to happen
There is no good way to do this I think, because VRChat does not offer fine enough control over the player and all its relevant components
That's what I guessed, and I guess I need to change all the layers in my world in the end ๐ฉ it's just a bit frustrating, I just need that error to not break the script
ok - if the issue is that sometimes it will collide with another player and then return null, you can try comparing the collision from OnTriggerEnter to null, and stop there if it is equal. Just make sure to use System.Object.Inequality to compare against null, put that into a Branch node, and only continue from the 'true' output
No, that's not what I meant, I'm not talking about players colliding with each other, I'm talking about collisions of VRC Station on the avatar, if a player have a seat on their avatar and accidentaly put their head inside the collider it will break the script, I have already a "Null checker", and it's working on players, but the sitting station are not returning null, I can see the name of the object and what type of collider is but when I try to access isTrigger it will return NullReferenceException, even if I've tried to null check even the isTrigger
hm - if you're checking that the collider is null before you reference it, it certainly should not be throwing a NullReferenceException. Can you show the full error you get here?
Hm, I think you found a bug, at least in the way that this is compiled. Your graph looks right, but it's possible that it's trying to get the collider before it's actually checked if the collider is null. You could try this, it's just a guess but it's the only one I've got right now:
- Set a Collider Variable (let's call it 'maybeCollider') as the first node that triggers after the OnTriggerEnter.
- Use separate 'maybeCollider' getters to do your Branch checks.
I've already tried that solution because I was thinking it was because I was taking the collider directly from the OnTriggerEnter node, but it does the same thing with the same error, at least, I've set the variable after null checking the collider, so I'll try again like you said ๐
ok. thanks for providing the log, and good luck to you. Let me know if that helps - either way, I'll file this as a bug and track it internally. If you file a canny for it, then I'll update that canny as we make progress. Cheers!
Oh, thank you so much, I'll open a Canny then! ๐
great! you don't need to provide a ton of info as I've copied your description, image and log into our internal system. Just the basics so you can track the progress.
what is udon
A custom coding language devoloped by vrchat to make more complex worlds
Yup, I didn't read it before so I've still added all the information I had lol
Btw I've tried again with the Set Variable and same error unfortunately
Anyway here's the Canny (hopefully it's not a problem if I put it here): https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/ontriggerenter-with-istrigger-breaks-when-enter-vrc-station-of-an-avatar
Hello! me again... The solution @cunning mist provided worked... but only one time. and there was a few second delay before it actually toggled the Animation.
After the first toggle, now the button does nothing, even clicking it one time and waiting more then 5 minutes.
I'm Pretty sure I copied everything Vowgen suggested I should use, but I might have messed up somewhere... :c
Some additional info if it would help:
The Animator:
- Has 1 Bool Parameter, called Open that is Checked Off by Default.
- Entry Animation is the "Idle" state, that moves onto Opening, then to Closing be default.
- Transition condition: Open = True, which moves to "Opening" state
- Transition condition: Open = False, which moves to "Closing" state
- True to open, False to Close.
- Both Transitions has the Exit time set to 0 and turned off.
The delay is expected because that's how long it takes to bounce off the server, though the branch for Get isMaster needs to lead into another branch where you check the Bool's state, then call your event depending on that.
The isMaster branch only should lead out of it if it's true, then go to into the bool branch
Wait, i'm confused, How would I check the bool state?
Also, will the sequence be like this:
Animator.Get Bool, plug that into the branch check.
Ye
Now the door doesn't open at all
Welp
GL :thumbup:
:|
I haven't really looked at or thought about what you're doing very much ๐ but I did notice this part of your graph, which is gonna be affected by an annoying bug that's easy to miss, where the configured values of those bools unexpectedly change
Could that be the cause of whatever issue you're having? If so, plug in some Bool.Const nodes and just configure the values that way. If you don't know whether that could be the cause, then do that anyway and see if that fixes it ๐คทโโ๏ธ
Alrighty, I'll give it a shot, thanks
Disclaimer, I don't actually know if the issue I'm thinking of is general enough to affect Animator.SetBool nodes. I only know it affects other nodes that set variables. Momo would probably know if this kind of thing is within the ambit of that issue.
Or maybe not ๐ค if it turns out that changes things, say so! Might be good to add to that canny report
I'm loading up a test right now, will let you know.
Well it opened the door once, but now it's back to not cycling the animation to close again after it's open... :c
i'm probably going to just scrap this whole freaking idea for a badass tomb door entrance way... and find another solution or something... >:c
I've been trying to fix this door for the past week or so... q.q and have a MASSIVE headache over the whole thing...
hey guys, i got a question. i'm trying to setup vowgan's door animator, i have it working, but it seems the initial toggle starts the animation opened, closes partially, then opens fully. every toggle after that plays the animation fine. i'm wondering what i'm doing wrong.
hecc, seems past replies have door problems too. >->
Figure I add this question because I can't even get feedback from Udon itself. So just trying to setVelocity in OnPlayerCollisionEnter(VRCPlayerApi player) but nothing happens is there something I'm not getting?
FYI @stable nebula @void ridge the SetVariable bug doesn't affect animators, only variables from the variables window
Very dumb question but I can't find any docs on it:
How do you make the static "floating" type pickup objects in udon? My rigidbody is neither gravity nor kinematics effected.
Do you just do something like set throw velocity min to a huge number? or 0? Maybe set boost scale to 0?
Hello, I'm pretty new to World Building and I am building a chill world for fun. When building the world, I used an avatar about 6 ft tall (same one I use in game) for scale along with probuilder/progrids which uses measurements on the side of the default blocks. For some reason when I went to build and test the world, everything was pretty small and I kept getting stuck on the roof. Is this a known issue with building and testing? Don't think it'll be too hard to scale everything up though if I need to. Also I am using SDK3, which is why I'm posting here instesad of the other world channels which I think are for SDK2.
The player capsule collider no matter the size is always two meters tall exactly. If you have a ceiling that is also two meters tall, you're going to run into a lot of issues with players bumping against the ceiling and being unable to move. I recommend on average having the ceiling be at least three meters up to give plenty of clearance.
--
Brick, just enable Kinematic on the rigidbody you're using. That should give you the exact effect you're looking for.
Hey, I had a quick question. I have a variable I need to set to true when a player picks up an object, and false when they drop it. Is there a method out there that calls when the player picks up and drops the object?
I know Interact() is one of them, but that is for the index trigger.
Never mind, found the commands. Here's it for anyone interested:
Wow
Animation doesn't even need programming if all you want is to loop it
Good tip whoever said that
Hello, i've got a movement question, i'm using vive controllers and when i want to move i have to press the trackpad down. When i have only one controller running i don't have to press it down but i then only have to rest my finger on the trackpad button in order to move. when i have both controllers on, and when this last way is active so i don't have to press the button down, the movement controls are then on my right vr controller and not the left one, when i have to press the trackpad down, the controls are on the left controller. I want to know how i can use the option to rest my finger to move without pressing the trackpad down on the left controller, I once managed to do this by accident. Maybe somebody here can explain to me what i should do to have it that way? thanks!
so using a udon graph, is get local player and get display name the way to trigger something locally for someone?
like if I got someones display name and used it to unlock a door for them
Whatโs this Udon thing anyways? VRChat Udon is a programming language built completely in-house by the VRChat Development Team. It is designed to be secure, performant, and easy to use via the VRChat Udon Node Graph, a built-in visual programming interface that uses nodes and wires (we call them โno...
Hi, gonna be new to learning Udon. Was wondering, I know there are a good number of worlds with a drawing tablet asset that can be used. Does anyone know where I can get said asset/prefab, and will it work okay with Udon?
@proven musk ive acc been in the process of creating a udon tablet, as there were none availible
Ahh I see. When that becomes available I would love to know!
you need collider activated scripts, render textures and a bunch of fun stuff
@proven musk sure, you can see the progress of it in #udon-showoff
Awesome thanks!
I'm wondering if there are any example scripts out there how to implement some of the new Sound control modules... What I want to do is have an invisible box that when a player is within that box, will be louder. I've made a graph, and attached it to the object, but it doesn't do anything... I am pretty sure I'm not doing it right.
arrow outputs
You didn't drag out the arrow to actually trigger it?
Both
lol close
This page:
https://ask.vrchat.com/t/spinning-cube-example-series/81
And specifically this video
https://www.youtube.com/watch?v=_pbf9hakP9E
ok thanks I'll take a look
caution: those videos are a little bit out of date. How variable nodes work has changed a bit. Take note of that and it should still be pretty clear and helpful.
I don't really understand the difference between the lines between the arrows and the lines between the circles if that makes any sense :D
Right, the "Intput and Flow" video explains that
ok
tl;dr
Arrows: execute these things in this order
Circles: while executing, use this information
ahh ok, so what if I want two things to happen at the same time, is there a way to have the arrows go in a Y to go to two events?
example, spawn this object, and make the button change colour
Two things never happen at the same time inside of a computer. A computer always processes instructions one by one.
(Except for multithreading, but dont worry about that)
However
Think about things as executed inside the space of a "frame." You can have A, B, C, D happen in that order, but if they all happen in the space of a frame, then from a user perspective, they're happening at the same time.
right
Your Event.OnPlayerTriggerEnter node occurs on some given frame, and all your programming that follows it happens on that frame.
OK, so basically if I wanted another thing to happen I would be continuing the 'arrow' path along to the next item
exactly ||or use a Block node, but those scare me and I don't want to talk about them||
||They are blockblack magic, I avoid them||
ok that's what I thought, I've been experimenting with a few things but often the first item will work, and the second item nothing happens, I'll have to play with that a little more
if a gameobject is disabled with an udon behavior on it, will the behavior still run?
I think not, you would have to enable it in another way, like another active Gameobject
Quickie Udon question. Is it possible to send a network event to a specific player by VRCPlayerAPI Index?
(I know the player's index for example, just need to send them a confirmation.)
Does anyone know where I can find a guide to set up a UI for a VRC World? I'm trying to make a UI that just turns off and on a mirror but I cant seem to get it to be correctly interactable.
It works just fine if I apply it to an actual object.
I just don't know how to properly set up the canvas
Check out the UI in the UdonExampleScene, it's got a working Mirror Toggle.
Make sure to move your canvas and it's children off the default 'UI' layer. 'Default' should be a fine layer to use.
If you first create a lookup of player indices to GameObjects which are owned by that player then you can call Send Network Event on the object owned by the player
No. Only to the owner of an object or all.
That should work, since the owner of the object should have resolved after the 3 second timer. Time to give that a test. <3
So just to clarify, when you send a network event to "Owner", that's the objects owner, not the actual master of the room, correct?
(Because I've been using that entirely wrong this whole time, but amusingly the only time I've ever used it is on an object that never passed ownership.)
Yes with owner it means owner of an object. Terminology can be a little tricky sometimes.