#udon-general

59 messages ยท Page 24 of 1

fiery yoke
#

its a standard Unity layer, that is not really "used" by VRChat

vernal phoenix
#

k

#

fingers crossed

solar steppe
#

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

vagrant coral
#

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?

zealous mason
#

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

vagrant coral
#

Ill shall look into that. All the buttons run the same script, and only a few ammount of them stops working after some time.

hushed gazelle
#

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.

vagrant coral
#

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

hushed gazelle
#

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.

vagrant coral
#

Sounds like a good plan indeed

hushed gazelle
#

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.

vagrant coral
#

Yup that part il aware of ^^ but i never thought of using the mouse klick event ๐Ÿ˜„

hushed gazelle
#

No worries, just making sure you're fully equipped to diagnose it. It's how I test my pinball machine.

vagrant coral
#

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 ^^

hushed gazelle
#

Yeah, network events don't work in Unity sadly.

fiery yoke
#

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.

outer rune
#

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?

cunning mist
outer rune
#

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 ^^

floral dove
#

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.

outer rune
#

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?

mighty fjord
#

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?

solar steppe
#

Yo, how would i iterate through an array of audio sources to mute each of them

#

Nvm

#

(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

zealous mason
#

Can you show the audio sources?

#

Also what's triggering?

solar steppe
#

(a box collider in a room)

#

(that has the udon behavior in it)

#

wait

#

I assume players trigger that, right?

#

@zealous mason

zealous mason
#

@solar steppe Players do not trigger that =)

solar steppe
#

Damn

#

Is there a way to make something similar?

zealous mason
#

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

solar steppe
#

Ill just wait on that since

The good news is that weโ€™ll have proper Player Collision events in very soon.

sick dawn
#

i have a question about mirrors. how do you set it up so that the player walks in and the mirror auto turns on?

floral dove
#

@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.

sick dawn
#

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?

elfin raven
#

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?

vagrant coral
#

Its not avalible in sdk3. The team is working on a more powerful videoplayer, but untill then no videos.

elfin raven
#

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?

vagrant coral
#

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 ๐Ÿ˜„

elfin raven
#

I figured life wouldn't let it be that easy. Hahaha

#

Alright, well, thank you.

lapis sable
#

What error is this?

fiery yoke
#

You probably got something in your script that U# cant compile

#

You could always try restarting

lapis sable
#

The first character in the first line is making an error.

fiery yoke
#

Yeah no thats just a bad stacktrace

lapis sable
#

I've tried to restart several times, but it hasn't been solved.

floral dove
#

@lapis sable - for issues with UdonSharp scripts, you should check out the UdonSharp discord which is pinned in #657394610913411084

glossy hornet
#

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

fiery yoke
#

@glossy hornet I dont think the inbuilt Unity JSON Utility is exposed...but you could write your own :)
Have fun with that

glossy hornet
#

aw i was hoping so hard there is an easy way to parse text files

fiery yoke
#

I would make a canny

#

but it its down due to "maintenance" (not really down, but there was an issue)

glossy hornet
#

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

fiery yoke
#

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

glossy hornet
#

mh i dont know if this works like i want to but i will give it a try

floral dove
#

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.

restive badge
#

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

scarlet lake
#

What's the best way to have a pick-up able item with gravity?

scarlet lake
#

Well, settings

scarlet lake
#

Added vrc_pickup script, and a mesh collider. The item doesn't show up in the world

vale viper
#

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?

floral dove
#

@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.

vale viper
#

ok, thank you!

cloud kindle
#

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

cloud kindle
#

nvm

#

i fixed it by triggering a synced network event

frozen matrix
#

Question does anyone know over here

#

How to actually make button but in a way everyone can see it an object

floral dove
#

@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.

frozen matrix
#

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

floral dove
#

@frozen matrix what do you want to do that the ButtonSyncAnyone object doesn't do?

old kestrel
#

@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

cloud kindle
#

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

old kestrel
#

I will try! Thanks for your help!

frozen matrix
#

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

floral dove
#

Yep - that's what ButtonSyncAnyone does

frozen matrix
#

Wait seriously

floral dove
#

Good morning! I'm going to bed soon ๐Ÿ˜

frozen matrix
#

Although question is which one

#

Because there is a sliders or a text particularly

hot flicker
#

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

floral dove
#

@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.

hot flicker
#

elaborate please โค๏ธ

floral dove
#

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.

ivory prawn
#

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?

scarlet lake
#

try clicking expand

#

it could help get rid of it

ivory prawn
#

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

scarlet lake
#

darn.

ivory prawn
#

yeahhh. i need helppp .-.

scarlet lake
#

vrchat can be weird sometimes but I think you should email vrc about that problem or hope you get an answer here

ivory prawn
#

yeah i will first see if i get an answer here

restive dust
#

Is this Udon related?

ivory prawn
#

i don't even know what udon is. -.

#

thats why idk if this is the right place

restive dust
#

This seems like the wrong place for it. This channel is for Udon related questions. I suggest asking in #avatars-2-general .

ivory prawn
#

okay thanks

hazy tendon
#

did anyone figured out how to play audio using udon graph in latest SDK?

wide fulcrum
#

can the noodle graphs be used for the door to private access room?

zealous mason
#

@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

wide fulcrum
#

@zealous mason yes is there an alturnite way to the keypad

bleak widget
#

On that same topic, is there a way to get the username of a local player as a string?

hazy tendon
#

Found it, but I cannot create such elements

#

audio source does not have pause or unpause methods

zealous mason
hazy tendon
#

oh, found it. its just bit hidden

zealous mason
#

ah yeah, i just found it too, Unity Engine > Audio source

bleak widget
#

Thank you!

zealous mason
#

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

fiery yoke
#

@hazy tendon
AudioSource.Pause() and AudioSource.Play() will pause/and play the audio source

bleak widget
#

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

hazy tendon
#

I'm just testing .play

#

I just want a chime when someone joins for now

frank sky
#

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?

frozen matrix
#

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

zealous mason
#

@frozen matrix Here's a quick network thing that has worked for me, with the event, you can create a toggle

hazy tendon
#

what do you assign to that variable to make it work? I tried self, but it does nothing

zealous mason
#

Self should have worked, I'll have to give it a better try later and see if i can figure it out.

hazy tendon
#

both audio source and spawnchine on same object

frozen matrix
#

l thanks you much l finally l can sleep well at night @zealous mason

#

I was looking for the answer thanks again

zealous mason
#

Yw =)

bleak widget
#

@hazy tendon it looks like you dont have an audiosource component in the play action (where it says void)

hazy tendon
#

I think thats just for more options, there is just delay option

zealous mason
#

@hazy tendon Was also thinking about this some more, probably want the 'on player joined' event, not so much start event

hazy tendon
#

hmm, with player joined, maybe I dont even have to use network event

zealous mason
#

Likely =)

hazy tendon
#

I will try ๐Ÿ™‚

frozen matrix
#

Nevermind I found

#

Answer

zealous mason
#

Most excellent

frozen matrix
#

So when I'm using this are they supposed to be separate

#

Or all-in-one together

#

Global toggle

rough beacon
#

ok. not sure if udon can do it or this is scripted. how to make water swimming

scarlet lake
#

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

scarlet lake
#

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

hushed gazelle
#

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.

scarlet lake
#

That's pretty big brain

chilly aspen
#

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.

fiery yoke
#

Nope.

zealous mason
#

Pretty confident, but no.

bleak widget
#

Would a possible work around be to have #00001 in both instances then sync the values?

elfin crown
#

With the new update, is there a possibility to use the radio menu to do actions in udon worlds?

floral dove
#

@elfin crown - there's no connection between avatars 3 > udon worlds yet.

elfin crown
#

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

floral dove
#

@jade crater - yes, that would be cool but it's not possible for now.

jade crater
#

๐Ÿค”

gloomy swan
#

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.

fiery yoke
#

They will be coming pretty soon. There is still some considerations to be made by the team, but they will come back.

bleak widget
#

(Also check pinned messages)

floral dove
#

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:

raven peak
#

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.

floral dove
#

@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.

raven peak
#

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
#

yes, those are in.

rough beacon
#

how do you make player float in water?

zealous mason
#

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.

rough beacon
#

no, there is. i was on a udon map that you can swim

floral dove
#

You could set gravity to 0 in your water

rough beacon
#

thank you

rough beacon
#

where do i find this gravity?

shut pulsar
#

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 ?

grand temple
#

@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)

shut pulsar
#

Yeah my locomotion system is.. uh.. pretty much just messing with velocity and orientation lol

grand temple
#

Right, and you can't change the orientation of the player outside the y axis unless you put them in a station

shut pulsar
#

station ?

grand temple
#

A chair basically

#

But that chair can be a rigidbody, a character controller, whatever

shut pulsar
#

๐Ÿ‘€ That sounds like a loophole for me

#

I'll just make the chair a spacesuit lol

grand temple
#

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.

shut pulsar
#

Hm yeah

#

though tbh I was thinking of making a 1-2 player game or something

#

like an actual minigame

grand temple
#

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

shut pulsar
#

so, it's written like C# but names are just changed around ?

grand temple
#

No, the names are the same. It's just some functions don't work

shut pulsar
#

Ah

grand temple
#

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))

shut pulsar
#

[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

grand temple
#

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

shut pulsar
#

lol

#

๐Ÿ‘€ Someone seems to have made a conversion compiler

#

this might be my lazy efficient answer

grand temple
#

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

shut pulsar
#

เฒ _เฒ 

#

[Gets scared at the very reason I don't enjoy Unreal Engine]

scarlet lake
grand temple
#

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

compact bane
#

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?

vagrant coral
#

@compact bane Follow the instructions here: https://docs.vrchat.com/docs/updating-the-sdk

#

I have with different result managed to keep all the variables. just backup before you update, every time.

dark blade
#

how do i add a video to work on vrchat. the video works on unity but not in vrchat

zealous mason
#

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.

shell siren
#

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?

floral dove
#

@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.

rotund patrol
#

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

shell siren
#

Thank you @floral dove

floral dove
#

@rotund patrol how does it 'crash' the button? You can rename the element in the hierarchy.

fiery yoke
#

I think they mean that text thats displayed for interact

floral dove
#

BTW it looks like you're using a really old version of the SDK, I recommend updating it to the latest.

rotund patrol
#

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

floral dove
#

@rotund patrol - check the pin that starts with 'To change the Interaction Text on an UdonBehaviour:'

rotund patrol
#

ah alrighty thank you

lean rover
#

Can anyone help me with installing?

floral dove
#

@lean rover what's the issue?

lean rover
#

I know this is Udon, But issues with unity and installing an Avatar

#

having a hard time getting a response

floral dove
#

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.

rough beacon
#

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...

rough beacon
#

any help?

floral dove
#

@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.

sweet plinth
#

does it have the combatsystem?

distant ore
#

Is OnTriggerEnter working? It does not work for me in U# but it works fine in C#

#

๐Ÿค”

rough beacon
#

Momo thank for some good news. I do got other thing I can work on tell than.๐Ÿ‘

floral dove
#

@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.

distant ore
#

I see alright thanks!

graceful pivot
#

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.

zealous mason
#

can you share a screenshot of components of the item thats not being picked up?

graceful pivot
#

It's the whole item, a pillow.

#

Sec, I have to open it again.

floral dove
#

@graceful pivot is it still Prefab? If so, try unpacking it into non-prefab objects.

graceful pivot
#

Nah, I already unpacked it so I'm not sure what's going on with it.

zealous mason
#

so, the colliding box is being picked up, but the pillow mesh is staying still?

graceful pivot
#

That is correct.

zealous mason
#

alright, can you screenshot for me the object tree of the item please?

#

the hierarchy? I'm not sure what its called actually...

graceful pivot
#

In a game right now so give me a moment.

zealous mason
#

no worries

graceful pivot
#

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.

zealous mason
#

oh, ok, so its not under anything. Lemme look at my stuff and see if I see if anything pops out at me

graceful pivot
#

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.

zealous mason
#

is there another object that shares the same space as that pillow?

graceful pivot
#

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?

zealous mason
#

can you hit the 'edit collider' on the box collider and show me what that box looks like?

graceful pivot
zealous mason
#

well darn, that looks legit, guess thats not it

native estuary
#

You have the pillow marked as static

#

Static objs can't move

graceful pivot
#

The thing is, if it's not marked as static, as soon as I go into test it the pillow is no longer there.

zealous mason
#

oh! put the pillow on top of something with a collider on it

native estuary
#

Have you tried looking at play mode?

#

Yeah might just be falling trough stuff

graceful pivot
#

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!

native estuary
#

Could just turn gravity off for easy fix since most worlds have pillows as gravity off so people can move them around easier

zealous mason
#

also i never knew about the static box, ty 1

graceful pivot
#

Oml I was driving myself insane. That's exactly what was happening! I put a collider onto the bed and. . .

zealous mason
#

nice

graceful pivot
#

Yay!

#

Thanks guys!

native estuary
#

Nice

graceful pivot
#

So it was falling through the bed after all hah!

jaunty schooner
#

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.

floral dove
#

@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.

rough beacon
#

i think TOS say you can not make avatar to hide your name. it will get delete if it dont get you ban.

jaunty schooner
#

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.

fiery yoke
#

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.

rough beacon
#

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

fiery yoke
#

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

scarlet lake
#

How do you go to emotes

#

Somehow its not working

rough beacon
#

TheHelpfulHelper. i think that is funny too. ๐Ÿ™‚

zealous mason
scarlet lake
#

Okay but I accidentally pressed something and now its not letting me do anything

zealous mason
#

do you remember what you pressed? restart vrc?

serene moat
twin heart
#

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?

scarlet lake
#

how do i get custom characters

zealous mason
worthy beacon
#

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

fiery yoke
#

Normally a new master is selected, which is the player that has been in the world the longest.

worthy beacon
#

so if you grab the owner of the object when the master leaves, it should be the new master right?

fiery yoke
#

Depends on the order of operations

#

But I think that should work yeah

worthy beacon
#

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
#

hwo do i enable xr?

floral dove
#

@frosty jacinth - what version of Unity are you using? Udon needs 2018.4.20

frosty jacinth
#

im using 2020

#

do i need 2 change?

#

2 older version of unity

halcyon aurora
#

Yeah, 2018.4.20

broken zodiac
#

Does the "For" node not work for a delay?

fiery yoke
#

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.

broken zodiac
#

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?

floral dove
#

@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

broken zodiac
#

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

floral dove
#

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.

broken zodiac
#

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...

floral dove
#

I think the graph SyncButtonMaster has it.

broken zodiac
#

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...

floral dove
#

@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.

chilly aspen
#

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.

chilly aspen
#

Nevermind, I've opted to use an int instead.

acoustic delta
#

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?

chilly aspen
#

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.

chilly aspen
#

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.

distant ore
#

VRCSDK3 seat stations have this problem where a seated player can still click on their seats. How do we fix this?

lime glade
#

Is it currently possible to have a synced video player, in a world build with SDK3?

floral dove
#

@lime glade check pins

muted oasis
#

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.

spare kindle
#

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?

fiery yoke
#

well at least not that particular property

spare kindle
#

right ๐Ÿ™ƒ

#

does anyone know of any way to manipulate particle systems

fiery yoke
#

I guess you could use an animation

#

and then interact with it indirectly

spare kindle
#

ugh

#

sounds like overhead

floral dove
#

@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:

spare kindle
#

gotcha

#

damn so ill have to use the graphs, i dont thing USharp supports GetMain

fiery yoke
#

Ahh right I remember that now. Thought the main module was just the particle system itself.

spare kindle
#

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

fiery yoke
#

U# should be at parity with the graph

spare kindle
#

doesnt support getmain unfortunately

fiery yoke
#

if it doesnt you can always message Merlin to fix it

spare kindle
#

using just .main returns get only

#

cannot modify

fiery yoke
#

Yeah

#

you dont modify the main module

spare kindle
#

ofc

fiery yoke
#

You get it and then modify a field of the module

floral dove
#

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.

spare kindle
#

am i doing this wrong

floral dove
#

var main = ps.main;
main.maxParticles = blah

spare kindle
#

hmm

floral dove
#

same way it works in c# ๐Ÿ˜‰

spare kindle
#

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

fiery yoke
#

No its not that

#

Youre trying to modify the return value of a property

#

which is ps.main

spare kindle
#

right

fiery yoke
#

when doing var main = ps.main

floral dove
#

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

spare kindle
#

and assigning it to a variable changes that operation?

fiery yoke
#

youre creating a new reference to that properties value

spare kindle
#

oh nice, ill check that out thanks @floral dove

#

right

fiery yoke
#

and then youre modifying the fields through that reference

spare kindle
#

got it

#

im a lowly untyped developer, does the -> not do that?

#

i think thats for pointers right

fiery yoke
#

C# has no pointers

#

at least not directly

#

that would get into unsafe territory which Udon definitely doesnt support xD

spare kindle
#

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

fiery yoke
#

Ahh Im not sure but I think that MainModule might be a struct

spare kindle
#

ah okay gotcha

fiery yoke
#

And when its a struct you cant assign a reference to a struct

spare kindle
#

ive got to do my c# research

#

ah

#

tyty @fiery yoke and @floral dove appreciate the assist

oak trail
#

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.

zealous mason
#

@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

muted oasis
#

@floral dove I am completely new to udon, where do I get the output from debug.log? In the unity editor console?

oak trail
#

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.

zealous mason
#

@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

floral dove
#

@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"

broken zodiac
#

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...

floral dove
#

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.

broken zodiac
#

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...

floral dove
oak trail
#

Never mind, OnTriggerEnter works in-game, but not in the editor.

floral dove
#

@oak trail - it should work in the Editor for non-Player colliders, but there's no Player in the Editor.

oak trail
#

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.

fiery yoke
#

Do you have a Rigidbody on your colliders?

#

If a collider moves, then it definitely should have a rigibody

oak trail
#

The triggers are all static, they don't move.

fiery yoke
#

Well

#

youre moving something into the trigger right

oak trail
#

Well, yeah. Of course.

fiery yoke
#

Which has a collider

oak trail
#

Do the triggers need to have rigidbodies?

fiery yoke
#

If a collider is supposed to move, then it should have a rigidbody.

oak trail
#

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.

fiery yoke
#

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?

oak trail
#

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.

floral dove
fiery yoke
#

Thanks. I gave up.

oak trail
#

Oh! I get it now. It's the object entering the trigger that needs the Rigidbody. I didn't understand at first.

fiery yoke
#

Yeah, the collider that moves. I couldnt get my point across ๐Ÿ˜…

floral dove
#

sometimes we just need to hear things said a different way

oak trail
#

Heh, yeah. I thought you were talking about if the trigger moves around the world that it needs the Rigidbody, for some reason...

fiery yoke
#

Well...yeah. Thats exactly what I was saying

#

Ohh

#

trigger

#

well Collider

oak trail
#

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.

fiery yoke
#

But a collider can be a trigger. So I get how that can get confusing

oak trail
#

I have a couple years worth of Unity experience under my belt, I'm just new to Udon.

fiery yoke
#

The way how Colliders work and that method specifically is all Unity native however ๐Ÿ™‚

oak trail
#

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

fiery yoke
#

Dont worry. I have my moments too.

worthy beacon
#

.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?

floral dove
#

@worthy beacon I'll take a look.

worthy beacon
#

thanks momo ^.^

worthy beacon
#

It got solved, thx momo!

dark blade
#

How do i add audio on an object? When im in play mode it works but not on the vrchat test

zealous mason
#

Works in unity but not vrc? Is your world audio turned up?

muted oasis
#

@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.

floral dove
#

Yep, looks like a solid collider-collection-flipper, thanks for sharing!

oak trail
#

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.

floral dove
#

@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.

oak trail
#

I probably should do that...

#

I'm guilty of skipping tutorials quite often.

floral dove
#

Many of us are ๐Ÿ™‚ You can always change your habits though.

oak trail
#

Well, more so speedrunning through tutorials, i don't always outright skip them.

lilac hatch
#

We.. still don't have any eta concerning videoplayers and ways to get a picture from the web ? w

fiery yoke
#

Not officially no. But I would estimate that its this or next month.
But thats just an educated guess. Soonโ„ข๏ธ

lilac hatch
#

Been a "soon" thing since a while now, i'll keep waiting then ! Thanks for the fast answer

fiery yoke
#

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.

bronze light
#

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

warm cave
#

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?

floral dove
#

@final valley the UdonExampleScene should have examples of most of the prefabs. This looks right I think.

keen wren
#

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?

floral dove
#

@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
#

so my vrchat sdk only shows utilites and udon graph

floral dove
#

@edgy blaze what else are you expecting?

edgy blaze
#

the vrc control panel and splash screen

floral dove
#

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

edgy blaze
#

So i have to fix the errors

floral dove
#

Yes, that will most likely fix your issue.

edgy blaze
#

these errors are crazy man i dont know how to fix them

floral dove
#

Where are they coming from?

edgy blaze
#

Thats what most of them look like

floral dove
#

It looks like you maybe imported something into the wrong place? Your Library folder should be outside of your Assets folder.

edgy blaze
#

All i have done is imported things from the unity asset store by clicking import

floral dove
#

What package did you import?

edgy blaze
#

it seems like the shader is having a problem

#

but i removed the asset and the sdk still didnt show control panel

floral dove
#

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.

edgy blaze
#

these errors seem more closely related to the problem

#

Will the library folder delete anything in my project?

floral dove
#

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.

edgy blaze
#

Where is it located

floral dove
#

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.

edgy blaze
#

I have the basics but the errors idk anything about

#

ok its all gone ๐Ÿ™‚

floral dove
#

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.

edgy blaze
#

no the errors are still there i meant the world just disappeared

severe tree
#

You probably just have to reopen the scene

floral dove
#

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.

edgy blaze
#

How do you make a teleporting door in the new version of udon?

proper oar
floral dove
#

@proper oar - does it work with the mask set to 'Everything'?
I have a demo scene like this that works:

proper oar
#

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

floral dove
#

Remote players don't have capsule colliders, just simple sphere colliders at their feet. You need everyone to resolve collisions locally.

floral dove
#

@worn kestrel - I'm checking on those and will update them later today if they've been fixed, thanks!

worn kestrel
#

Okay

floral dove
#

@worn kestrel - looks like both were fixed a few releases ago, I've updated their statuses now.

worn kestrel
#

Thank you

tropic owl
#

for making a vrc world, would i use vrc 2018.4.20 or 2020.08.07

floral dove
tropic owl
#

can i use the render pipeline for unity shaders with the sdk3?

floral dove
#

@tropic owl - VRChat uses the legacy rendering pipeline

tropic owl
#

so no lightweight rp for shaders?

#

makes sense i guess

#

thanks

floral dove
#

That's right. VRChat provides some shaders that should give you good performance with our pipeline, including some mobile ones.

edgy blaze
#

what would be the eqiuvalent of this in udon currently

fiery yoke
#

That is still the same node, it just looks different now.
Try searching for Network then GetLocalPlayer

edgy blaze
#

I have already theres nothing even similar

modern siren
#

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 vrcLaughing ): 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.

#

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?)

edgy blaze
#

@fiery yoke nvm I figured it out thanks to you

floral dove
modern siren
#

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.

fiery yoke
#

The PlayerAPI doesnt exist in the editor. So when referencing it, youre referencing null :P

modern siren
#

I'm used to reading g++ compile errors so I'm not used to the error messages actually being useful vrcLaughing

fiery yoke
#

Well its not a compile error, but a runtime error

rotund patrol
#

is there a way to use udon to reset chess pieces to their og spot? or anything in general

zealous mason
#

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

rotund patrol
#

ah alrighty, oh that would be amazing if you could

empty siren
#

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.

zealous mason
#

expand both variables, probably only one is public, gotta check public on both, then compile

zealous mason
#

@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

empty siren
#

Thanks

rotund patrol
#

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

zealous mason
#

s'cool, we here to help

rotund patrol
#

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

zealous mason
#

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)

rotund patrol
#

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

zealous mason
#

oh, try opening the graph and just hitting paste there

#

like in the area where the nodes go

rotund patrol
#

i did that and nothing happens

#

thats the first thing i did lol

zealous mason
#

๐Ÿ˜

#

it worked for me, perhaps you need to update to the latest udon?

#

I just updated today

rotund patrol
#

yea im testing that now

#

updating atm

zealous mason
#

cool

rotund patrol
#

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

zealous mason
#

probably to be safe, remove it https://docs.vrchat.com/docs/updating-the-sdk

rotund patrol
#

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

random ermine
#

What do I do if it wonโ€™t let me log in even if I am using the right username and password

rotund patrol
#

i cant find the array sizes so not sure what to put public

#

@zealous mason

zealous mason
#

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

rotund patrol
#

okey i got everything to public

#

but should all the chess pieces be in one child and that child has the udon component

zealous mason
#

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

rotund patrol
#

im not sure if ive done it right

#

i got 32 pieces in total

zealous mason
#

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

rotund patrol
#

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

zealous mason
#

I don't understand. Did you put this udon onto a chess piece? A button?

rotund patrol
#

on a piece

#

that is how i understood what you meant

#

should it be on a button?

zealous mason
#

Oh nope, you want to put it on a button

rotund patrol
#

alrighty

zealous mason
#

Then drag and drop the pieces into the array slots there where it says "none (game object)"

rotund patrol
#

it only goes up to 31 in the slots tho

#

should i put 33 instead of 32 then?

zealous mason
#

You also have the zero slot

rotund patrol
#

oh yea right im dumb XD

zealous mason
#

Nah it's cool

rotund patrol
#

okey so then it is just for me to put all the pieces into that and then the button should work ingame?

zealous mason
#

I hope =)

rotund patrol
#

alrighty, ill do that and test it, and then ill report back to you ๐Ÿ˜„

#

thank you for all the help

zealous mason
#

Np

scarlet lake
#

Can someone help me? I can't figure out how to make Soundpad work in-game

bleak widget
#

Is it possible to check for collision with avatar hands? I don't think they have any colliders so I was just wondering

floral dove
#

@bleak widget - you could add colliders and move them to hand positions yourself.

bleak widget
#

Oh? Is that part of the local player object?

floral dove
#

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.

bleak widget
#

Thank you! There is so much you can do with that. Does it go down to the individual finger position as well?

rotund patrol
#

it works @zealous mason

zealous mason
#

Awesome!

normal sable
#

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.

silk scarab
#

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

floral dove
#

@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

silk scarab
#

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

bleak widget
#

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

silk scarab
#

Unless they have sub version I have the right one, 2018.4.20f1

#

Unless the docs on VRchat are wrong ๐Ÿค”

fiery yoke
#

Make sure you dont have any errors in your console

silk scarab
#

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

fiery yoke
#

No the yellow ones are warnings. You can mostly ignore those. Errors are red with an X

silk scarab
#

Ah, then no errors.

fiery yoke
#

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

silk scarab
#

Could it be a file write issue?

#

The VRchat folder the exe is in is set to read only

fiery yoke
#

It puts the file in the AppData/LocalLow directory iirc

floral dove
#

@scarlet lake - this channel is for questions about Udon only

scarlet lake
#

Where do i ask my question

#

?

floral dove
#

All moderation inquiries regarding a ban must be sent to moderation@vrchat.com from the original account holder.

flat musk
#

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?

pure sail
#

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?

rich widget
#

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.

flint urchin
#

@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.

rich widget
#

Noice ill just hafe too experiment with it and figure out what does and does not

flint urchin
#

Since you want to convert it from C#, I would recommend using UdonSharp then

rough beacon
#

is there something within unity that make 2D always face to player?

#

i am working with udon

pure sail
#

thanks phax

floral dove
#

@rough beacon Hm a particle set to Billboard will do this.

#

@flat musk sure!

rough beacon
#

ya. i use that and find my self with cut out problem. getting closer ๐Ÿ™‚

rough beacon
#

well, it a custom file. it work. it seem not to resize :((

#

time to move my problem to shader

north lintel
#

Variable float doesn't seem to be an option in the udon graph?

tropic canyon
#

wdym?

north lintel
#

Nvm, I decided to use Udon# instead.

restive dust
#

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.

floral dove
#

@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

restive dust
#

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!

twilit badge
#

๐Ÿฉ

frank sky
#

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?

floral dove
#

@frank sky any errors in the console?

frank sky
#

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

native estuary
#

Those are warnings are there any errors there? Just the errors matter most of the time.

frank sky
#

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

native estuary
#

Well there we go just delete that Assets\NastyWizard_Depth\Demo\ folder and you should be good

frank sky
#

oh wtf that fixed it. what? that's so weird

#

yeah I just deleted it. what on earth

native estuary
#

Old post processing version not compatible with current version of unity

frank sky
#

ohhh. wow I didn't know that makes the sdk vanish

native estuary
#

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

frank sky
#

thank you both for your help!

floral dove
#

Also, I highly recommend learning to use source control like Git if you don't want to lose your work.

rotund patrol
#

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

scarlet lake
#

Can someone help me with Soundpad? I can't make it work in-game

vagrant coral
#

On the "send custom network event" node, does target "owner" mean the owner of the instance or the owner of that udon program?

fiery yoke
#

The owner of the GameObject that the UdonBehaviour is on, which youre sending the event to xD

vagrant coral
#

right

fiery yoke
#

Wording isnt my strong suite, but you get the point

vagrant coral
#

i did get the point yes ๐Ÿ˜„

dark blade
#

Is the video player still not working?

fiery yoke
#

Not yet no. Should be coming sometime soon

dark blade
#

Thx

floral dove
#

@dark blade you can vote on the Canny to get a notification when they're in, it's pinned to this channel.

floral dove
#

@scarlet lake is this a Sound Pad you are building? What have you tried?

fiery yoke
#

Pretty sure they mean Soundpad on Steam.

scarlet lake
#

@floral dove A soundboard called Soundpad, i tried many things but it still doesn't work. Idk what to do anymore

floral dove
#

Ah, this channel is for people who are building things using Udon, not for third-party apps, sorry.

scarlet lake
#

@floral dove where can i ask about this then?

floral dove
#

Maybe get in touch with the people who make the app? You can also try #user-support-old

dark blade
#

has anyone made any alternative scripting or anything for video player until the actual one comes out

flint urchin
#

No video player component, so no way to make a alternative.

floral dove
#

@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.

rough beacon
scarlet lake
#

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.

floral dove
#

it's not currently planned AFAIK @scarlet lake - also FYI, this room is for asking questions about building things with Udon.

scarlet lake
#

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.

floral dove
edgy blaze
#

Just wondering how to make an object able to be picked up from any point on the object instead of only the middle

rough beacon
#

take your time on Video player. it very useful but when come to security risk. that far more imported!

frank sky
#

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?

dark blade
#

How do i get audio to work instead of a video player with buttons connected to a plane

floral dove
#

@frank sky - yes

frank sky
#

yaaay I guessed right! thank you!

floral dove
indigo cloak
#

is it possible to animate UVs for a mesh? like, say, make a floating river? or lava....

fiery yoke
#

You dont "animate UVs". You can animate the texture offset. Or just use a shader that does that.

indigo cloak
#

๐Ÿค”

fiery yoke
#

Does the VRCPlayerApi.playerId start at 0 or 1? Would assume 0, but Im also to lazy to check right now lul

fiery yoke
#

Tested it. It starts at 1.

tropic canyon
#

just use -1 if you mean no one

fiery yoke
#

No that wasnt the problem

dreamy warren
#

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?

fiery yoke
#

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).

dreamy warren
#

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?

fiery yoke
#

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

dreamy warren
#

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?

fiery yoke
#

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.

dreamy warren
#

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

#

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

fiery yoke
#

Not saying that is the only or best option. But it is a option

dreamy warren
#

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

brittle swift
#

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

floral dove
#

@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.

dark blade
#

What was the security problem anyways for the video player

brittle swift
#

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

floral dove
#

@brittle swift have you tried a Build & Test?

#

@dark blade the video player would send a GET request to any URL, including private servers.

brittle swift
#

i still sink

#

after build and test

#

i do have these errors, now

#

guess its a missing script,

native estuary
#

Did you import udon sharp before importing that asset?

brittle swift
#

yes

#

i imported sdk first

#

then udon sharp

#

then the asset

upper sluice
#

so dumb question, but is it possible to get json data via http with UdonSharp?

restive dust
#

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.

floral dove
#

@upper sluice sorry, no http access in the SDK yet.

upper sluice
#

Is it planned? @floral dove

floral dove
#

It's not on the roadmap right now, but it could be in the future.

upper sluice
#

Kinda a bummer

fiery yoke
#

@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?

restive dust
#

It's a variable.

fiery yoke
#

Still need to construct it though...I think

restive dust
#

Ah I was wondering if the constructor could be the issue.

#

Didn't think it would be necessary because it's a variable.

fiery yoke
#

Only type-value variables are initialized to their defaults

#

Reference-type variables always need to be constructed.

floral dove
#

@brittle swift yeah I'd take a look at that prefab, and get in touch with the author of the script.

brittle swift
#

unfornetly they speak japanese, so this will be fun oof..

restive dust
#

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!

floral dove
#

Yay for noodle drop!

rough beacon
restive dust
#

If you're using SDK3 you're meant to create your logic using Udon.

distant abyss
#

Trying to get a toggle on the button on the UI but it won't work. Any help?

vapid kettle
#

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

fiery yoke
#

Technically possible. But not intended behaviour, so its quite tricky.

vapid kettle
#

how would you go about making it theoretically

fiery yoke
#

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

past ravine
proven vessel
#

Quick Q, I have not installed the newest version of SDK3 yet, But are the URL players working yet?

grand temple
#

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

floral dove
#

@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.

bleak widget
#

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

floral dove
#

@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.

bleak widget
#

Oh that is much easier. Thanks!

bleak widget
#

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

floral dove
#

weird - any errors?

bleak widget
#

Nope, didn't see any. World loaded just fine but the script didn't work any more

cunning mist
#

@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
...

โ–ถ Play video
distant abyss
#

@cunning mist I just want to say your videos are the only thing keeping me sane while working with udon. Thank you so much!

cunning mist
#

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

distant abyss
#

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

cunning mist
#

We all are lol

hearty linden
#

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?

floral dove
#

@hearty linden check the pinned messaged regarding video players.

timber lion
#

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?

distant abyss
#

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?

floral dove
#

@jar we have some sync updates in a beta test right now, including one to fix that particular issue.

fiery yoke
#

@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.

timber lion
#

Cool yes momo just reached out

tawny island
#

@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

tawny island
#

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

fathom raven
#

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 ๐Ÿ˜„

fiery yoke
#

Not yet but soon.
In the meantime you can refer to this:
https://ask.vrchat.com/t/player-collision-in-udon/428

fathom raven
#

thanks!

#

oh well so other should not be null? Because when I playtest, it's always null ๐Ÿค”

fiery yoke
#

Yes

fathom raven
#

ok that strange, will try again. Thanks ๐Ÿ™‚

fiery yoke
#

They protect all objects that are not "part of your world"

#

So you cant access the player

fathom raven
#

In your example you are able to access it though

fiery yoke
#

No

#

Its just checking for the collision. I never access the player

fathom raven
#

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

fiery yoke
#

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

fathom raven
#

ok thanks, will look into it more closely! also, cool that an official solution is coming soon ๐Ÿ™‚

floral dove
#

@tawny island take a look at the Sync examples in the UdonExampleScene and the accompanyingreadme that explains them.

scarlet lake
#

Does anyone know how i can use Udon to make an NPC wander around my map?

fiery yoke
#

@scarlet lake You can either look at Nav Mesh Agents or write the logic yourself

scarlet lake
#

I've never used Nav Mesh Agents, how do they work?

vale current
#

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

fiery yoke
#

@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

bleak widget
#

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

distant abyss
#

@tawny island Thank you so much man I appreciate it! I didnโ€™t think of that

floral dove
#

@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'.

bleak widget
#

@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

fiery yoke
#

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

bleak widget
#

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

fiery yoke
#

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.

bleak widget
#

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

fiery yoke
#

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

bleak widget
#

Ohhhhh

#

I thought it was across all objects

fiery yoke
#

Nope

#

you have to specify an instance

bleak widget
#

I'm stupid haha. Thanks for that info. It makes it a LOT easier

fiery yoke
#

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

bleak widget
#

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?

fiery yoke
#

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

bleak widget
#

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?

fiery yoke
#

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

bleak widget
#

Maybe we need community documentation?

fiery yoke
#

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

bleak widget
#

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

fiery yoke
#

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

bleak widget
#

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?

fiery yoke
#

Only way to do that currently is Synced Variables

#

And thats a whole nother topic

bleak widget
#

Have a synced variable that gets checked on player join that can be used to then align the events?

fiery yoke
#

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

bleak widget
#

Ooh thanks for that one. I would have banged my head on the wall trying to debug that

fiery yoke
#

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

bleak widget
#

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

keen sierra
#

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?

fiery yoke
#

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

keen sierra
#

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.

fiery yoke
#

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.

keen sierra
#

Of course, considering also the constraints on the avatars to prevent code injections and malicious intents.

fiery yoke
#

Udon is world only

keen sierra
#

So would you call it C Flat instead of C#?

#

Badum tsss.

fiery yoke
#

No C flat is music

#

:^)

#

Ohh wait

#

so is C#