#udon-general
59 messages ยท Page 24 of 1
Is there any way to cancel sound in areas
like if i have a sleeping area, it just cuts out sound
(besides player speach
like from audio sources
WAIT
Disabling an audio source, that just does it client sided right?
I could just have a script disable all audio sources (or pause/mute them more likely) on clients side while in a trigger
I think i may have reached some kind of limit in udon programs. A drum machine im making are using โon trigger enterโ scrits to make buttons on it interractable. Works fine when the world is fresh, but after s while some stops working. I will try to reduce the ammount of programs for it but while im here i would like to ask if there is a known limit of things like this?
I don't think there's a limit, I've got some gnarly code going on myself but it only breaks when I've messed something up. Perhaps an error is happening? You can add udon debug to vrc's log by adding --enable-udon-debug-logging to command line options
Ill shall look into that. All the buttons run the same script, and only a few ammount of them stops working after some time.
See if it's consistently the same buttons, or if they're doing something controlling the same object that breaks. I'm betting there's some unassigned values on the individual buttons.
It seems a little bit like a controlled random. Its useually the same ones that breaks (further down in the hiarchy if that matters) but not always the same ammount.
But it could very well be related to the values
There are like 80 buttons or so, mich room for misshapps
Okay, as they're all buttons I'm gonna teach you how to test things like this in Unity; Have them run OnMouseClick, aim the game camera at the buttons, click play. Click on buttons as you would in VRChat until something breaks, check the console log for the error.
Sounds like a good plan indeed
If you click on the error in the log, it'll highlight what's crashed in your heirarchy on the side (eg; BUTTON_34), and what you want to check for is a line spaced apart from the others in the message that'll look something like "Cannot call Animator as an Udon Script" or just "Object Reference set to void". You'll know the line in the error log I mean when you see it.
Yup that part il aware of ^^ but i never thought of using the mouse klick event ๐
No worries, just making sure you're fully equipped to diagnose it. It's how I test my pinball machine.
Then again they run โnetwork eventsโ and as far as i know they dont trigger in unity. Can change them to a normal custom event at least and see if i can break them ^^
Yeah, network events don't work in Unity sadly.
GotoFinal's GotoUdon did allow you to run network events as local events in Unity, however Im not sure how up-to-date his tool is.
Hello! I've got a few questions about worldmaking, not just the udon side of things, I've been wanting to make some pretty long animations with a lot of elements and i was wondering how sync works for late joiners and people with lower end computers. Let's say my animation is around 15 minutes long, with an average of 3 elements being turned on/off with different settings being fiddled with over then span of a minute, What would be the best way to handle this, through multiple animation clips or one master clip? Would this fit late joiners even in the middle of this 15min long session?
There are some gimmicks, but all we can really hope for is that this checkmark isn't a five year wait.
this is the reason why i'm posting here, i know that in the old sdk there were easier ways to sync, and i might just go back to sdk2 for my world if sync's a bit of a mess ^^
Animation sync is not yet supported but we'll have a timeline position parameter, so you can see if your timeline looks correct when jumping to different positions and handle sync with a direct jump or more of a fast-forward if that works better for you.
oooh, sounds absolutely lovely, can't wait for that to come out! In the mean time, would i be better off with sdk2 stuff then?
Just curious, would having a float parameter that controls the normalized time of the animation clip in the animator work if you had a script to set the parameter from a synced float?
Yo, how would i iterate through an array of audio sources to mute each of them
Nvm
Alright, so this is a simple script, it does not work, what am i doing wrong here?
(Yes i added all the audio sources to the thing, and i am working on unmuting it as well, the issue is it doesnt mute in the first place
oh
i think i realize what i did
Nope
this is the new grid
(a box collider in a room)
(that has the udon behavior in it)
wait
I assume players trigger that, right?
@zealous mason
@solar steppe Players do not trigger that =)
Yes, 2 options
1 option is to grab a players hip bone and check if it's within the bounds of a collider, the other option i gotta link you to, one moment
Ill just wait on that since
The good news is that weโll have proper Player Collision events in very soon.
i have a question about mirrors. how do you set it up so that the player walks in and the mirror auto turns on?
@sick dawn - take a look at the thread on Player Collision just above, that's what you want to do. It will be easier very soon, for now you have to use a workaround.
ok i made the cube that has the script but there is no place to add the mirror. i don't know what node to add to give me that option?
I've noticed that all of the sync video player tutorials seem to be for VRCSDK2, however in SDK3 Udon, there is a Video Player Component. No tutorials on it though. Any post I can research on how to use a Video Player in SDK3?
Its not avalible in sdk3. The team is working on a more powerful videoplayer, but untill then no videos.
Gotcha. So, sorry for the dumb questions, but I've been working on a Cineplex in SDK3 for... days. Is there any way I can remove SDK3 from the project and inject the SDK2?
Or am I forced to redo the rest of my work in a new project with SDK2?
Im not the most experienced in that area, however i accidentally imported a avatar for reference in a sdk3 world and i had to redo everything in a new project to get it working again. Sdk2 and 3 dont like each other ๐
You probably got something in your script that U# cant compile
You could always try restarting
The first character in the first line is making an error.
Yeah no thats just a bad stacktrace
I've tried to restart several times, but it hasn't been solved.
@lapis sable - for issues with UdonSharp scripts, you should check out the UdonSharp discord which is pinned in #657394610913411084
is there a way to parse a json file with udonsharp
@lapis sable got the same problem, its because the script has another name than the object its attached to. if your object for example is called cube12, you have to name your script cube12
@glossy hornet I dont think the inbuilt Unity JSON Utility is exposed...but you could write your own :)
Have fun with that
aw i was hoping so hard there is an easy way to parse text files
I would make a canny
but it its down due to "maintenance" (not really down, but there was an issue)
i guess im the only one with that kind of problem ๐ฎ propably not worth making a canny, even if i do until its implemented ive got my workaround anyway somehow
I would love JSON utility as well
But it would be pretty useless anyway without proper implementation
As you normally need custom serializable classes
So yeah. Write your own parser. Glhf
mh i dont know if this works like i want to but i will give it a try
FWIW, I'm doing text parsing in the editor and generating the objects I want. That way I've got access to all the JSON/XML/etc libraries I need.
hi guys question, is there a way to make a chair with UDON that lets a player move it around with just their controls?
like literally just a chair that you can move around while sitting in like you're walking
nevermind i found a prefab on ask.vrchat
What's the best way to have a pick-up able item with gravity?
Well, settings
Added vrc_pickup script, and a mesh collider. The item doesn't show up in the world
im currently using SDK3 to start my new world but I noticed they removed the VRC_Trigger script and thats the only way I know how to make a mirror toggle button does anyone know an alternative way to toggle a mirror off/on?
@scarlet lake check out th UdonExampleScene, it's got a pickup with a rigidbody
@vale viper check out the UdonExampleScene, it's got a Mirror Toggle example.
ok, thank you!
how could i sync an on interact event over the network in udon?
i'm trying to create a simple pvp weapon system using udon, but i'm trying to find a way to sync up the on weapon fire (on pickup use down) events
Question does anyone know over here
How to actually make button but in a way everyone can see it an object
@frozen matrix - if you put a button in your world, everyone in that world will be able to see it. If you want everyone to be able to interact with it, check out the 'ButtonSyncAnyone' object in the UdonExampleScene for one way to make that work.
Well I was looking in example udonExampleScene I didn't find what I really I require a button where everyone is possible to see it and yes and sorry for ping @floral dove
And I'm mostly I understand udon Graph
It is very easy way I learned
If someone has a answer to my problem
I'll be very thankful
@frozen matrix what do you want to do that the ButtonSyncAnyone object doesn't do?
@cloud kindle Could you please share your Udon graph? I have been trying to fix sync problem for days but never able to do it. Thanks
oh, i downgraded to sdk2 earlier
but it's simple
create a "Custom Event" node
and write some code that runs when its triggered
then
to trigger it
you need a node
thats called "trigger networked event" or smthg
and set that up
then it should work
I will try! Thanks for your help!
How it works is I press a button and everyone can see it @floral dove
Like showcasing or giving out interesting explanation
and also good morning
Yep - that's what ButtonSyncAnyone does
Wait seriously
Good morning! I'm going to bed soon ๐
anyone work with udon#
and is good with it
i need help syncing a spin the bottle game
i already tried to do the sync position thing
and it i mean it works
but then clients that arent the host cant click the bottle to spin
@hot flicker have the non-owners of the bottle send a message to the owner. The ButtonSyncAnyone graph does this in the UdonExampleScene if you want to use that as a reference.
elaborate please โค๏ธ
Take a look at the graph and the associated section in the Readme, Build & Test the scene with two clients to see it working! If you want to do it in U#, you should be able to find methods and properties for each node.
so like i have some avatars that is saying "Avatar not available" but i can't click on them, or remove them. and its annoying cause i can't add new avatars. can someone help me?
i did try to. but that did nothing. those avatars are avatars i had before. but they became unaviable. that difficult word. but it wont go away
darn.
yeahhh. i need helppp .-.
vrchat can be weird sometimes but I think you should email vrc about that problem or hope you get an answer here
yeah i will first see if i get an answer here
Is this Udon related?
This seems like the wrong place for it. This channel is for Udon related questions. I suggest asking in #avatars-2-general .
okay thanks
did anyone figured out how to play audio using udon graph in latest SDK?
can the noodle graphs be used for the door to private access room?
@hazy tendon scroll up to july 30 @11:05, i got an example there, that may help you
@wide fulcrum I suppose, in what manner? Like a lock?
Oh oops, i just realized that's my local time, which is eastern. If you can't find it I'll repost it
@zealous mason yes is there an alturnite way to the keypad
On that same topic, is there a way to get the username of a local player as a string?
Found it, but I cannot create such elements
audio source does not have pause or unpause methods
@bleak widget yes, using this command
oh, found it. its just bit hidden
ah yeah, i just found it too, Unity Engine > Audio source
Thank you!
np, good luck!
@wide fulcrum the short answer is yes, you can use udon to control doors. You can use player names and network events if you wanted to make it specific to people
@hazy tendon
AudioSource.Pause() and AudioSource.Play() will pause/and play the audio source
If you want it to restart when played again, you could use AudioSource.Stop() or just toggle the gameObject that the source is on I believe
When the Udon sdk splits off from avatar 3.0, will it break existing udon worlds, or does it only break av 3.0's that don't update?
I still have a same problem and I haven't resolved does anyone knows Global toggle
In a way I can activate it and it affects the player
S
So can someone give me an answer for this problem
@frozen matrix Here's a quick network thing that has worked for me, with the event, you can create a toggle
what do you assign to that variable to make it work? I tried self, but it does nothing
Self should have worked, I'll have to give it a better try later and see if i can figure it out.
l thanks you much l finally l can sleep well at night @zealous mason
I was looking for the answer thanks again
Yw =)
@hazy tendon it looks like you dont have an audiosource component in the play action (where it says void)
I think thats just for more options, there is just delay option
@hazy tendon Was also thinking about this some more, probably want the 'on player joined' event, not so much start event
hmm, with player joined, maybe I dont even have to use network event
Likely =)
I will try ๐
Most excellent
So when I'm using this are they supposed to be separate
Or all-in-one together
Global toggle
ok. not sure if udon can do it or this is scripted. how to make water swimming
I'm having an issue with item pick-up synchronization between my quest world and PC world.
I have 2 items currently that can be handled by quest and PC user's. A shark and a red panda
On PC they work fine.
But when a PC person picks up the shark, quest users see the panda being picked up
When quest people pick up the red panda, PC users see them picking up the shark.
Both sides the Udon Behavior (Script) is the same
VRC Pickup (Script) is setup the same, and the items are roughly in the same spot
I also have a question about having multiple mirrors, how would you script it too
Basically, if I have Mirror (A) on, and you turn mirror (B) on somewhere else in the world, it'll turn off Mirror (A)
If I go somewhere else in the world with mirror (B) still on, and turn on Mirror (C), it'll make sure the other 2 mirrors are off -- So on and so fourth
I'm dealing with that for a world I'm making @scarlet lake and there's a smarter way to do it; Put a box collider around the mirror and surrounding area in front as a trigger area, and make it turn the mirror off when they leave that space.
That way you can put as many mirrors in the world as you want and they'll all manage themselves.
That's pretty big brain
Is there a way to communicate variables between instances? Say there are two players who have individually created separate instances - instance #00001 and instance #00002. I have an intVariable defined in instance #00001 and would like to communicate that intVariable to instance #00002.
Nope.
Pretty confident, but no.
Would a possible work around be to have #00001 in both instances then sync the values?
With the new update, is there a possibility to use the radio menu to do actions in udon worlds?
@elfin crown - there's no connection between avatars 3 > udon worlds yet.
I can imagine for a Dungeon Crawler type of world, you can have different staffs having different spells and you have to cast them through that menu
@jade crater - yes, that would be cool but it's not possible for now.
Are udon video players a thing yet? It is the one thing that is preventing me from updating my world with udon behaviors instead of triggers.
They will be coming pretty soon. There is still some considerations to be made by the team, but they will come back.
(Also check pinned messages)
To get an array of all the Players, you can use the new VRCPlayerApi.GetPlayers node / method. You need to construct an empty array of type VRCPlayerApi[] and pass it in. Example scene and graph here:
oh ya forgot to message about it. @floral dove the changes to udon didnt make it into the release notes. unless it was put somewhere else.
@raven peak yeah, that's why I spread the word around. GetPlayers is really the big change, the rest of the updates are pushed to the following release.
there was a list of things in open beta that were being added do you know if that was added. can pull it up one sec.
@floral dove ive not checked but do you know if this stuff was added?
yes, those are in.
how do you make player float in water?
I don't think there's any built in water that players can float in. You could make water and then an invisible floor to look like a player is floating though.
no, there is. i was on a udon map that you can swim
You could set gravity to 0 in your water
thank you
where do i find this gravity?
Hi, I have a little (or big, I don't really know the scope till I ask) question about porting something I made to VRChat
See, I'm developing a 0G locomotion system and game and I wanted to see if I could bring it to this game.
from what I understand the custom rooms and features are made in Unity which is what I'm using, so do I just upload a scene or something ?
or is this not the right place to ask this ?
@shut pulsar it's going to be a pretty complicated conversion for several reasons. For one, vrchat does not use monobehaviours. It uses udonbehaviours, which have a lot of the same abilities but not all of them. Some things are limited either for security (like connecting to the internet) or because it's too complex and just. It supported yet (like custom classes and inheritance).
And the other thing is that vrchat already has a locomotion system, so whatever you do will have to either work with it (such as using setvelocity) or completely overwrite it (by putting them in a station, teleporting every frame, or something else)
Yeah my locomotion system is.. uh.. pretty much just messing with velocity and orientation lol
Right, and you can't change the orientation of the player outside the y axis unless you put them in a station
station ?
A chair basically
But that chair can be a rigidbody, a character controller, whatever
Putting them in a station comes with its own complications though. You would need every single player to have their own personal station. They can't just share a single one which is local to each player. Which is not impossible, just really annoying.
Hm yeah
though tbh I was thinking of making a 1-2 player game or something
like an actual minigame
I would recommend starting with vowgan's tutorials https://www.youtube.com/c/VowganVR
There are two main ways to make udonbehaviours: node graphs and udon sharp. Udon sharp is basically c# that gets compiled down into udon assembly, but because it's not actually being run as c#, there are some differences. Make sure to read the udonsharp wiki for that
so, it's written like C# but names are just changed around ?
No, the names are the same. It's just some functions don't work
Ah
For example if you want to getcomponent of anything related to vrc, like an udonbehaviour, you can't do getcomponent<udonbehaviour>(). You have to do (udonbehaviour) getcomponent (typeof (udonbehaviour))
[I can't share the emote I want to describe how I feel about this]
๐ญ And here I was thinking I could use VRChat as a way to see how people like the idea easely
Yeah for someone coming from the outside with actual c# experience it's jarrign how close but not quite right it is. But as someone who's been developing on vrchat for years, it's Soo much much than it used to be
lol
๐ Someone seems to have made a conversion compiler
this might be my lazy efficient answer
And the fact that they even allow for custom compilers is mind-blowing. If they stopped a year earlier and said "eh that's good as is" we'd have a node graph and nothing else
Someone is announcing this in a server im apart of. Is this true or no?
Your IP is literally how you connect with the entire internet, so it's not some closely guarded secret. There are dozens of ways of getting it, so if you're worried about it just use a vpn. If anything, sdk2 has more capability of getting your IP than udon because sdk2 has video players and vrc_pano which connects to the internet. Udon has no such capabilities of connecting to the internet
Please don't spread mindless fear mongering, you're just embarrassing yourself
I made a world with the old udon SDK before the updates. Iโm just wondering if it needs to be updated or not. If needed, how can I update the SDK without ruining the functions graph nodes or ruining anything in general?
@compact bane Follow the instructions here: https://docs.vrchat.com/docs/updating-the-sdk
If you need to update your SDK, it is important that you follow these steps to ensure the update proceeds properly and you don't have any old/conflicting files. SDK3 For SDK3, you should be able to update in-place. This is especially important for SDK3-Avatars, as you may lose...
I have with different result managed to keep all the variables. just backup before you update, every time.
how do i add a video to work on vrchat. the video works on unity but not in vrchat
Video players are no go now, but soon coming back. Check out the pinned message by the dev, you can get notified when they're back up.
So I have two objects setup for animation. How do I make them default to false/the first keyframe when loading into a world? Then starting it via a button?
@shell siren check out the UdonExampleScene in the VRChat Examples folder and the Readme for examples and info on using Buttons. Once you understand how the basics work, you'll be able to forge ahead with your custom project.
as i mentioned in #world-development i made a script to make buttons for songs in my world and now when i want to name the diffrent buttons, i thought it would just work to add a vrc pickup component but that crashes the button and i will have to reapply the script for it to work again
does anyone know how to fix this or how to name diffrent buttons?
this is how i made the button work with udon
Thank you @floral dove
@rotund patrol how does it 'crash' the button? You can rename the element in the hierarchy.
I think they mean that text thats displayed for interact
BTW it looks like you're using a really old version of the SDK, I recommend updating it to the latest.
yes that is what i meant @fiery yoke , i want the button to show the name of the song when you interact with the button ingame
@floral dove
@rotund patrol - check the pin that starts with 'To change the Interaction Text on an UdonBehaviour:'
ah alrighty thank you
Can anyone help me with installing?
@lean rover what's the issue?
I know this is Udon, But issues with unity and installing an Avatar
having a hard time getting a response
Sorry, wrong room for that.
@lean rover might take more than 20 minutes to get a response. Please stop posting in a bunch of different channels.
O.O well, so far i made a udon that get player stuck as AFK. good thing i can test before update. i try make player float in water. maybe you can help me and i show you what i got...
any help?
@rough beacon , in the next Udon release we'll include an example of making something happen when a player enters a trigger area. Take a look at the example graphs to see how we get a reference to the Local Player.
does it have the combatsystem?
Is OnTriggerEnter working? It does not work for me in U# but it works fine in C#
๐ค
Momo thank for some good news. I do got other thing I can work on tell than.๐
@distant ore OnTriggerEnter works with any collider, but it takes some workarounds to detect the Player vs other objects until we get the PlayerCollision update out.
I see alright thanks!
I seem to be having a bit of trouble. I went ahead and broke apart a prefab so I could work on individual items and make them as pickups. The scripts and everything works fine, collider box is around the item but when I actually pick it up, the collider box is held in my hand but not the item. Any clue why?
I even tested it on a non prefab and everything works that way and I pickup the item with the collider box but on the broke apart prefab it just doesn't want to pick the item up.
can you share a screenshot of components of the item thats not being picked up?
@graceful pivot is it still Prefab? If so, try unpacking it into non-prefab objects.
Nah, I already unpacked it so I'm not sure what's going on with it.
so, the colliding box is being picked up, but the pillow mesh is staying still?
That is correct.
alright, can you screenshot for me the object tree of the item please?
the hierarchy? I'm not sure what its called actually...
In a game right now so give me a moment.
no worries
That's my Hierarchy.
I'm only testing the one pillow right now, the rest doesn't/don't have the scripts on them of course until I figure out what's going on with the first one.
oh, ok, so its not under anything. Lemme look at my stuff and see if I see if anything pops out at me
Thanks!
That's what has been troubling me. I've even tried doing the long work around with the other prefab bed and it does the same thing after I unpack it so I'm not sure what's going on this time around.
is there another object that shares the same space as that pillow?
It's sitting on a bed and that's it. No other objects are in it or on it if that's what you mean?
can you hit the 'edit collider' on the box collider and show me what that box looks like?
well darn, that looks legit, guess thats not it
The thing is, if it's not marked as static, as soon as I go into test it the pillow is no longer there.
oh! put the pillow on top of something with a collider on it
Hm, let me try that and see what happens. I thought maybe it fell through but I could never look under the bed to check hah!
Could just turn gravity off for easy fix since most worlds have pillows as gravity off so people can move them around easier
also i never knew about the static box, ty 1
Oml I was driving myself insane. That's exactly what was happening! I put a collider onto the bed and. . .
nice
Nice
So it was falling through the bed after all hah!
Can you hide nameplates and the selection bubble in a world using Udon? I have a game world I'm thinking about making, but it would require these to be hidden to make the game fair and prevent cheating in public instances.
@jaunty schooner you can ask players to turn off nameplates but no, you can't hide them.
Nameplates and selection bubbles are necessary for safety.
i think TOS say you can not make avatar to hide your name. it will get delete if it dont get you ban.
I'm not trying to make an avatar hide my name. I'm trying to make a world which doesn't display nameplates in specific areas.
No you cant make an avatar that hides your nameplate. But I didnt see any section talking about a world not being allowed to do that.
i think rule may go for same for world. i know some shader can make look like no name tag but just dont do it
however. as long i can find that player and click on him and see who doing it. it make so easy for me to stop a troll
Ahh ok found it
"By using the service you agree not to [...] interfere with security-related features of the Service" ยง9 ToS
Its kinda funny tho that when youre under like 10fps or something you cant click the bubble most of the time, meaning that you cant block someone. So having a bad computer means you technically are interfering with your own security lul
TheHelpfulHelper. i think that is funny too. ๐
@scarlet lake new 'action menu' that came out a few days ago controls those now, check out https://medium.com/vrchat/introducing-avatars-3-0-c9d2de010177 to see what other cool things it's got as well as a how-to use it
Okay but I accidentally pressed something and now its not letting me do anything
do you remember what you pressed? restart vrc?
https://vrchat.canny.io/vrchat-udon-closed-alpha-feedback/p/add-a-force-nameplates-off-feature-to-the-player-api for the nameplate thing, might be worth making one for the selection bubbles too. Safety settings and the panic button work fine, no sense in ruining game worlds in exchange for something you have with or without nameplates imo
so I go to upload my world and it looks like the SDK broke can anyone help me with this and or what to do?
how do i get custom characters
@twin heart SDK broke, go through these steps to fix it, I had to do it, worked for me. https://docs.vrchat.com/docs/sdk-troubleshooting
@scarlet lake try the #avatar-development-links channel for that
so what exactly happens when the master of a world leaves the world? I made a script that is ment to be master only, and displays the master's name. However when the master leaves it blanks on who owns it and no one can interact with it unless the master returns and everyone rejoins the world
the script is small enough i could screencap it
Normally a new master is selected, which is the player that has been in the world the longest.
so if you grab the owner of the object when the master leaves, it should be the new master right?
i had the displayMaster on an update at one point and that broke the script
i also removed it from the update, and had it on the onPlayerLeft, and that also broke the script
@frosty jacinth - what version of Unity are you using? Udon needs 2018.4.20
Yeah, 2018.4.20
Does the "For" node not work for a delay?
No. all of the instructions run in the same frame.
And since a computer can process a lot of instructions per frame you would need a very long for loop. And even then it would halt all other instructions while doing that.
To make a delay you can use a float that adds the Time.deltaTime on every frame (so in the Update event) and when its greater than some value in seconds then you can reset it and do something.
Making a delay is a little complicated.
Yah I used the timer that came in the VRCexamples, but my issue is wanting to get a synced timer for everyone in the world/joins later, so the events kick off at the same time atleast...
IDK if there's a way to have it so once the world is loaded, it starts a timer that will run until the world is closed?
@broken zodiac if you want a synced timer thing, you can have the timer just run on its Owner and then SendCustomNetworkEvent to everyone else whenever it fires
Correct me if I'm wrong, cause I'm still new and learning, but my end goal is to run events that trigger animations mainly for everyone to see at once.
Ex. Every 10mins a Titan just walks by the area everyone is at...
Right now though I have the example timer which uses the frame update to check the time but that isn't synced for everyone since it starts upon them joining the world.
So using what you said makes sense, but wouldn't that mean everyone still has their own timers, so if you join later, we are all still out of sync, yet each time someone's timer hits the marker, then it will run the animation of the titan walking by, so it happens to often/it would spam the animation if a handful of people joined the world at the start...
Is that right, or am I thinking wrongly of how that node works?
Also what's instance? Just trying it out to get it to sync even if my thought about how it worked was right...But I think I am missing something, cause that above doesn't cause it to sync
If you do a check for Networking.IsOwner before you run the timer logic and send the custom networked event, then only the timer running on the owner's computer matters.
Everyone else just listens for that event.
Ok, so it becomes the whole "Master of the World" is running the timer for everyone else?
Question, since I'm new, how does one create a check with the Networking.IsOwner node, before everything is triggered?
Attempting to check chat history/the example scene for anything on it...
I think the graph SyncButtonMaster has it.
So the example makes the number go up if the owner clicks the button...
So for the timer, it would be using the update instead of the 'onclick' event with the button...and like you said make sure it's before the timer and event...
Only thing is do I put the update node here or do I need to use something else for a script like the 'onclick' with the button that uses an update?|
Though I don't think it works...
@broken zodiac - yes, this looks pretty good from what I can see. A good way to test this sort of thing is to start by hooking up the trigger from the Custom Event to a Debug.Log message and doing a Build & Test with 2 clients so you can make sure that it's working the way you expect.
Has anyone had success syncing a short variable? For instance I have a variable with the attributes defined as: [UdonSynced(UdonSyncMode.None)] public short syncRegistry;
I, as the owner of the UdonObject, then update the variable with different Int16 values (like 1234). Other players who need to view this syncRegistry value hits errors upon executing this line of code: if (syncRegistry != 0). I've confirmed there are no errors when changing the data type to an int, but changing it to a short creates errors.
Nevermind, I've opted to use an int instead.
I've confirmed there are no errors when changing the data type to an int, but changing it to a short creates errors.
@chilly aspen That sounds like a bug, is there a canny about it?
I don't think so, I'll see if I can recreate the bug in an isolated gameObject to replicate it. If I get the same results, then I'll make a post about it.
Here's a setup that recreates the bug. Using syncRegistry as int works correctly, using syncRegistry as short breaks the script. I made a post about it.
VRCSDK3 seat stations have this problem where a seated player can still click on their seats. How do we fix this?
Is it currently possible to have a synced video player, in a world build with SDK3?
@lime glade check pins
Hi! I want to have a button in my world to toggle a bunch of furniture colliders. I created an array containing all furniture objects and created the attached script but nothing is happening when I press the button. I have no idea what I am missing... A similar script to toggle some mirror objects (game objects, not components) is working fine.
Hey all, using UdonSharp. I'm trying to manipulate my particle systems, but UdonSharp gives me the error:
Assets\Scripts\ParticleSlider.cs(22,27): System.Exception: Method UnityEngineParticleSystem.__set_maxParticles__SystemInt32__SystemVoid is not exposed in Udon
Does this mean i cannot manipulate particle systems in the current Udon version?
well at least not that particular property
@muted oasis - try using Debug.Log to check the value of the GameObject[] item you're getting, then the Collider, to make sure it's working how you'd expect. To simplify your graph a little, you could use a Collider[] instead of GameObject[].
@spare kindle - Unity switched to a 'module' setup for modifying Particle Systems some time ago, so you'll want to get the 'Main' module of the Particle System, and then you can set maxParticles there. This is how it looks in the graph:
Ahh right I remember that now. Thought the main module was just the particle system itself.
ill have to check, thanks for the info @floral dove
damn so ill have to use the graphs, i dont thing USharp supports GetMain
graphs make me sad
U# should be at parity with the graph
doesnt support getmain unfortunately
if it doesnt you can always message Merlin to fix it
ofc
You get it and then modify a field of the module
yeah, you should be able to modify that module that is returned from the get. It's just a reference so it actually changes the values in the system.
var main = ps.main;
main.maxParticles = blah
hmm
same way it works in c# ๐
oh nice
ive just started with C# 2 days ago, so im pretty unfamiliar with its nuiances
what does var do that a standard reference doesnt
No its not that
Youre trying to modify the return value of a property
which is ps.main
right
when doing var main = ps.main
also, I recommend the U# Discord (pinned in udon general) if you want people to help you write your scripts. UdonSharp is not made by VRChat, which is why I showed how to do it in the graph
and assigning it to a variable changes that operation?
youre creating a new reference to that properties value
and then youre modifying the fields through that reference
got it
im a lowly untyped developer, does the -> not do that?
i think thats for pointers right
C# has no pointers
at least not directly
that would get into unsafe territory which Udon definitely doesnt support xD
haha
so forgive me, i know youve explained it, but im still not really sure why you cant modify the properties of main in-line
i know im missing a base concept here
its a "i dont know what i dont know" thing
Ahh Im not sure but I think that MainModule might be a struct
ah okay gotcha
And when its a struct you cant assign a reference to a struct
ive got to do my c# research
ah
tyty @fiery yoke and @floral dove appreciate the assist
I can't seem to get OnTriggerEnter to work... Trying to make a trigger make a door open/close via an Animator bool.
Here's my graph. Door has a separate Animator for each side of the door, which is why the set bool thing is repeated like that.
@oak trail I'm guessing you're trying to get it to work with players, HelpfulHelper made something with that. Soon there will be a new method though. https://ask.vrchat.com/t/player-collision-in-udon/428
@floral dove I am completely new to udon, where do I get the output from debug.log? In the unity editor console?
Huh, didn't know you could use custom layers in VRChat worlds... Thought you were limited to what the SDK automatically configures.
Nope, OnTriggerEnter (and Exit) still don't work.
@muted oasis if you're in unity yes, if you're in game, the debug goes to files in your appdata folder
@oak trail another method is to grab a players hip or head bone and do an if within collider check
Based off update though, so it runs all the time
@muted oasis - when you're using Build & Test mode, VRChat is launched with some debug flags on, you can then press right-shift, backtick (`) and 3 to toggle the in-game console to see the output of Debug.Log while you're in the world (works in VR and Desktop mode). You can also find your logs in "C:\Users\Yourname\AppData\LocalLow\VRChat\VRChat"
So I'm trying to test out the timer on the owner, and as you just said, launch in Build&Test mode, but once it launches I can't access the in-game console, do I need to do something in unity to allow the debug flags? They show if I just launch in default VRChat with the flags, but need 2 clients for the test...
Hm, that's strange, it shoudl be the other way around - default VRChat is missing the flags but Built & Test should pass them along.
Anyway, for now you can just look in your logs, even while the clients are running.
Oh, I added the flags to default VRChat, but yah the test one didn't have them working...So I mean if there is a way to open 2 of the default VRChats then that would work, otherwise yah I can check the logs, since they should just match up if it's the owner timer sending a log message to everyone...
@broken zodiac - make sure you've set the VRChat Client Path in the settings tab: https://youtu.be/8yaQY0arCnc?list=PLe9XHNvXcouQjg5GULWGLj1tMzeythnQi&t=121
Learn how to make a Build of your World and run it in the client to test your Udon graphs.
Never mind, OnTriggerEnter works in-game, but not in the editor.
@oak trail - it should work in the Editor for non-Player colliders, but there's no Player in the Editor.
Well, it didn't for some reason. I initially tested in the editor with generic colliders to test the animations, but it didn't work. I switched over to player collision detection and now it works in-game.
Do you have a Rigidbody on your colliders?
If a collider moves, then it definitely should have a rigibody
The triggers are all static, they don't move.
Well, yeah. Of course.
Which has a collider
Do the triggers need to have rigidbodies?
If a collider is supposed to move, then it should have a rigidbody.
All i was trying to do was have a proximity-based trigger system that automatically opens a door when you enter it. The trigger itself doesn't move.
So it works in-game with the player. But it doesnt work in the editor...there is no player in the editor...so are you just using another collider?
I tried putting the object in the player layer. Didn't work, all it's checking for is an object on the Player or PlayerLocal layer.
I've got it working in-game though, that's all that matters to me. I probably won't be doing too much to the code that could break it. I play-test frequently so i usually catch any oddities before they become problems.
@oak trail - in order for a Trigger to work, one of the two Colliders needs a rigidbody on it. So if you didn't have a Rigidbody on your test object, it wouldn't work in the editor: https://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html
Thanks. I gave up.
Oh! I get it now. It's the object entering the trigger that needs the Rigidbody. I didn't understand at first.
Yeah, the collider that moves. I couldnt get my point across ๐
sometimes we just need to hear things said a different way
Heh, yeah. I thought you were talking about if the trigger moves around the world that it needs the Rigidbody, for some reason...
I can see why you guys set it up like that, easy way to prevent unwanted collisions with static world geometry, say if you put the trigger partly in the ground or in a wall.
But a collider can be a trigger. So I get how that can get confusing
I have a couple years worth of Unity experience under my belt, I'm just new to Udon.
The way how Colliders work and that method specifically is all Unity native however ๐
I must have forgotten that... An object requires a Rigidbody to interact with trigger colliders. Haven't touched that part of Unity in a long time.
Thanks for the help anyways! Sorry for not understanding what you were trying to tell me all this time XD
Dont worry. I have my moments too.
.so i have a question related to udon but not udon. That post a while back which was all about sharing your udon world which might be picked for the spot light said to post them on the forum. I've done this for several of my worlds, and all of my posts have now been marked as spam and i cant post new posts....whats going on with that?
@worthy beacon I'll take a look.
thanks momo ^.^
It got solved, thx momo!
How do i add audio on an object? When im in play mode it works but not on the vrchat test
Works in unity but not vrc? Is your world audio turned up?
@floral dove I still have no idea what was wrong with my first try but using Collider[] is working now. Thanks for your suggestion. Here is the final script, maybe it is useful for someone else. It only toggles one collider per object which is fine for me.
Yep, looks like a solid collider-collection-flipper, thanks for sharing!
How would i go about adding a say, 1 second delay to something? My door system "loads"/"unloads" (in reality it's just setting objects active/inactive) different rooms, and without the delay, the previous room deactivates before the door is done closing.
It would be trivial if i could just code in a Coroutine to handle it, but the graph is making things tricky.
@oak trail - check out the TimerCube object in the UdonExampleScene, it's got a 'SendEventOnTimer' graph you can either use directly or learn from. Since you're new to Udon, I highly recommend you go through all the objects in this example scene, and the Readme that explains all the graphs, as it's got lots of reusable graphs in it.
Many of us are ๐ You can always change your habits though.
Well, more so speedrunning through tutorials, i don't always outright skip them.
We.. still don't have any eta concerning videoplayers and ways to get a picture from the web ? w
Not officially no. But I would estimate that its this or next month.
But thats just an educated guess. Soonโข๏ธ
Been a "soon" thing since a while now, i'll keep waiting then ! Thanks for the fast answer
Yeah. Unfortunately making a web connection is spooky for a security engineer, so they need to be air tight. Plus Networking on Video Players is hard, plus making the UI, plus integrating it into Udon. Its a bit of work.
Is it possible with the new avatar 3 sdk to override the animation of the avatar with a seat in the world? Like in sdk 2
A pickup item thrown off a map should throw OnDestroy right or is there something else i can branch off for when it respawns itself?
@final valley the UdonExampleScene should have examples of most of the prefabs. This looks right I think.
Anyone here know how to get text to show on you object when highlighted? EX: Light switch with text that toggles from on and off depending on if the object is active or not?
@keen wren you can use a World Space Canvas and UI Text field. Check out the ButtonSyncMaster in the UdonExampleScene for a working example.
@edgy blaze what else are you expecting?
the vrc control panel and splash screen
It looks like you've got 40 errors in your project. Any errors can get in the way of the SDK windows and tools functioning properly
So i have to fix the errors
Yes, that will most likely fix your issue.
these errors are crazy man i dont know how to fix them
Where are they coming from?
It looks like you maybe imported something into the wrong place? Your Library folder should be outside of your Assets folder.
All i have done is imported things from the unity asset store by clicking import
I recommend you start by learning the basics of using Unity and Udon. Plenty of good Unity tutorials around and you can start with this playlist for Udon and then work your way through the UdonExampleScene and readme: https://www.youtube.com/playlist?list=PLe9XHNvXcouQjg5GULWGLj1tMzeythnQi
What package did you import?
it seems like the shader is having a problem
but i removed the asset and the sdk still didnt show control panel
Yeah, not sure that those shaders will work in VRC. The custom scripts definitely won't. But all the errors you showed had to do with Packages for Rider and Timeline, are you using those?
You can try closing unity, deleting the Library folder from your project and then opening it back up.
these errors seem more closely related to the problem
Will the library folder delete anything in my project?
Those are mostly warnings, only the red one is an error. The Library folder is all stuff that's auto-generated, it's always safe to delete with Unity closed.
Where is it located
In your Project Folder. If you're just learning Unity that's great and I highly recommend you do some basic Unity tutorials to learn about the UI, folders and files so you can use it with VRC creation.
Oh good! Yeah, sometimes the Library folder will wind up with some bad cached data when something fails. It's a safe thing to try if you have errors with something in that folder.
no the errors are still there i meant the world just disappeared
You probably just have to reopen the scene
Yeah, looks like you imported stuff into the Sample Scene, now you have no scene open. Again, I suggest you go through some basic Unity tutorials - everyone starts somewhere, and I think you're trying to skip ahead. Take some time to learn the program before you add in VRChat world building on top of it.
How do you make a teleporting door in the new version of udon?
my particle system doesn't want to collide with players anymore any ideas?
@proper oar - does it work with the mask set to 'Everything'?
I have a demo scene like this that works:
I tried everything as we'll still phases thru other players you can only hit playerlocal it used to works idk why it dosent work anymore
I placed a box colider on the ground on the player layer and the particle collided with it
I'm very confused
Remote players don't have capsule colliders, just simple sphere colliders at their feet. You need everyone to resolve collisions locally.
Did these issues ever get fixed? I seem to remember that someone said they where, but I can't find where they said that https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/sendcustomevent-fails-on-gameobjects-that-where-instantiated-in-the-same-functio https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/588-heap-values-are-not-initialized-in-some-cases-so-getprogramvariable-returns
@worn kestrel - I'm checking on those and will update them later today if they've been fixed, thanks!
Okay
@worn kestrel - looks like both were fixed a few releases ago, I've updated their statuses now.
Thank you
for making a vrc world, would i use vrc 2018.4.20 or 2020.08.07
@tropic owl Unity 2018.4.20f1 is the right one to use. You can check out this video series for all the info on getting started:
https://www.youtube.com/watch?v=8gXzBTqlP6I&list=PLe9XHNvXcouQjg5GULWGLj1tMzeythnQi
can i use the render pipeline for unity shaders with the sdk3?
@tropic owl - VRChat uses the legacy rendering pipeline
That's right. VRChat provides some shaders that should give you good performance with our pipeline, including some mobile ones.
That is still the same node, it just looks different now.
Try searching for Network then GetLocalPlayer
I have already theres nothing even similar
Heyo, just wondering if anyone could help with a seemingly esoteric problem (which, considering I'm not very experienced with neither Udon nor Unity, could actually be a fairly simple problem instead
): Specifically, Udon is throwing exceptions on every build. Specifically, Object reference not set to an instance of an object is what's come up pretty much every single time. https://pastebin.com/ptdpdkan and https://pastebin.com/YurUZSaW for the full error messages.
What I'm trying to do is have an automatic door, where when a player nears the door it opens. To do so, I have two Udon programs: One to make a rigidbody follow the player, and one to set a variable in an animator when the rigidbody enters a box collider. AFAIK the first program is working fine (I tested the world in VRC with it), so I'm pretty sure it's the "door opening" program that's causing problems. I can include the other node graph, or the Assembly Code, if needed.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Parsing the error codes for a little longer, I should note that these are Unity errors. Specifically, the errors likeRC.Udon.VM.UdonVMException: An exception occurred during EXTERN to 'VRCSDKBaseVRCPlayerApi.__GetPosition__UnityEngineVector3'. Parameter Addresses: 0x00000003, 0x00000001
makes me think I need to run this in VRChat to actually test it. It makes sense, since the error is that the object (in this case, the VRChat player) doesn't exist and thus cannot be referenced.
Have I just answered my own question? (ie, can someone confirm or deny my suspicion please?)

@fiery yoke nvm I figured it out thanks to you
@edgy blaze this video might help you understand all the ways to find nodes, and what has changed: https://youtu.be/IVjEx_H5BZc
Have I just answered my own question? (ie, can someone confirm or deny my suspicion please?)
@modern siren
Can confirm: Having instances of the object your referencing does tend to help prevent errors when referencing said object.
In other words, I've made a test build of the world and it's working perfectly.... I feel kinda silly for posting such a long problem now.
The PlayerAPI doesnt exist in the editor. So when referencing it, youre referencing null :P
I'm used to reading g++ compile errors so I'm not used to the error messages actually being useful 
Well its not a compile error, but a runtime error
is there a way to use udon to reset chess pieces to their og spot? or anything in general
I think you could have a box with an interact event on it as well as a start. On the start event, record the position and rotation of objects to variables, on interact event, move the objects to the saved locations.
I actually got a checkers board in my world that would benefit from that, I'll make it later and share it with you
ah alrighty, oh that would be amazing if you could
can someone help me with this udon script? It seems like it's not even updating. I have 2 variables in the script but it only uses 1. The intended goal is to toggle active on the first object and disable the second object.
expand both variables, probably only one is public, gotta check public on both, then compile
@rotund patrol Here we are, tested in unity, not in game tho since I'm at work and shouldn't be doing udon lol
Its very important that your array sizes are set in the public variable area, in my case I had 24 checkers chips, each of them is called out into the array of game objects, you can drag and drop them in
good stuff
Thanks
i kinda understand some but most of it goes over my head lol, oh alright, like just to get it out there im a big noob when it comes to this stuff XD
s'cool, we here to help
so should i just copy the stuff you have already done in the pic and then find my arrays and set them to public?
if i understand everything correct
This is the copy, just select all and paste into you udon graph
not sure if it includes the variables? I think it does. Once it's in though, compile it so the public variables show up on your udon behavior
(under inspector)
i cant paste it in
i think im doing something wrong
like when i tried to paste it into the graph directly it did not work
oh, try opening the graph and just hitting paste there
like in the area where the nodes go
๐
it worked for me, perhaps you need to update to the latest udon?
I just updated today
cool
do i need to remove the other sdk before updating or should it just work to reimport it and nothing gets damned?
ah well i guess we will see lol
probably to be safe, remove it https://docs.vrchat.com/docs/updating-the-sdk
If you need to update your SDK, it is important that you follow these steps to ensure the update proceeds properly and you don't have any old/conflicting files. SDK3 For SDK3, you should be able to update in-place. This is especially important for SDK3-Avatars, as you may lose...
oh lol
If you are upgrading from a post-2020.3.2 SDK3, you can import the new package over the old one. If you run into issues, please try reinstalling.
saw that so it should be fine
i updated now and well same thing
it does not work
worked now
What do I do if it wonโt let me log in even if I am using the right username and password
This is what it is saying
In the inspector window, where your udon behavior is defined as a component, once the pasted in code is compiled (button on upper right) it should show the arrays there
Like my picture had
this?
okey i got everything to public
but should all the chess pieces be in one child and that child has the udon component
Nope, each piece
Also set the size of the rotation array and object array to 24 too
If you have 24 pieces that is, i can't remember how many pieces there are
Alright then change those 4 numbers to 32
Positions size = 32, rotation size = 32, object size =32 and array size = 32
Then drag and drop your pieces into the objects array
so right now one of the towers has the udon script in it, i should just put in all the other pieces into the other slots if i understand correct
I don't understand. Did you put this udon onto a chess piece? A button?
Oh nope, you want to put it on a button
alrighty
Then drag and drop the pieces into the array slots there where it says "none (game object)"
You also have the zero slot
oh yea right im dumb XD
Nah it's cool
okey so then it is just for me to put all the pieces into that and then the button should work ingame?
I hope =)
alrighty, ill do that and test it, and then ill report back to you ๐
thank you for all the help
Np
Can someone help me? I can't figure out how to make Soundpad work in-game
Is it possible to check for collision with avatar hands? I don't think they have any colliders so I was just wondering
@bleak widget - you could add colliders and move them to hand positions yourself.
Oh? Is that part of the local player object?
yeah, you can do VRCPlayerApi.GetTrackingData to get World Positions for the Left and Right hands.
Even easier would be to have your player grab VRCPickups, but then they have to 'hold' onto them the whole time, which may not be ergonomic.
Thank you! There is so much you can do with that. Does it go down to the individual finger position as well?
it works @zealous mason
Awesome!
Hello, I have a program that takes a game object and updates its transform on an interact. I'm using that game object as my spawn transform in VRCworld. However, vrcworld doesn't move my spawn, it keeps me at the original transform of the game object even though I can see the object moving. I'm assuming it doesn't update the spawn transform on runtime. Any other way I can change the player spawn in-game with udon or am I doing something wrong?
Edit: Nevermind, it works, you just have to click respawn in the menu versus falling. Weird.
Does anybody else have trouble when building and locally testing a world? Everytime I try it, I get a brief flash before it takes me to my home in VRchat. Not really sure how to proceed from here, as I need to test some stuff in game to make sure it works :/
I even tried with the built in Udon prefab, but that produced the same result, so It doesn't seem like it's a problem with my world
@silk scarab have you gone through the steps in the pinned Build & Test instructions video?
specifically, setting the path to the VRChat client is the fix to most issues
Yes, I have
It unfortunately didn't fix my problem
I don't know if it is of particular note, but when I hit build and test it minimizes (when I click non-vr mode) to show my login screen (on unity), which disappears when I exit VRchat, and shows that I am logged in
I've logged out and relogged in and it still happens, and I have tried both with VR and without
I had this issue when I first started and it was because I didn't have the EXACT version of unity needed for the sdk
Unless they have sub version I have the right one, 2018.4.20f1
Unless the docs on VRchat are wrong ๐ค
Make sure you dont have any errors in your console
The only ones I get are, "Trying to set empty graphics device types list for platform MacStandaloneSupport; setting default list instead", replaced with Linux and IOS in the three other errors of that kind
No the yellow ones are warnings. You can mostly ignore those. Errors are red with an X
Ah, then no errors.
Hmm...usually when it cant load a scene and kicks you to your home world, then the scenebuilder failed. Which is usually caused by having errors
It puts the file in the AppData/LocalLow directory iirc
@scarlet lake - this channel is for questions about Udon only
All moderation inquiries regarding a ban must be sent to moderation@vrchat.com from the original account holder.
More information here: https://help.vrchat.com/kb/article/28-i-ve-been-warned-kicked-banned/
If I made an open world with a lot of udon programs and a whole day night system would that be enough for udon showoff?
I'm trying to set up a toggle in the graph. I select gameobject as a variable but there is no gameobject.setactive to be found either on noodle drop or search? Any ideas?
Hey i was wondering i made some old video games in unity with only c# was wondering if i could easy make into a udon world or would i have a lot of thingโs to convert into udon. I have heard its based in c# but I donโt have any udon experience.
@pure sail type gameobject then click GameObject in the search window. Then type active and you'll see SetActive
@rich widget Sure you can, just got to be aware that some things don't work in Udon.
Noice ill just hafe too experiment with it and figure out what does and does not
Since you want to convert it from C#, I would recommend using UdonSharp then
is there something within unity that make 2D always face to player?
i am working with udon
thanks phax
ya. i use that and find my self with cut out problem. getting closer ๐
well, it a custom file. it work. it seem not to resize :((
time to move my problem to shader
wdym?
Nvm, I decided to use Udon# instead.
I just discovered an issue where creating a node of ParticleSystemMinMaxCurve[].Get() breaks the graph editor. It doesn't show nodes properly anymore, and a lot of times it will only show the noodles that connect flows and ports, but not the nodes.
I also get the following message in the Console: ArgumentNullException: Value cannot be null. Parament name: key
Further from this point none of the graphs in the project can be edited properly and the only way to fix this is to delete the graph in which I initially tried to create the ParticleSystemMinMaxCurve[].Get() node. I can't even delete the node because the node never actually shows up in the graph.
Wanted to report this bug, but also wanna ask, how am I meant to undo this? Deleting the entire graph is not a good option, especially if the graph is big and complex and has other logic. And I can't delete the node that caused the issue because the node never shows up.
@restive dust I'll take a look. FYI you could switch to debug mode in the inspector and remove the breaking node from the graph's nodeData
Oh wow didn't know that! That definitely helps. I created a new node graph and opened it so the editor was showing that graph instead, and then selected the node graph that caused the issue, switched to Debug and deleted the node from the Inspector. Thanks Momo!
๐ฉ
Hi! I was testing an Udon world that wasn't updating its test build versions for me, so I closed Unity and reopened the project. when I did that, the build window under the VRC sdk disappeared. I can't login or test anything at all now. How do I fix this?
@frank sky any errors in the console?
a lot.
it looks like some unity component quit and now it won't work
I think I lost this world.
stuff like: Assets\Udon\Serialization\OdinSerializer\Core\DataReaderWriters\Binary\BinaryDataReader.cs(1808,28): warning CS0649: Field 'BinaryDataReader.Struct256Bit.d2' is never assigned to, and will always have its default value 0
Assets\Udon\Serialization\OdinSerializer\Unity Integration\UnitySerializationUtility.cs(2318,46): warning CS0618: 'PrefabType' is obsolete: 'PrefabType no longer tells everything about Prefab instance.'
there's another one
there are 49 errors, about
I think this is actually the second time I've lost a project to the sdk partially disappearing, sadly
Another time this happened and I lost my world, so I quit building it
Those are warnings are there any errors there? Just the errors matter most of the time.
one sec, I'm reopening the project
Assets\NastyWizard_Depth\Demo\PostProcessing\Editor\PropertyDrawers\MinDrawer.cs(6,34): error CS0104: 'MinAttribute' is an ambiguous reference between 'UnityEngine.PostProcessing.MinAttribute' and 'UnityEngine.MinAttribute'
just the one error
Well there we go just delete that Assets\NastyWizard_Depth\Demo\ folder and you should be good
Old post processing version not compatible with current version of unity
ohhh. wow I didn't know that makes the sdk vanish
Any compile error will do
And if that happens you need to solve them
Deleting would be the easiest way usually if it's something unrelated to the sdk
thank you both for your help!
Also, I highly recommend learning to use source control like Git if you don't want to lose your work.
not sure if this is in the right place but im making a bow and got the animations and all dones tho i need to make a trigger that activates the animation for the bow and also shoots the bow, since most of my things in the world are udon i was thinking if its possible in udon
Can someone help me with Soundpad? I can't make it work in-game
On the "send custom network event" node, does target "owner" mean the owner of the instance or the owner of that udon program?
The owner of the GameObject that the UdonBehaviour is on, which youre sending the event to xD
right
Wording isnt my strong suite, but you get the point
i did get the point yes ๐
Is the video player still not working?
Not yet no. Should be coming sometime soon
Thx
@dark blade you can vote on the Canny to get a notification when they're in, it's pinned to this channel.
@scarlet lake is this a Sound Pad you are building? What have you tried?
Pretty sure they mean Soundpad on Steam.
@floral dove A soundboard called Soundpad, i tried many things but it still doesn't work. Idk what to do anymore
Ah, this channel is for people who are building things using Udon, not for third-party apps, sorry.
@floral dove where can i ask about this then?
Maybe get in touch with the people who make the app? You can also try #user-support-old
has anyone made any alternative scripting or anything for video player until the actual one comes out
No video player component, so no way to make a alternative.
@dark blade the Video player was blocked for security reasons, so there's no way to use it until it's unblocked. Won't be too much longer now.
ok. i lower gravity but i want to make them float. can it not go any lower than 0?
Will VRChat ever have Eye tracking with the HTC Vive Pro Eye headset? They have eye tracking on desktop version which I donโt understand. If VRChat could add finger tracking with the Valve Index they should at least add the eye tracking for HTC Vive Pro Eye headset in their game.
it's not currently planned AFAIK @scarlet lake - also FYI, this room is for asking questions about building things with Udon.
Sorry @floral dove I didnโt know that. What is a channel for asking general VRChat questions? This server has quite a lot of channels for questions.
You can always start at #faq, since the post there will guide you to some places where you can make official requests, get support, etc. You can track the Eye Tracker feature request on our Canny here: https://vrchat.canny.io/feature-requests/p/real-eye-tracking-for-vive-pro-eye
Just wondering how to make an object able to be picked up from any point on the object instead of only the middle
take your time on Video player. it very useful but when come to security risk. that far more imported!
If I set the "toggle mirror" button to be off when a map begins, shouldn't I also sync that with the mirror object by setting its mesh render to off in unity?
How do i get audio to work instead of a video player with buttons connected to a plane
@frank sky - yes
yaaay I guessed right! thank you!
@dark blade - you probably want to use the AudioSource nodes: https://docs.unity3d.com/ScriptReference/AudioSource.html
is it possible to animate UVs for a mesh? like, say, make a floating river? or lava....
You dont "animate UVs". You can animate the texture offset. Or just use a shader that does that.
๐ค
Does the VRCPlayerApi.playerId start at 0 or 1? Would assume 0, but Im also to lazy to check right now lul
Tested it. It starts at 1.
just use -1 if you mean no one
No that wasnt the problem
Hey there, we are currently working on a bigger project and we noticed quite a big limitation. It seems only 11 branches can be used in a single script. Why is that the case? Is there any way to raise that number?
Its a bug in the graph compiler. For some reason branches introduce an byte offset, which isnt supposed to happen. You can use other compilers like UdonSharp, that compiles C# code into UdonAssembly (ofcourse under the limitations of Udon).
Thanks for the information, I'm going to try something out really quick, brb
Okay it compiles fine, as it seems. Does that mean I can ignore the warning completly then?
Or is there any way to transfer the scripts we already created to udon sharp?
You dont make scripts with the graph. You make graph assets that are compiled into assembly instructions.
So I dont know how you would want to "transfer" that into C# code
Okay thank you for your help. We are not going to recode the stuff we already did for this prototype but for the next one we're probably going to use udonSharp. As long as the graphs still compile and work fine with more than 11 branches we will just ignore the error for now. Is this in the pipeline to be fixed?
Probably so. The graph compiler has some pretty big problems at the moment that have persisted for quite a while though. Apperantly its not important enough idk.
Or hard to fix, to be fair.
Yeah we found another major one today: https://ask.vrchat.com/t/why-your-time-get-time-node-is-probably-broken-and-how-to-avoid-it/2738 But I think they are doing really good work and it's defnitly not something productivity breaking
We recently started prototyping through Vrchat and found something we wanted to share with you guys since we couldnโt find another post on the forum related to this problem. When using the โTime get Timeโ node do NOT use the same node if you have multiple branches leading to ...
Or hard to fix, to be fair.
@fiery yoke Yeah I guess not a lot of people have the expertise to program on that level
But still. Thank you so much for your help, you saved us a lot of time and replanning on how to structure this.
Nevermind it is script breaking. I guess we are just going to rewrite the scripts in Udon Sharp
Not saying that is the only or best option. But it is a option
Yeah. Otherwise We'll just release it without control functions and the players need to know the rules beforehand. But that would be bad for the userexperience so I hope that Udon Sharp is going to be the right solution
U_U i bougtt a udon unity package from someone, and i tried pushing play and i think scrips are missing so its not working right , and i have absoultly 0 knowlage on scripting so idk what to do
of course im trying to contact them but i think laungage is a barrier
and they havent responded so
@fiery yoke what issues are you currently having with graph compilation? I believe the only known one that we haven't fixed is the unaligned address issue.
@brittle swift - what package did you purchase? Do you have errors in your Unity console when you press play? You can learn some of the basics of Udon here: https://www.youtube.com/playlist?list=PLe9XHNvXcouQjg5GULWGLj1tMzeythnQi
What was the security problem anyways for the video player
it was this
and, when i put the sample scene in , and pressed play on unity the objects wont move
i mean they sink rather
all i did was put the sample scene in unity after importing udon sharp and sdk packages
then i clicked play, the objects sink instead of float
@brittle swift have you tried a Build & Test?
@dark blade the video player would send a GET request to any URL, including private servers.
i still sink
after build and test
i do have these errors, now
guess its a missing script,
Did you import udon sharp before importing that asset?
so dumb question, but is it possible to get json data via http with UdonSharp?
Is anyone having trouble using MaterialPropertyBlock nodes like SetVector, SetColor, etc.? It keeps throwing 'Object reference not set to an instance of an object' exception, though I've a plugged a MaterialPropertyBlock variable into the 'instance' port. I checked the heap dump, and the 'instance' parameter shows up null. Don't know if that's an indication of a problem.
@upper sluice sorry, no http access in the SDK yet.
Is it planned? @floral dove
It's not on the roadmap right now, but it could be in the future.
Kinda a bummer
@restive dust You have the MPB Type node there
you need to construct a MPB
and then use that instance
Or wait thats a variable?
It's a variable.
Still need to construct it though...I think
Ah I was wondering if the constructor could be the issue.
Didn't think it would be necessary because it's a variable.
Only type-value variables are initialized to their defaults
Reference-type variables always need to be constructed.
@brittle swift yeah I'd take a look at that prefab, and get in touch with the author of the script.
unfornetly they speak japanese, so this will be fun oof..
Ok yes the constructor was the issue. I kept searching for a way to do it earlier but couldn't find a node for it in the list, then I dragged the output of the variable out and it suggested a node that I could plug the constructor into. It works fine now. Thanks Helper!
Yay for noodle drop!
is there faster way to remove Missing?
If you're using SDK3 you're meant to create your logic using Udon.
Hey guys, I was wondering if it's possible to make a player tap into a different camera and see the world from a different view
Technically possible. But not intended behaviour, so its quite tricky.
how would you go about making it theoretically
Disabling and Enabling a Camera Component every frame will force it to render last, if done correctly.
The other camera is still rendered tho
so its not really efficient
How change interact name on udon?
Quick Q, I have not installed the newest version of SDK3 yet, But are the URL players working yet?
URL players have not been added to udon yet. Rumors say very soon though @proven vessel
change the inspector to debug mode in the top right @past ravine
@proven vessel - check the pins for this channel, it's got a link to the Video Player canny report you can vote on to be notified when they are re-introduced to Udon.
Quick question, where would I find a graph node for assigning a value to a float variable?
Ah set program variable. Found it with a bit of searching
@bleak widget yes, that lets you set a variable in another UdonBehaviour. For variables in the current behavior, you can just drag it from the Variables window to the graph and hold down Ctrl.
Oh that is much easier. Thanks!
Hmm... oddly, I used the new method you suggested but then my code no longer worked. I had it set up the exact same way, just switched out the blocks, and it stopped working
weird - any errors?
Nope, didn't see any. World loaded just fine but the script didn't work any more
@past ravine Right click on the word "Inspector" on the tab and select Debug, then it'll be available.
@distant abyss On Click on your button needs to send the name of the event that you want to access.
I might need to update this.
https://youtu.be/FWU7ckfkUrw
Interacting with modeled buttons is fine, but when you have a lot of buttons and such all in one place, you may want to integrate them with Unity's UI system. Here's how you go about doing a basic UI setup with custom events!
00:35 - UI Canvas Setup
05:40 - U# Slider Script
...
@cunning mist I just want to say your videos are the only thing keeping me sane while working with udon. Thank you so much!
No worries, glad to help ๐
I have like 8 videos planned but their content will be wildly different after the player collision update so I'm buying time until that happens
I can't wait to see them man, I watched your video on flying in udon I think like a few days ago when it came out. They help so much
Just waiting on the video player update lmao
We all are lol
Yeah what's up with the video player? I just started makingmy first world right after that last big update a couple weeks ago. Does streaming video into a world not work at the moment with latest sdk?
@hearty linden check the pinned messaged regarding video players.
So I'm having trouble teleporting pickup objects in udon. Sort of similar to how TeleportTo in sdk2 wasn't really "clean"
Right now, I have the owner of the object just set the position of the pickup transform, but for the non-owners they see the pickup slowly sliding across the ground toward the target position
and sometimes it just never reaches the destination at all
Until the owner or someone picks up and drops the object of course, then it's all synced up as usual
I tried jiggling around the rigid body of the pickup to try to kick the position/velocity sync into gear but that's not really working out for me either
It would be awesome if there was something I could call to insta-refresh the position sync?
Hey, so when I sit in a chair, I sit like a good foor above it for some reason. anyone know how to fix it?
@jar we have some sync updates in a beta test right now, including one to fix that particular issue.
@timber lion Apperantly momo didnt ping you correctly and yes, currently the position sync is always lerped, plus there is a problem with rigidbodies falling asleep causing sync to fall asleep. Will be fixed at some point as momo said.
Cool yes momo just reached out
@distant abyss if you haven't fixed your problem yet: Just put the gameobject of Player Enter Location a little more down under the chair, this works for me
So little question from me about network events or doing stuff and it will sync with other players:
How does all this work?
Im trying to do collaboration-map so players are forced to work together. Problem: When Player1 presses a button which will activate a object for example, nothing happens for Player2, only Player1 sees the object
Hey everyone, is there a simple way to detect player collision with a trigger ? OnTriggerEnter is triggered but the collider object is null so I can't be sure it's the player. Also, if I need to distinguish between two players during the collision, is there a way or do I have to rely on the collision happening locally ?
Currently I do a distance test with the localplayer to see if it's in the collision radius but that does not seem very clean ๐
Not yet but soon.
In the meantime you can refer to this:
https://ask.vrchat.com/t/player-collision-in-udon/428
thanks!
oh well so other should not be null? Because when I playtest, it's always null ๐ค
Yes
ok that strange, will try again. Thanks ๐
They protect all objects that are not "part of your world"
So you cant access the player
In your example you are able to access it though
oh I mean, "Collider other" is not null in your example, whereas in mine, it is.
and I suppose other is the collider on the player
Other is still null
Ohh yeah the first part is a little hack
however that wont work much longer
Refer to the section below that
ok thanks, will look into it more closely! also, cool that an official solution is coming soon ๐
@tawny island take a look at the Sync examples in the UdonExampleScene and the accompanyingreadme that explains them.
Does anyone know how i can use Udon to make an NPC wander around my map?
@scarlet lake You can either look at Nav Mesh Agents or write the logic yourself
I've never used Nav Mesh Agents, how do they work?
I there a way to know if the player has their menu open?
I've seen worlds that can detect that but I can't find how
@vale current Most worlds use input detection and a lot of dedicated things, like if a player has moved after pressing the button etc. There is no trivial solution to that (yet), but there is a canny iirc
Is there a way to have a string variable input for a custom event listener? There is one for sending the custom event but doesn't seem to be one for listening
@tawny island Thank you so much man I appreciate it! I didnโt think of that
@bleak widget - no, The Custom Event listener names are basically your Method names. Make those specific to your use case, and you can make the sending end be the variable one. I tend to use a generic name when I want things to be easily reusable, like 'Trigger' or 'Fire'.
@floral dove The reason I asked was because I have an multiple instances of an object that I want network activation on but I don't want it to activate across all the objects at once
I have no idea what you would try to achieve with such a thing, but technically you can use a synced string to achieve something like that
However that is a quite elaborate setup and there is probably an easier method to achieve the effect you want
I suppose I could just have different network events for each object... I only plan on having a couple of them so I think it would be ok. Not very object oriented, but it would at least be simple
Well if you want to do something for some objects only, then those objects are "different" in an object-oriented perspective.
Youre being very abstract, so cant say much more than that.
Let me try and elaborate more then, sorry.
I have a pickup with a particle system on it. I want the particle system to activate on that particle system to activate for everyone on the world when one person "uses" it. However, if I have multiple copies of that pickup in the world that use that same script, I don't want all of the particle systems to activate at the same time
Thats not how Events work
If you call an event on one UdonBehaviour it will only call on that one Behaviour
that goes for local as well as networked events
You actually HAVE to call events on all objects individually if you want to do something like that
I'm stupid haha. Thanks for that info. It makes it a LOT easier
Youre not stupid
thats something that could easily be interpreted that way
The only thing that indicates that it is instance based, is the instance parameter.
Since there is...No documentation
That is why momo said he names them generic like "fire" is because you can use "fire" across multiple object with no issue. Is it per object or per script instance? Can you use the same name across two scripts on the same object an not have them interfere?
Yes
I dont really agree that naming them with something generic is really that helpful, since most of the time you dont really have that sort of interaction between different scripts. But it helps to have a sort of "standard" for better understanding when sharing scripts/graphs.
Only really holds true for very very generic things. But for that its good yeah
Right yeah, I try to use names that make sense, similar to function naming. Is documentation something that is coming later or should I not hold my breath?
Well...supposedly...at some point ๐
Probably when Udon is not in Alpha anymore
I think the initial doc on Udon had a little bit of an explanation on the basic mechanics
The one in info
Maybe we need community documentation?
Yeah...there were attempts
but you cant document anything more in-depth without thorough testing and understanding of the backend
Plus its all speculation at that point
True true. There is a lot of understanding about how it works through the people that are fairly familiar with it like yourself. Maybe this Q&A style discussion that we have here is the best solution for now
I mean most of it is just a good understanding of the Unity Engine and C#/Mono
The only blackbox is the VRChat specific stuff like Networking and PlayerAPI
Right. That is why I have felt ok doing most of the stuff that I have. I have used unity and c# off and on for a while now so know a lot of the basics there. Moving that understanding over to udon wasn't too bad apart from the vrc specific items
Oh, since we are on the topic of VRC networking. Is there a way to to sync up events for people that join the world after the original network event was called?
Have a synced variable that gets checked on player join that can be used to then align the events?
You cant check it on player join, since its not guaranteed to be synced just yet then
You have to check it OnDeserialization and post-pone your game logic until the player has fully initialized
Ooh thanks for that one. I would have banged my head on the wall trying to debug that
Yeah another essential part is having worked with Networking logic before ;D
Essentially everything is async and you cant rely on anything happening at any point in time xD
Are there any debug tools that you can use for this stuff? It doesn't seem like the unity debug console is gonna be of any use here
What codebase is SDK3/Udon based on?
Or is it like UE4's console-based coding where you just link blocks of text representing code together?
Udon is a virtual assembly language similar to how Java functions. Udon Programs are assembly instructions that are assembled into byte code which is then executed in a Virtual Machine/Environment. The actual calls to the C# API is done by calling a wrapper function inside Mono.
@keen sierra Hope that helps you
Gotcha. Java-inspired, but C# backed. Something something Javascript half-measure.
๐
Thanks, I was curious to see if I'd have difficulty acclimating to it.
There is a community created compiler called UdonSharp
it compiles C# code into UdonAssembly (constrained by the limitations of Udon)
Its very close to C# but with a bunch of functionality removed.
Of course, considering also the constraints on the avatars to prevent code injections and malicious intents.
Udon is world only
