#udon-general

59 messages · Page 43 of 1

native estuary
#

Update your udon sharp as well

dusk lintel
#

ah

#

okay

gloomy nymph
#

Sorry I'm late to the convo, I haven't tried an SDK3 version of that yet. I'm not sure how to integrate Udon behaviors with editor scripts at this point, sorry 🙏

hushed gazelle
#

@mossy atlas @unborn hornet The better way would probably be to make the text on the cards UIText rather than a texture, and have a long array of all the possible card sentences stored in another Udon object. That way you only need ten physical white cards per intended player that can each be remotely-assigned a randomly-selected sentence.

unborn hornet
#

🤔 good points, not far enough I think...

#

I'm trying to prototype logic for waffle's use case atm though. We'll see how it goes.

old karma
#

A nice simple one of here have the the class name or not its not a thing. Set player capsule size. Anyone? or get player collider? That I can then set . Disable player capsule and add new stuff. Or even odd work arounds like with the old (just use the combat system). Before I spend hours digging thru the player api.
Goal Make loli capsual smole, make normal people normal, make big people... normal they dont get to be big.

balmy bison
#

I need to sync a float for each player in my instance, and synced arrays aren't a thing right? Do I have any options besides making a ton of float vars and hoping udon sync doesn't choke

unborn hornet
#

You could bundle them by combining the data into a single string and parsing them once received.

fiery yoke
#

Depending on how much precision you want that can get more expensive than just syncing floats directly

balmy bison
#

hahaha, I remember picking through the 8ball source looking at packing up the gamestate and thinking "oh good thing I'll probably never have to do this"

unborn hornet
#

It's a balance. A choice that is made with one eye closed. Sometimes both. It's hard to tell between the two with Udon sometimes.

fiery yoke
#

Well its relatively simple

#

As long as you stay within ASCII every character is a byte

#

plus some overhead per string in general

#

So that means you have 4 ascii characters, before you can basically just sync a float anyway. Plus you need some seperator character etc.

open ermine
#

ever update a world and the viewpoint changes on avatars..?

dapper lion
#

that was the latest update to the game, not the sdk

#

id assume itll be fixed soonish

open ermine
#

ah kk

desert kestrel
#

i am still very new to udon do you know any good tutorials i can follow for that?

floral dove
desert kestrel
#

i was talking about making a object with two pickups

#

i know enough to get by i know how to use events and triggers and basic network events but the only way i knew to make a object possible to pickup was to use a vrc.pickup

floral dove
desert kestrel
#

ok

dusk lintel
#

how would i do a safe reinstall of a project with udon after installing the new SDK3 wrong?

#

I kinda went too far i think to fix all these compiler errors

scarlet lake
#

Need help ASAP, can’t get audio in a world for quest users. Any help would be great.

#

Please DM me if any knows a solution

dusk lintel
#

fixed my issue disregard

vast locust
#

So I updated to the new SDK3 to see if that would solve my world problems but now I get this issue when trying to run my world:

[UdonSharp] Checker.cs(47,52): Udon runtime exception detected!
An exception occurred during EXTERN to 'VRCUdonCommonInterfacesIUdonEventReceiver.__GetProgramVariable__SystemString__SystemObject'.
Parameter Addresses: 0x00000019, 0x0000004D, 0x000000CC

Object reference not set to an instance of an object

dawn oxide
#

How would I make a pulsing light on to the blade of a sword? Where only the blade pulses as if it had an out glow to it

proven spade
#

Ok so I had probably the worst idea for a spaceship/arwing vehicle thing. I have everything working using a chair and a small ui to control it's speed, but my only problem is how I would rotate the ship using the player's input or view. Is there any way I can make this possible (hopefully without throwing up in vr)?

brave spruce
#

is using melonloader for my bhaptics vest bannable

unborn hornet
#

Officially, using any modded clients is a ban risk.

lilac hatch
#

Is there a way to multi-object edit udon Behaviour ?

unborn hornet
#

Probably would require the editor scripting via u#.

#

Other than that, I dont think so.

glossy hornet
#

is there currently some kind of bug with udon? everytime after upload it strips all my scripts so its just an empty world, for example the usharp video player

paper plinth
#

@dawn oxide cut the blade off the sword and add the mesh in the same place as the original blade, then scale up like 0.01 or whatever and apply a material with a lightning bolt shader or something lol

#

Toggle visibility to turn the effect on and off I guess

open ermine
#

Has anyone ever had issues with Udon and Bakery + Bakerys RTLighting ?

floral dove
floral dove
glossy hornet
#

@floral dove seems like something was messed up with my cache, so i tried to reimport the assets i need but that made it even worse, so i made a new project and started to migrate 😄

#

guess it was some kind of issue with umodeler

vast locust
#

Hi everyone,
I want to "unlock" an object so anyone can change it and not just the master,

Or such like transfer ownership to whoever is using the object.

Example:
Player A is master.
Player B tries to change the value of object but it wont register because Player A is master.
If player A updates the value of the object, Player B will see the change as well

How can I do this?
Thanks!!

floral dove
vast locust
umbral vessel
#

im new to world making i made a mirror toggle for my world and im trying to create a separate one for another mirror in my world and its not letting make another interact node on my udon graph nor do i know if you can make another graph or not

paper plinth
#

Can you just add the script as an udonbehavior on the other mirror and just leave it?

umbral vessel
#

its for a separate button too

#

like in different area of the world

paper plinth
#

yeah

#

think of the whole thing like a single prefab

#

and copy the whole shootin' match over

#

wow it's really not obvious at all how to do audio

floral dove
paper plinth
#

so I would like to play the audio source (if it's not already playing) when any player enters the trigger zone
does this look right?

#

and the audio source distance is set to the limit of the trigger

floral dove
# paper plinth

I think you want to use OnPlayerTriggerEnter there since it's not an object colliding with the player
https://docs.vrchat.com/docs/player-collisions#physics

dusk lintel
#

was working on possibly making a nerf gun work in a world where people can pick it up and shoot

floral dove
dusk lintel
#

I have a gun just dont know how to make it sync etc

paper plinth
#

thank you!

#

sweet that acts just like a play button

unborn hornet
#

Is any PostProcessingStackv2 stuff exposed in udon?

floral dove
floral dove
vast locust
raven peak
floral dove
raven peak
floral dove
raven peak
vast locust
floral dove
floral dove
vast locust
floral dove
wheat rover
#

You are transferring ownership on the player who owns the object, right?
You can't just have anyone try and claim ownership over something. The person who already owns it has to transfer it.

vast locust
wheat rover
#

Yes, I know.
You need the master to transfer ownership of the object somehow; but you can't have the client try to take it. The owner has to transfer it.

#

If it's something interactable, it may be easier to just fire an event when you interact with it instead.

wise ginkgo
#

is there hand tracking in vr chat

floral dove
unborn hornet
#

If someone triggers logic that contains an ownership transfer to local player, the ownership is transferred to said localplayer regardless of previous owner.

floral dove
wheat rover
#

Guess I had too much faith in VRC having even the most basic network security...

unborn hornet
#

You write that security yourself into the logic.

wheat rover
#

How can you write security if anyone can just say "my object now"

unborn hornet
#

Not everyone wants to restrict ownership transfer like that.

#

You check for player ownership BEFORE setting the new owner.

floral dove
#

the upcoming Reliable Sync system has a way to approve/deny ownership transfer, and allows this all to happen on a single frame. For now, it's the wild west, yes.

unborn hornet
#

👀

wheat rover
#

That has nothing to do with someone sending malicious packets

unborn hornet
#

Never said it did?

wheat rover
#

My point is that in the current system there's no way to prevent malicious behaviour. There's no security

unborn hornet
#

There is, but you have to learn how to implement it properly.

#

As said, wild west. Udon is still in alpha. Chill brah.

floral dove
#

if you don't add a method that performs ownership transfer into your objects, then no one can transfer them. Or check for some other flag you set before allowing a user to request ownership.

#

we've integrated that check into the actual transfer in the upcoming Reliable Sync system, and I'm sure people will complain that it's now too complicated 😛

unborn hornet
#

Yea. Ownership transfer is an explicit action defined by the world creator. With the exception of pickups having certain implicit stuff, but can be mitigated partially if done right.

wheat rover
#

You're missing the point that I'm not talking about the world creator putting something in to transfer

#

I'm talking about someone walking in with a client and sending a packet saying "my object"

unborn hornet
#

Thats... not possible? afaik.

#

All they can do is send custom events that are exported in the udon VM.

#

Which are defined by the world creator.

wheat rover
#

Yes, it's possible. Because the game has some method of transferring objects. This is going to send a packet that says "this object is mine"

#

You literally just have to replicate that packet

unborn hornet
#

Have you actually done/seen that?

#

or is this speculation?

#

Cause if that works, that's a bug and you should report in on canny.

wheat rover
#

That's...not a bug that's just how it works when you have no networking level verification for object transferring

floral dove
#

we've blacklisted built-in programs from being called via RPC. You're getting pretty close to writing a how-to on attempting to exploit the system, I don't think we should go further down this road. If you have knowledge of an active exploit, you're welcome to contact us privately.

unborn hornet
#

^

paper plinth
#

...heh

wheat rover
#

I don't know of any implementation done in practice, I'm just pointing out an obvious glaring flaw in the networking that anyone could do if they aren't afraid to manually throw together some packets...
At any rate, the new system fixes it anyways, so I'll be looking forward to that.

#

It's not like VRC hasn't had rampant issues with this exact thing before. Remember when clients could change your avatar?
Eh, I'll drop it.

unborn hornet
tall vault
#

Hey @floral dove , I am curious why you would mark https://vrchat.canny.io/vrchat-udon-closed-alpha-feedback/p/allow-enabling-and-disabling-of-arbitrary-components as complete when it is currently not possible to enable and disable arbitrary components without UnityEngine.Behaviour.enabled being exposed even after it being pointed out. I normally don't like to ping VRC staff as I understand your time is precious and it is generally frowned upon, however it is not the first instance I have seen where a post would be marked as complete when it has not fulfilled the original poster's request, and comments on the post are usually not addressed after the decision is made to complete or reject a post. Currently the closest method of enabling/disabling components is https://pastebin.com/XhVrUfL8 which not only is a hacky mess, but also does not support a large number of component types as they are not exposed to Udon despite being valid components to use in a world.

floral dove
tall vault
#

Much appreciated

dire orchid
#

What does UdonBehaviour RunProgram(string) do?

#

how is it diferent to SendCustomEvent(string)

tall vault
#

UdonBehaviour.RunProgram isn't exposed to Udon so it doesn't really matter, but I imagine SendCustomEvent calls it internally

floral dove
#

Right, you can use it from UI events, in that case it does the same thing as SendCustomEvent

open ermine
# floral dove This combo worked fine for me on a recent project, what are you seeing?

Broke a keypad that spawns a teleporter globally via udon behavior. Installed the RTLighting and it broke every teleporters location & says the object isn’t being referenced however it is. Searched far and wide for scripts that could be causing it to crash for hours.

Now on load the keypad being incorrect triggers the teleporter to spawn and the right combination turns it off. I give up for the night lmaoo.

For reference Jdoggs teleporters.

#

Also package manager doesn’t event detect bakery and showcase a clean way to uninstall. However after deleting things I manually went through its import and deleted everything that could be related to it.
Reinstalled the SDK, UdonSharp & both prefabs I’m using for the keypad & teleporter. The udon behavior script should be fine but it’s being unity. Might just export and redo the whole world at this point.

paper plinth
#

I want to load an array with nodes, lol

floral dove
paper plinth
#

no worries I just like 3 seconds ago found out you can set it with default value in the variables panel

#

but it's borked yes

cunning mist
#

Oh yeah, most array size dropdowns are entirely unusable haha
I guess I has assumed this was reported

floral dove
#

of course, I fix them in the Inspector and they break in Nodes. Not likely related, just one of those notlikethis moments

paper plinth
#

if I'm in a node graph that's a component of a light and I'm referring to the current light, do I need to plug anything into instance?

floral dove
paper plinth
#

thx

unborn hornet
#

I thought Transform was also implicit when empty?

floral dove
paper plinth
#

see that's nice lol

gilded citrus
#

So I have a button that when i press it, it deletes the floor for a "the floor is lava" game. Right now, it just turns it off for whoever pushes the button. Does anyone know how to set it so it deletes it for everyone in the instance?

#

Also, how to make a video player usable by anyone, not just the owner?

#

Plz and thank you

unborn hornet
floral dove
gilded citrus
gilded citrus
floral dove
gilded citrus
#

with that event attached to it

#

Y'know I should stop asking questions and just double back around when sober

#

igoner me for now lol

floral dove
#

sure, that would work

#

yeah, easier to understand and apply the concepts when sober

pliant spade
#

How do i make a play sound button?

#

Or something like that because i suck at udon

true ore
#

@dapper lion so far nothing's working for me, but it is for Temporal so i just have to figure out what's the difference. discord offers less lag though?

hushed gazelle
#

Turn off "play on awake" on your audio source, use the Play audio source graph. @pliant spade

dapper lion
#

what did temporal say?

true ore
#

oops sorry reposted in the proper thread now

chilly aspen
#

How do I know which hand fires Interact()?

fiery yoke
#

You dont.

#

:)

chilly aspen
fiery yoke
#

Yeah thats a good workaround

#

Not always accurate ofcourse but good enough

dawn oxide
fiery yoke
#

Seems to be a CyanEmu problem. Message CyanLaser.

dawn oxide
#

Would i just dm him or something?

fiery yoke
#

I dunno. Maybe he has some bug reporting section somewhere?

dawn oxide
#

if i can't find any of the sort, i'll dm him

#

yea he has a server

spark pike
dusk lance
#

For anyone else who finds issues with CyanEmu, feel free to ping me. I'll basically ask about how to repro the bug so I know how to fix it though, so be prepared 👀

wise isle
#

Is there any way to, given a URL, load an image from that URL? Like a video player but for images specifically.

fiery yoke
#

In SDK2 there was the badly named "VRC_Panorama", but there is no equivalent in SDK3 (yet)

wise isle
#

I see, that's a bummer. Which sources did it allow?

fiery yoke
#

No idea, never used it, only heard about it.

wise isle
#

I had an idea for a system in which you can encode the world state into a texture, and let people reload it later by uploading a screenshot of the texture and loading it in game.

#

I know I can pull it off with video players, but it's a lot to ask people to upload still image videos just for that x)

fiery yoke
#

Yeah that was something I had in mind before as well

#

But I think its too big for simple syncing

#

So it could only work as a "Saving" mechanic

wise isle
#

For that sculpting world I posted, I already have half of it working. Just missing the loading part

#

I am encoding the state of sculpt into a texture

#

And there is ball with a screenspace shader so you can snapshot it with your camera

fiery yoke
#

In actuallity the "uploading" part is the more difficult part.

wise isle
#

I would just have people put it on imgur or something, I don't care about that part being feasible

fiery yoke
#

Hmm I see, not sure how you would make sure that it always has the correct format and everything, but I guess thats up to you.

#

But yeah maybe at some point it will be easier to load resources (other than videos) from the web in VRC.

wise isle
#

For the way I am storing the data, it doesn't really matter. As long as the colors are approximately correct, it's fine.

#

Didn't some guy make a prefab that let you send discord messages to a server from within vrchat

#

how the hell did that work

fiery yoke
#

Video Player abuse in SDK2

#

That has been "fixed"/patched in SDK3

wise isle
#

no fun allowed x) /s

fiery yoke
#

Well Security > Fun

#

Its always Security vs Freedom

wise isle
#

I get that it seems bad, but what is the concern actually?

fiery yoke
#

If you give someone a way to fuck with you, someone will fuck with you. Web Access is really scary for security concerns.

wise isle
#

How much of the url they check. If I wrote a custom video player, maybe I could use that

fiery yoke
#

The whitelist is a temporary solution.

wise isle
#

How so?

fiery yoke
#

In the end you will have an individual check, where you have to confirm if you want to accept a URL or not. The specifics of that are up to them and afaik not decided yet.

#

So theoretically people will be able to reject each and every url. So dont build stuff expecting that it will ALWAYS work for everyone no exceptions. Just a heads up.

wise isle
#

No harm in trying though. Even if it only works for a while, I don't really care

#

Yeah yeah I get ya

fiery yoke
#

Ohh yeah you can definitely receive texture data from Video Players. People have done that before.

wise isle
#

I'm more interested if it will allow me to get images and videos

#

Basically how much of the url they check. If it is just the domain

fiery yoke
#

well videos yeah. You can just have a short video thats basically just a still frame.

wise isle
#

That's really tedious though, which is what I am trying to avoid

fiery yoke
#

If youre trying to avoid "tedious" in VRChat then I recommend you look somewhere else ;D

wise isle
#

I'll take a look at USharpVideo real quick, I can probably get some leads there

fiery yoke
#

the video player just calls LoadURL which then sends a HTTP GET request

wise isle
fiery yoke
#

Yeah, then expect tediousness.

wise isle
#

A large portion of my avatars have some kind of gimmick, quite often involving cameras

#

And we all know how those are to use x)

#

OOohh new idea

#

Have people take a screenshot, link them to a site that lets them encode it as text, have an input field for them to paste it

fiery yoke
#

Yeah thats what most people do

#

"Password" like saving

wise isle
#

I hope the limit on how much text you can put in an input field is pretty generous

fiery yoke
#

You dont even need to link them to a site

#

you can technically do the encoding yourself

wise isle
#

?

fiery yoke
#

and then have a readonly Input field where people can copy it from

wise isle
#

Ohh

#

Yeah ofc

fiery yoke
#

in Udon

#

Which is slow

wise isle
#

yeah yeah I get it

fiery yoke
#

but should work as long as you dont exceed the 10s limit

wise isle
#

hmm, I honestly might

#

I might have to downscale and live with the loss of detail

#

Something tells me even just iterating over pixels in a 1k texture will exceed that limit

#

I tried blitting to a 256x screen every frame pixel by pixel once which brought me to 10 fps ingame

fiery yoke
#

You can do the compression in a shader

#

and then use a lowscale texture

wise isle
#

Oh yeah the downscaling isn't an issue, I'd just rather not have to

#

Since you will lose detail

fiery yoke
#

Gotta have to compromise somewhere with Udon ¯_(ツ)_/¯

wise isle
#

I might give it a try, maybe I can get it to like 5 seconds or so if I handwrite some uasm

fiery yoke
#

ohh boy

wise isle
#

U# still doesn't have very optimized codegen in some cases, I've had to do it before

fiery yoke
#

Last time I wrote uasm was a nightmare, but that was before you could define a label and then jump to it afterwards.

#

Imagine not having label-lookahead in an assembly...

#

Simply doing an if-else in uasm itself was basically impossible.

wise isle
#

I really wish they had chosen a different method of sandboxing than literally rolling their own instruction set, ngl

#

Things get really slow really fast

#

There's a reason most languages that compile to some bytecode also have JIT

#

But hey man thanks for the tips

#

ahh shit it looks there might not be anything exposed that will let me get the pixels of a RenderTexture specifically

#

Only Texture2D and 3D

#

My only other immediate idea is to write the contents to a buffer in a shader, and then read from that buffer in udon

#

Tedious but probably doable

wise isle
#

I think I am about to go where no man should go

paper plinth
#

Guys
If you wanted to make light rays come from a disco ball, would you use:

A particle emitter
artifacts in png and wave them around and turn them on and off with an animation
3d artifacts like cylinders and use udon to move them around and light them up
A shader
Something else?

Idk if this is a good use of udon or if there's another function that would lighter and easier.

wise isle
#

actual 3d objects moving with udon will likely be slow

#

I would write a shader

paper plinth
#

I feel like writing a shader too

wise isle
#

Nope, just trying to access pixel data of a rendertexture

fiery yoke
wise isle
#

There are no exposed methods that let you do it as far as I can tell, so I thought I could render to a single face in a readable cubemap

#

Very illegal technique

fiery yoke
#

The "intended" way is to do RenderTexture.active

paper plinth
#

Looks heavy based on the documentation

wise isle
#

I know

#

But it's not exposed for obvious reasons

fiery yoke
#

Not really obvious

#

In fact unknown to me.

wise isle
paper plinth
#

Is it? Sweet.

wise isle
#

Iterating the pixels is what will kill performance

#

The rendering itself is not even noticable

#

all rendering goes into the currently active rendertexture

#

you don't want to give people that power

fiery yoke
#

@wise isle Ohh interesting so instead of using a RenderTexture you render the Camera to a Cubemap manually?

wise isle
#

yeas

fiery yoke
#

That is...so jank

#

I love it.

wise isle
#

yep x)

fiery yoke
#

How do you read from the Cubemap face?
ahh it has a GetPixels method

paper plinth
#

yeah professor
How are you going to take it apart?

#

Or do you need to?

wise isle
#

oh for fucks sake

fiery yoke
#

That is genius. Thanks @wise isle

wise isle
#

I misread the exposure list

fiery yoke
#

Ohh wait

#

let me guess

wise isle
#

Only exposed for texture2d and 3d

#

not cubemap

#

why x)

fiery yoke
#

Which one? GetPixels?

wise isle
#

yeah

fiery yoke
#

Welp

wise isle
#

there goes that idea I guess

fiery yoke
#

Hmm not yet

#

maybe

wise isle
#

still neat that you can do it at all

fiery yoke
#

What about taking the Cubemap and putting it into a shader somehow?

#

Is that something you can do?

wise isle
#

What would the point be?

fiery yoke
#

Then you can maybe write the cubemap data to a different texture

#

Not sure about graphics stuff, havent done that in a while.

wise isle
#

you don't write to textures in shaders

viscid reef
#

if i may just pipe in, your shader works by taking in the depth camera from different angles right?

fiery yoke
#

OH WAIT

#

got an Idea

viscid reef
#

why not just feed the video output to the shader directly?

fiery yoke
#

can you check if Texture2D.CreateExternalTexture is exposed?

wise isle
#

It's not

fiery yoke
#

Damn.

wise isle
#

@viscid reef I'm trying to implement a saving function

#

I need to be able to access pixel data of the rendertexture in udon

#

only other way I can think of now is writing to a buffer in a shader like I said but it will be very slow, not to mention probably crash unity when it tries to unroll the loop

viscid reef
#

oh, i misunderstood nevermind

fiery yoke
#

@wise isle A janky but potentially the only way is to render the content to the screen, and then use Texture2D.ReadPixels

#

if that is done before the actual content is rendered, you would never see it.

#

But good luck with that.

#

Also I guess Texture2D.UpdateExternalTexture is also not exposed?

wise isle
#

ye

#

that actually might just work

#

I could have the player stand in a sphere with a screenspace shader

#

and call ReadPixels

fiery yoke
#

Yeah that might work. But would also be terrible for the user xD

wise isle
#

ladies and gentlemen

fiery yoke
#

maybe only for a split second

wise isle
#

we are in unholy territory

fiery yoke
#

like one frame

wise isle
#

nah who cares lol, they just have to go into for like a sec

#

I see screenspace shit all the time in this game

fiery yoke
#

Just make sure the screenspace shader is really high in the render queue and is ZTest Always

#

otherwise peoples shaders might mess with it

wise isle
#

yeah

#

I'll overrender everything but the menu

fiery yoke
#

nah fuck the menu lol

wise isle
#

overrendering menu is toxic

fiery yoke
#

Just put them in there for a frame

wise isle
#

also you have to gimmicks to do it now since it's on the max render queue

fiery yoke
#

no need to do any longer

wise isle
#

this is beyond god

fiery yoke
#

indeed. But VRChat doesnt let us handle it otherwise

wise isle
#

I really wonder how it will do with VRC single pass stereo rendering

#

I'll probably have to make sure to get half the X resolution in vr

fiery yoke
#

"Pixels are read from the current render target"

#

That might

#

mean you can also read from a RenderTexture

#

if youre able to know when it is rendered

bright ibex
#

hey can someone tell me what vr i shall get

wise isle
#

I have no control over current render target or any way to infer information about it afaik

fiery yoke
#

@wise isle You have a Camera that has a RenderTexture. Then have a UdonBehaviour on that Camera GO with "OnPostRender" and then do the ReadPixels call

#

Not sure if OnPostRender is a callback in Udon or not

wise isle
#

looks like it

fiery yoke
#

That might work better than the ScreenSpace shader lol

wise isle
#

theres one more issue, I can't create textures at runtime and ReadPixels operates in pixel space

#

I'll probably have to make really large texture and then only use regions of it depending on screen res

#

wait Screen.width is not exposed are you shitting me

#

i wonder what the behavior will be if I just set some larger number

#

GPU go brrrr

fiery yoke
#

Camera.width / Camera.height

wise isle
#

can't access player camera

fiery yoke
#

Any camera that doesnt have a RenderTexture is a "VR" camera

#

and will automatically adjust to the screen

wise isle
#

oh really now

fiery yoke
#

Yeah. And for Desktop the Camera already adjusts to the screen

wise isle
#

do you know if in VR the camera will handle single pass stereo correctly when checking those

#

as in will X be [0; 2*width] or not

#

this just keeps getting more and more unholy man

fiery yoke
#

When it comes to VR rendering, only god may help you lol

wise isle
#

Doesn't prevent it from actually taking the snapshot though, I'm not sure if this will stop my udonbehaviour

#

Kind of makes sense why this happens but unfortunately I can't use OnPostRender on the correct camera since that would be the player cam

#

It works! Pog

#

Now to write the actual encode/decode logic

fiery yoke
wise isle
#

Yeah I was having a smooth brain moment, already did it

#

Thanks 🙂

wise isle
#

Damn this is pretty slow, I think I'll have to amortize it over several frames

wise isle
#

amortized it over 60 frames, runs a bit better now

wise isle
#

bruhest of moments

#

it looks like there is a limit of 16k characters when pasting into a text field

fiery yoke
#

Yeah

#

Thats a Windows thing

wise isle
#

I wish I had known

#

That kind of kills the idea

fiery yoke
#

Didnt know your data was gonna exceed 16k characters xD

wise isle
#

Not nearly enough data xP

#

It's more in the order of 1 mill characters

fiery yoke
#

jesus christ

#

A standard ASCII Character is 1 Byte

#

Megabyte. I knew I was mistaken lul

#

So yeah one Meg is actually not too crazy then

proven musk
#

Hi, can you guys point me in the direction of some good Udon YouTube tutorials? Beginner looking to get started.

verbal socket
#

is there a way to make a clickable thing in a world that takes you to a site link ?

#

i'm working on a shop in my world so i can link to the things i'm selling

paper plinth
#

am I allowed to scale the player capsule / camera / everything?
do I have a limit?

#

like scientists watching rats run a maze

#

I know when I put on a small avatar everything I see appears larger, but I still can't go places I normally wouldn't

manic yarrow
#

Is it possible to make objects activate/deactivate based on distance?

#

Let's say there's a room with a mirror in it, and the mirror should only be active when someone is in the room itself.

#

Ideally it'd be local too, so people don't activate mirrors for everyone.

void ridge
manic yarrow
#

I assume you'd make the trigger the size of the room

void ridge
#

make it whatever size works best for your needs 🙂 you could activate it just before people enter so that they don't see it pop in and out, or make it exactly the size of the room

manic yarrow
#

Also, I need to do it for a lot of mirrors

#

How would I stop it from activating every mirror?

void ridge
#

The mirror will be a GameObject public variable, and just assign each mirror as the specific value for each collider. You can even use the same Udon program asset for every collider, just have them referencing those different gameobjcts

manic yarrow
#

Got an existing graph I could refer to?

void ridge
#

I do, actually 🙂 but I'm eating chicken nuggets so you'd have to hang tight for a minute

manic yarrow
#

That's fine, I'm in no rush

paper plinth
#

Haha!
You set your bool without using bool const!!

cunning mist
#

This patch doesn't need that anymore

void ridge
#

Also, that bug didn't affect that kind of node. It only affected nodes that set declared variables
#udon-general message

gilded citrus
#

anyone else that has guidance on how to make an object and its colliders dissapear for the whole instance, feel free to chip in as well

paper plinth
#

oh lol

void ridge
# gilded citrus

Two things. First, you're using SendCustomEvent, which I don't blame you for mixing up with SendCustomNetworkEvent, since they're named very similarly (and do pretty similar things)

paper plinth
#

Can I just import the new SDK over the previous version?

paper plinth
#

noice

#

this is my first time updating it

void ridge
fiery yoke
#

Also even if it is networked, it might desync with late joiners.

gilded citrus
gilded citrus
void ridge
#

Still, if you want something to be global, it's good to make it reliable. Less disconnect between people's experience the better (my opinion)

void ridge
#

The slightly unintuitive part is that you're gonna end up plugging the Interact node straight into the SendCustomNetworkEvent node, and then your Event.Custom node is gonna be sitting right there next to it, receiving it.

void ridge
#

exactly

#

The invisible thing that's happening here is that the space between SendCustomNetworkEvent and Event.Custom Event is networking. For the person who interacts with this thing, this whole graph gets used, starting with Interact. But for other clients, those first two nodes don't happen. Instead, network data is the thing that starts the execution, at the Custom Event node.

gilded citrus
#

That makes sense

void ridge
#

Also, like Helper said, nothing in here is making new players that connect actually get the news about the on/off state of this object. To make that part work, I'm a little unsure. I guess you'd need to create a new variable, sync it, and then use a Custom Network Event to tell all players that they should apply the newly-synced value?

#

And then also when a new player connects, while they're starting to run everything, they should take the soonest opportunity to check the synced variable and apply it

#

The annoying part there is that Start is too early to have synced variables 😕

Is there really no event that fires at or after the beginning of receiving network data?? That's starting to feel like a really important thing

#

But I'm fumbling here, this is past the point of knowledge I've actually applied.

gilded citrus
verbal socket
#

Is there a way to have a working shop in vrchat ?

#

Like click sign and your taken to the gumroad page

paper plinth
#

they have relationships with partners who have special access to do that

#

I asked before

#

we can't send people off the platform

#

If Audio.GetSpectrumData and Audio.GetOutputData are both deprecated, how can I get a number out of the currently playing audio stream to bounce a light to?

gilded citrus
verbal socket
#

great then i just added something to my world thats useless kinda

#

ill rethink it -.-"

cunning mist
flint kite
#

i not sure how make roller coaster by use physics

#

use udon

paper plinth
#

ok looks like I'm using GetSpectrumData then lol

chilly aspen
#

Is there an way to detect if a player changes avatars?

chilly aspen
#

The SendCustomNetworkEvent and CanvasUpdate isn't necessary, just a GUI to show the updated owner across all players.

chilly aspen
#

Does a game object with Synchronize Position set to true not have its "Is Kinematic" boolean changable during runtime?

royal goblet
#

How would I go about streaming audio from an external source (URL) rather than embedded audio files? Seems that video streams are well supported but I can't find any info about streaming audio only. The VRChat release notes mention that soundcloud.com has been added as a whitelisted domain in SDK3, but there's no guidance I can find on how to stream from their API. Any help much appreciated

manic yarrow
# void ridge

If I wanted to activate 2 mirrors simultaneously, would I just add a second variable?

#

Or would it be better to make an empty with both mirrors inside?

void ridge
#

Others may have better insight, but my reaction would be to go with the latter. It's easier to implement, and I'm pretty sure doing it that way means you have less data to synchronize.

manic yarrow
#

I have to do this to 16 mirrors

#

so less data is definitely a priority

void ridge
#

You want to have 16 mirrors enabled at once? vrcVPoorThinking

manic yarrow
#

So that the only mirrors enabled are the visible ones

void ridge
#

OK, but as it happens, you've got two that you happen to be pairing together?

manic yarrow
#

yeah

#

8 sets of 2

#

Trust me, I thought my PC could get away with the mirrors being enabled

#

sub-10 framerates aren't fun

#

2 mirrors is fine though, since pretty much everything about the map is baked

#

How would I test that it's working?

#

I can't really check what I'm not looking at

#

Never mind I'm dumb

#

It obviously works because the mirrors are disabled by default

#

the fact I can see them proves it

ember dock
#

hi, im trying to find a post processing panel prefab, does anyone know where i can get one?

gilded citrus
manic yarrow
#

Thanks for the help @void ridge, This'll be useful for a different thing I'm working on too

#

Instead of making one thing appear once someone enters a trigger, I want to use it to HIDE multiple objects

rigid plume
#

Anyone know a good way to eliminate Z-fighting between two planes that are close to each other? I've got a semi-transparent plane just above an opaque plane in my world to make a sort of water effect. It looks fine from ground level, but from higher elevations, they start to flicker.

#

The semi-transparent plane is just a little higher than the opaque plane on the Y axis.

manic yarrow
#

Z-Fighting only happens when 2 things exist EXTREMELY close together

#

would it be an issue if you moved one of them by .01 or so?

chilly aspen
#

I went around that by randomizing the Z-axis just a tiny bit for local players.

rigid plume
#

Hmm... I could make an Udon script that slightly moves the lower one down as the player goes higher in elevation.

manic yarrow
#

Would it be possible to make a Udon graph hide everything but a certain object?

#

I've got a map made up of different rooms, and I don't want people to be able to see the rooms they aren't in

#

So it'd be ideal if I had a script that could hide everything outside of a room

#

I thought it would be as easy as slipping a NOT into the trigger thing that @void ridge posted, but I'm not sure

void ridge
#

Eh, yeah setting the active state of GameObjects doesn't quite work like that.

manic yarrow
#

I was going to hide everything and then only activate the room you're in, but you spawn in one of the rooms at random so when you first spawn you just fall

#

because you never technically "entered" the trigger

void ridge
#

Also, as I understand, if you're only talking about sparing meshes being rendered, then you ought to be using the occlusion culling system to do that

manic yarrow
#

I'm using it as an alternative

#

because culling acts up with what I'm doing

#

This wouldn't be an issue if the rooms were closed, but some of them have open tops or windows

rigid plume
#

is there some way to get all Game Objects in a scene? If you can do that, then you can just iterate through each object and check if they're not associated with that room and set isActive to false.

#

Pretty sure there's got to be some way to do it. I've seen Hens' Water Closet world do it with the Shrek button.

chilly aspen
#

Have a heirarchy of game objects grouped on empty objects. Then store those empty objects in a game object array. When a player enters a room, set all the empty game objects to inactive, and pull the index of the room that is active as active.

rigid plume
#

^ That sounds like a way better way to go about doing it.

chilly crater
#

How does one go about finding the closest player to a gameobject inside its trigger area?

fiery yoke
#

You have to individually check all positions

#

You can do some optimization by only checking players inside the trigger by registering and deregistering them from an array.

chilly crater
#

How does one do an array with the graph?

#

I have 90% of the script in it, I'm in too deep.

#

I corrupted Vowgan's roomba into a hunter robot.

crisp grotto
#

I have such a dumb question its both embarrassing and difficult to search for. Just working to create a button that will pass a specific numerical value to the float value of something in another program. Been reading up on some old documentation trying to figure this out, but seems like some of the terms have possibly changed a bit since it was written/recorded. Would really like to figure this out myself, but I'd be extremely grateful for any pointing in the right direction for examples/docs.

valid totem
#

I am working on a game with a sphere that when it goes through a goal it increments the score. I'm trying to do this in udon graph with a trigger box collider, a sphere collider (with rigid body), and a canvas with text. The udon graph looks like this

sharp briar
#

is there like a minimum size for on player enter trigger boxes?

chilly aspen
# chilly crater How does one go about finding the closest player to a gameobject inside its trig...

Edit: There is an edge case where if the triggerBox is rectangular, a player that is not in the triggerBox could be called as being the closest player. The workaround for that is to have a gameObject triggerBox follow each individual player's position, and should this triggerBox enter the other triggerBox, then it accepts that player as a valid candidate for closest player.
Also OnTriggerStay is repetitive since it could potentially fire 10 times for 10 players in the triggerBox. A boolean stop-check would only fire this once per frame, then reset on the next Update() statement.

chilly crater
#

Thanks.

#

I think I reached the end of an udongraph. Any time I try to add stuff, the noodles disappear and other stuff happen.

#

I probably have to update the SDK

pallid roost
#

For some reason, avatars with chairs have stopped working in my world. Yet they still work in other worlds. It only happened recently. Any diea why?

vestal sluice
#

Quick question, for making Udon triggers is there method like UseAttachedStation() that allows the player to leave the station when immobilized for vehicles? if so what is the reference to that that trigger? 🙂

lean jetty
#

Hello.
Sorry for the rudimentary question,
Udon Sharp after importing SDK3 + Udon with unity
I imported it
It is not reflected in the Udon Assembly Program of the object's Udon Behavior (Script).
Was the installation method wrong?

I would appreciate it if you could answer.
Thank you for your cooperation.

chilly aspen
#

Yes that looks fine.

dusk lintel
#

I would like to make nerf guns for a world that shoot nerf darts that stick to the world object

#

I have the nerf guns and the bullets that are separated

#

now i have to figure out how to do it

paper plinth
#

Sounds like you can tell it just to stop and stay where it is when it hits another object, then I guess the other object could parent itself to it?

chilly crater
#

Couldn't you on collision activate kinematic on the projectile? Then go to a despawn timer?

#

Vowgan has a video on pickups that goes through a demo of a gun here: https://www.youtube.com/watch?v=xJJG0m0Mwgc

Here I go over how to use Pickups with Udon, using a ball gun to show off picking up, clicking, and drop events for it. I also start using the new Udon Graph system rewrite, so while it's still in open beta testing, this will make the tutorial more understandable later on when this version is the current build, so that not all of my tutorials wi...

▶ Play video
#

Instantiate doesn't sync yet. But You can cannibalize it to make a gun that does sync projectiles.

#

Nevermind, didn't read that all the way through.

#

ANYWHO, object pool the projectiles. And on collision, toggle kinematic. You can do it in two scripts: one on the gun that shoots the projectiles, and one on the projectiles themselves that handles despawning (if desired) and collision stuff.

#

Something like: Event start > isKinematic : false. then on Collisionenter event > isKinematic : true. From there you can do your timer logic to disable after a set time if you want.

#

This is more a quick and dirty route, but won't stick to players. Of course, I have rarely seen a nerf dart stick to someone.

chilly crater
#

And do I even have to bother with a nearest player array? Couldn't I just turn the collider off and on again real fast? That should reacquire a rsndom-ish target still in the area, then I just have to make something that slowly increases the collider radius over time of inactivity.

hallow sable
#

what would be the best way I could sync a changing ui? I have a counter that changes with udon graph on a button push but I would like it to sync to players + late joiners

tall vault
#

The property for scale is localScale

vast locust
vast locust
#

Hmm,
Tried updating my SDK to the latest version so I would keep it fresh but I suddenly get this error, Anyone what it can relate to?

'VRCUdonCommonInterfacesIUdonEventReceiver.__GetProgramVariable__SystemString__SystemObject'. Parameter Addresses: 0x00000019, 0x0000004D, 0x000000CC

scarlet lake
#

Do I come here if I have a question about something?

gilded citrus
void ridge
#

?whatisudon

hidden martenBOT
#

VRChat Udon is a programming language built by the VRChat Development Team for use in VRChat worlds! It enables complex behaviors and logic in VRChat worlds. Read more about Udon in our documentation: https://docs.vrchat.com/docs/what-is-udon

scarlet lake
#

I just realized there's a vrchat support

void ridge
tribal meadow
#

I have a script that controls an object collider which is set to trigger a teleport. This is being used to lock out a certain area, the problem is when new people join they see the object on (the default) while everyone who was there before sees it as off (locked) I need the object to maintain it's (off) status even when new people join the world...How do I do that? I was told by someone there is a way to set this when the player enters the world but I haven't a clue what kind of script I would need to do that.

#

I'm also having this issue with toggleable objects not appearing when new people join the world and the objects have been turned on by other players. This is kind of critical to make the world work properly

#

My door lock script

void ridge
#

Getting really tempted to write an ask article about this. Or at least, someone should 😛

tribal meadow
#

It's a pretty important 'feature' I would imagine, especially for door locks

#

I'm guessing something has to be added to the spawn point when people enter the world, but having to do that for every object variable in the world is going to be a bit of a nightmare to program

void ridge
#

For a lot of things. Keeping global stuff synced isn't trivial. I won't call it tricky, but you have to do a lot of taking positive action where you might otherwise expect stuff to just be "implied." Networking is hard 😄

#

That situation is pretty much identical to what you've got here. Again, disclaimer, this isn't stuff I've directly applied in this way yet. So someone else may have an easier or better solution.

tribal meadow
#

yeah that exactly

void ridge
#

But basically what you're doing is adding an intermediate step between each place where you're doing SetActive. Instead of just setting the active state, you're updating a synchronized boolean to what that active state should be, and then the custom network event is just telling players "hey, new boolean value, use it"

#

And then, for new players that connect you can just add a special line that applies the boolean value once they've finished loading in

tribal meadow
#

That's kind of what I was thinking, my knowledge of how to do that is pretty weak, was hoping there was an example somewhere I could 'see' visually

#

I was going to suggest, when they do the documentation up for an udon node, it would be really helpful if they could also include a screenshot script, showing it's use as an example, so people have an idea how to implement it

void ridge
#

Big caveat here: I did do something like this once where I was syncing a Quaternion and then sending a Custom Network Event to apply that synced variable. Problem was, it backfired. Somehow, the custom network event seemed to be arriving before the variable sync, so clients were always applying the next oldest value 😩

tribal meadow
#

hmmm

void ridge
#

My solution was real dumb. I just made the custom network event start a timer that waited for a few network updates before actually executing the rest of the graph 😅

#

That's the kind of thing that makes me think this approach is the wrong one. I gotta believe it's simpler than that. But, I dunno another way, so 🤷‍♀️

tribal meadow
#

I would hope

#

You would think by default, the system would check all world variables and set them for the new player joining to what they currently are for everyone else when they load in...This is kind of a bug IMO.

void ridge
#

I think this is just kinda what networking is like 🤷‍♀️ VRChat may or may not take some steps to make it more newb-friendly

tribal meadow
#

yeah

prisma timber
#

How do I get allowed to create avatars

void ridge
prisma timber
#

ok thanks

tribal meadow
#

its like an 'onplayer enter' check this variable and set the variable to what it is ACTUALLY set at' I'm not sure how to code that in a graph.

void ridge
tribal meadow
#

This world may have 30 or 40 global toggles in it by the time I'm done (this is a real headache) I may abandon this whole project :P

void ridge
#

Nooo u gotta d e s i g n

tribal meadow
#

Programming is not my forte

void ridge
#

Learning's the only tough part.

tribal meadow
#

I guess i don't understand how to make a script to get the new player to check all the variables before spawning and set them correctly. IMHO that should be automatic, but I'm not the developers.

floral dove
void ridge
#

oh, heck sorry about that

minor hare
#

Does someone know why the video-players are not looping even though I don't have a Udon behaviour on it?

#

They should according to the documentation when its set to loop

chilly crater
#

It's a first come-first serve trigger entry to determine the target.

chilly aspen
chilly aspen
chilly crater
dusk lintel
#

I was working on the nerf gun earlier today and came up with some errors, I will send the graph picture later and the console errors that go with it, or the assembly if that works too

#

The nerf gun shoots once but not a bunch of times like the gun does in vowgans tutorial

vernal maple
#

I need assistance. What might be causing this issue enmasse?

fiery yoke
#

Too much network traffic

vernal maple
#

I was worried about that

fiery yoke
#

Ohh

#

no I actually think thats something different

#

You might be trying to sync a null string

vernal maple
#

As a matter of fact, that MIGHT be happening

fiery yoke
#

Yeah I was one of the first to discover that thats a big no no 😅

vernal maple
#

My "PlayerName" variable on each playerData object is by default null.

fiery yoke
#

Yeah never sync null strings

vernal maple
#

But I no longer check for an empty seat based on a null string, thus, I could just write "Empty"

fiery yoke
#

do String.Empty or just ""

vernal maple
#

Ah

#

That could work too.

#

String or string?

#

Which case

fiery yoke
#

ohh "string.Empty"

#

"String" is a wrapper class for some advanced stuff in C#

vernal maple
#

Gotcha. <3

#

Now the string I was thinking about was set to "", are you sure that's good enough to avoid that error?

fiery yoke
#

Ofcourse Im not sure. But otherwise I have no idea ¯_(ツ)_/¯

vernal maple
#

We're going with the word empty, to be safe

#

:D

#

Didn't fix it.

#

But the one client that is causing issues in the world presently... is a Steam user who hasn't gotten a VRChat name

#

Very odd

#

Errors stopped the moment the Steam User left

#

fun

fiery yoke
#

So were you using VRCPlayerApi.displayName?

vernal maple
#

Yes

fiery yoke
#

Can you show the code/graph for that?

vernal maple
#

I'm not actually sure where the issue is even occuring. ._.

fiery yoke
#

Wherever youre using displayName for now :P

vernal maple
#

There are more than 30 instances.

fiery yoke
#

ohh boy

#

Well you should probably sanitize your synced strings OnPreSerialization by null checking them.

vernal maple
#

How would I go about doing that? :D

fiery yoke
#

Check every string in OnPreSerialization for being null and set it to string.Empty..?

vernal maple
#

I'm actually confused, where is OnPreSerialization?

fiery yoke
#

Its an event

#

That occurs before the owner of the object serializes the data to be sent over the network

#

You also dont need to check every string. Just strings that "might" become null for some reason.

vernal maple
#

So we've got a whole two strings that can be Synced. I'll go ahead and Pre serialize them and see what turns up.

hallow sable
#

what is the best way for me to sync an string?

#

I setup a counter, wondering if I can just turn on sync in udon graph?

vernal maple
#

A number counter?

hallow sable
#

pretty much a button that connect to text

#

and it increases by 1 when pushed

#

I'm guessing to sync it I would have to do isowner

vernal maple
#

You would want to do an int not a string

hallow sable
#

well I do int to string

#

to make it display on a text

vernal maple
# fiery yoke Its an event

Alright so we aren't getting anything weird as a null string. Is there a maximum limit on how long a string can be?

hallow sable
#

I'm trying to use this example rn

fiery yoke
vernal maple
#

This is officially the longest name I've run across thus far.

#

I'll look more into it. I assume the steam user is getting udon errors that I need to see, so I'm just gonna need to find a reliable steam user

fiery yoke
#

You can also just truncate the name to be safe

vernal maple
#

Gonna need to try that.

#

It was then in a stroke of brilliance that Riney realized, using GetOwner on a gameobject, I could just pull the displayName and ignore syncing it.

hallow sable
#

wait so

#

would this work?

#

setup a counter

#

it works

#

that is the right side of it

chilly aspen
#

Just out of curiosity, does Synchronize Position = true consume bandwidth?

void ridge
unborn hornet
#

The world I tried showing off this week proved that point lmao.

void ridge
#

I'd really, really like to have a guide on how accurately to assess networking use and constraints. Granted, that's a moving target for Udon since we know it's getting updated frequently. But still, I'm sure there are some really good rules of thumb.

#

But also I guess you can do a lot with effective logging and debugging, which I just plain don't know how to use effectively yet.

unborn hornet
#

Once we can send events with a payload, that would nullify any existing guide for udon networking. We'll have to see what the next networking update has in store.

shut lodge
#

Hey, it's my first time with Udon Noodles.. but not my first null hunting... can someone spot the null? Log claims null on position but I'm checking for null.. unless equals doesn't check the pointer... :/ What am I missing? My sanity? At this point yes. but that's besides the point...

unborn hornet
#

This node should be getting the Type of Transform, not GameObject.

fiery yoke
#

lul nice

fiery glen
#

Does anyone know how to synchronize all the information in the scene (objects... etc.) for the player who enters the game halfway through?

#

I found that using VRC.Udon.Common.Interfaces.NetworkEventTarget.All is only limited to players in the same scene, but players in the middle of the game cannot synchronize their previous actions.

#

How to synchronize all the objects and location information after entering like VRchat game (harry's 8ball) scenes?

scarlet lake
#

So it says unusual client behavior when I never download mods or clients and the only one I did was openvr-calibration for my vive trackers so please tell me what is wrong?

valid totem
#

Also, Is there anything like a switch statement in udon?

fiery yoke
valid totem
#

okay, thank you

#

I'm trying to use the name of the collider to choose the right custom event to send

#

but there is 7 different collider names to compare

valid totem
#

collider get name gets the name of the object that collided with the trigger, in this case that is the object that's thrown

#

How can I get the name of the static trigger collider instead?

cunning mist
#

Are you trying to check to see if an object you collide with is Static? If so, static checks only work in editor.

olive jay
#

Heyo! Really feel like I'm overcomplicating stuff, anyone got a simple way to play a video based on a button press?

As in having a URL linked to a specific button

fiery glen
#

Does anyone know how to synchronize all the information in the scene (objects... etc.) for the player who enters the game halfway through?

velvet wharf
#

This simple was test for other thing i make which have code in that event get run three time and cause issue.

shut lodge
chilly aspen
fiery glen
chilly aspen
#

This will sync the position of the object for new players. It's best to "dirty" the position of the object every once in a while so the server updates it.

chilly aspen
fiery yoke
chilly aspen
#

oh haha

fiery glen
chilly aspen
#

Ah I see

fiery glen
#

What I want is that if I interact with some objects in this scene or press the button to change the texture map, the player who joined in the middle of the scene can see the new objects.

#

Have any ideas? Can you help me?

chilly aspen
#

Yes one moment

fiery glen
chilly aspen
#

That syntax will always change the material even if the button wasn't pressed, the below should work:
public override void OnDeserialization() {
if (isMatChanged)
{ ChangeMaterial(); }
}

chilly aspen
#

👍

winter plover
#

Should the Devs make a andord and iOS port

flint kite
#

no

#

@winter plover

heady tusk
#

...i am a noob at udon.. i found out how to make a door open and close via animator.. but how i make that global?

dapper lion
#

sync position

heady tusk
#

hm.. did not really work.. but i have the feeling cause it works over a Animation?

dapper lion
#

ive never acc done animations for worlds, but id assume syncing positions wouldve worked

#

theres a prefab for an automatic door, but im assuming youre using that?

vast locust
#

What is the best way to update the SDK in a world project?

#

Just import the new one into the project?
Remove VRCSDK + UDON and import new one?
Go to the folder where the project is and remove everything from there?

dapper lion
#

make new project and shove all the assets back in

vast locust
ionic gyro
#

when updating the SDK for avatars, you simply import the new SDK on top of the old one

#

it could be the same for worlds too, not sure

vast locust
#

Give me two seconds, Opening up project

#

Should I go to Assets -> Export package?

viscid reef
#
#

follow those instructions

hallow sable
#

what is the best way to sync a ui text?

#

I have a button that does addition on press so like a counter but idk the best way to sync it with udon

vast locust
#

When I try to update SDK to latest I get this error;
An exception occurred during EXTERN to 'VRCUdonCommonInterfacesIUdonEventReceiver.__GetProgramVariable__SystemString__SystemObject'.

Seems to be a rather strange issue

scarlet lake
#

Anyone have a moment to help me figure out how to setup a toggle for colliders using udon?

#

Trying to make a switch for seat colliders and its a PAIN lol

floral dove
fierce pond
#

I'm super new to world building, so apologizes if this was already asked or an easy answer i missed. I can't find any how-tos to create a "trash bin" and global delete button for pickups that are spawned in.

Also, after I updated the SDK, and it looks like the Unity Destroy node is now missing?

heady tusk
#

Is it true that you can't see object Sync when you use Local testing with 2 Clients?

cunning mist
#

Some things about local client testing aren't perfect, though position sync should work fine.

heady tusk
#

ok then i have no clue anymore xD i am trying now for like 4 hours to get this to work

chilly aspen
cunning mist
#

What's the thing you're trying to do specifically?

heady tusk
#

A Door that works via Animator to Open and Close for Everyone

#

I have the door working. But now to get it Global is my problem

cunning mist
#

Ohh, when you said ObjectSync I thought you were trying to sync something's position.

#

Is the door opening on interact?

heady tusk
#

yep. Has a Box at the Handle that has the udon Script in it

cunning mist
#

Then instead of setting the animation book right there, use SendCustomNetworkEvent to All and call a new event in your script, named like Toggle or something. That way, everyone will get the call to toggle that specific door. There's a chance it might be inversed for late-joiners with this method though.

heady tusk
#

go slow on me please xD I have the SendCustomNetworkEvent. What you mean with "New Event". I am allready thankful for the answer 😄

unborn hornet
#

Under Special select Event Custom

heady tusk
cunning mist
#

Yep!

heady tusk
#

if it really was that easy.. i will eat... dunno. I was thinking again 10 times more complicated

cunning mist
#

If you want to make it the same for people who join in late, you'll have to do a couple more things.
#udon-general message

heady tusk
#

I was thinking with like 2 Time Network event.. and.. oh god

#

It was a mess xD

cunning mist
#

Networking isn't something that's easy to jump right into...

heady tusk
cunning mist
#

What variable do you have there?

heady tusk
#

The Door Animator

cunning mist
#

Syncing the variable itself to other players does not sync any animations. That just tells everyone that this animator variable references a specific animator, there's no need to worry about syncing that.

heady tusk
#

Ok. Thank you so much and also thanks to @unborn hornet 😄 I should have asked earlyer

unborn hornet
#

No worries. Networking in general can be a difficult thing to grasp. Many factors and quirks to take into consideration. Let alone Udon specific things as well.

#

The goal for working with udon networking is to eventually get it to be good enough.

cunning mist
#

The closed beta for the networking patch is big nice, but it's also very slow to develop so can't wait until 2022

unborn hornet
#

Clarify "slow to develop"?

cunning mist
#

Danly is the only person working on it so progress is slow

unborn hornet
#

Ah! Yes, right.

paper plinth
#

can someone pls tell me what goes here? I want to change player mods if you're holding the object (and hit use), but only for the player holding the object

#

so you can blast around with super speed as long as you hold the button down, but when it comes up, you go back to normal

floral dove
paper plinth
#

right on thx

floral dove
#

something's trying to show an editor for a Double, but there isn't one defined.

paper plinth
#

in the inspector

#

anyway all my player mod powerups work now so that's major progress

#

Except I accidently doubled gravity instead of reducing it by half

#

now I am looking for a public go-kart/driveable car if someone knows one that works with the current sdk

paper plinth
#

the one in prefabs is super cute, I made it different colors

#

any others?

chilly crater
#

Does OnPlayerLeft fire for everybody when someone leaves?

hallow sable
#

how come every sdk import I do, there is no examples folder

#

I really need syncui example 😦

floral dove
hallow sable
#

I’m looking for the syncui example

#

Where would that be

floral dove
# hallow sable Where would that be

it's under the 'Udon Variable Sync' prefab. The included Readme explains all the examples. If you're just getting started, I recommend you go through all the examples in the scene to learn what you can do.

hallow sable
#

Gotcha ty 🙂 tutorial I found must be old

#

wait there isn't even a variable sync prefab

#

D:

floral dove
hallow sable
#

AH nvm yeah

#

sorry

tall vault
#

@cunning mist It would be great if that closed beta could be open beta so they could get the feedback they need before it goes public/live instead of leaving it until its too late to suggest improvements

void ridge
#

Is there a simpler way to do this? If there's a more appropriate node, I couldn't find it ☹️

floral dove
cunning mist
#

Purpose of closed betas: building the thing
Purpose of open betas: throw people at it until it breaks

fierce pond
floral dove
harsh magnet
#

I only fiddled with Udon Graph for about 45 minutes before I moved to Udon#, and I'm so glad I did. Much faster development time if you're at all comfortable coding and want to do any amount of complex logic or error checking, etc.

void ridge
#

I'm happy with the graph editor for now, thanks. I'm plenty aware of U#

harsh magnet
#

Cool

void ridge
#

My question was more in the nature of: is there a dedicated way of checking to see that a Vector3 is valid. Also, I've answered my own question 🙂 the guide I was reading appeared to be checking a whole Vector3, but I was misunderstanding, and it was only checking one component for NaN

harsh magnet
#

Yeah I suppose if one axis is NaN the entire transform is pretty much useless 🙂

cunning mist
#

That could make a nice node request. I haven't heard much of node requests in general, but I think having individual nodes that can perform specific tasks like this that you would otherwise have to write out more complexly without changes between implementation, could make for a good specific node we could use. At least, until the fabled Nested Graphs return...

void ridge
#

Yeah, for sure if I'm tripping over the same use case for something a couple times, I'll be making a canny request. This one is kinda far out, though, so not worth dev time. (also, like I said it wasn't based on a need, it was based on my mistake)

harsh magnet
#

haha you just answered my question

void ridge
#

Oh yes, canny and I are old pals

#

Also, nested graphs was a thing? That sounds nice

floral dove
cunning mist
#

I feel like subgraphs will be one of those things where there's going to be one big community made pack that it's basically required you import.

vernal maple
#

Quick question

#

When a player rejoins the world, assuming nobody else has joined, do they reclaim the old VRCPlayerApi index, or get a new one at the highest number?

fiery yoke
#

You mean the playerID? If so then yes, the latter.

vernal maple
#

Good to know

valid totem
#

Is there an easy way to get the name of the button the player interacted with?

#

via udon graph?

floral dove
valid totem
#

thank you Momo

vernal maple
#

Trying to implement a rejoin feature into this world, and thus far it's being a complete pain.

#

Oh dear, I know what it's failing now.

#

I don't sync the string that contained the name anymore to avoid that strange af error. ._.

#

Is there any other way to pull information out of LocalPlayer that contains some sort of VRChat index the player might have globally?

hallow sable
#

using the Norix Wolfe Video Player does anyone know how I set a custom url with graphs?

vernal maple
#

No no, scrap that

#

I need a way to convert a DisplayName into an int, float, double, or something that works conveniently in UdonSync.

#

Or find a way around syncing strings. Lets try truncating to 15 characters, maybe that'll work

floral dove
#

yeah, DisplayName is the only thing that will be the same between rejoins.

vernal maple
#

Truncation it is!

fiery yoke
#

Provided the user doesnt change his name inbetween sessions lol

vernal maple
#

That... should... hopefully never be an issue. o_o

fiery yoke
#

Well can happen. But probably wont :P
And even if, then its their problem not yours ;D

floral dove
fiery yoke
#

But then you cant get back right?

#

That would only let you identify uniquely

#

but not act upon it

floral dove
#

you can't go from HashCode back to displayname, no, but you can't do that with truncation either. It would let you check if the user is returning

fiery yoke
#

With truncation you could guess lol 😅 Depends on how much you truncate it

vernal maple
#

GetHashCode would provide what kind of output though?

fiery yoke
#

Ohh wait

#

Int

#

and you can get back

#

you just need to check every player apis hash for equality

vernal maple
#

I only need to change into it, not the other way around, so that would work wonderfully.

fiery yoke
#

Yeah then changing an int is definitely better than a string

floral dove
#

that's why I suggested it! I ran a few tests and it spit back unique 9-10 digit numbers, so it should meet your requirements

fiery yoke
#

Syncing an int takes 4+1 bytes

vernal maple
#

I could easily sync that too.

#

Thanks everyone for all the help. <3<3

paper plinth
#

So I have a go kart track, and coins, and a counter for the coin pickups that sends a custom event to a cube that slides along a rail to indicate your progress to 100% of the defined coins...

My question is...if I don't send any network events or synchronize any of those objects, are they individual for each player in the world? As if each player were playing their own instance of the game and they wouldn't interact?

floral dove
#

yes. The only things that automatically sync are Avatars and VRC Prefabs like Pickups and Stations

paper plinth
#

that's really convenient thanks

#

I was thinking how I was going to deal with that

#

just ..don't implement it

valid totem
#

What is the correct way to reset objects to their starting location?

fiery yoke
#

There is no correct way. At least not that Im aware of

valid totem
#

ideally via graph

#

lol okay

#

quick and dirty?

fiery yoke
#

One way is to reset it manually. The other is dropping it below the respawn height. The latter only works for Position Synced Objects.

valid totem
#

manually as in, move it to exact coords

floral dove
#

On Start, save the transform.position to a Vector3 variable. On 'Reset' or whatever your custom event is, set the transform's position to your saved Vector3 variable

fiery yoke
#

Some considerations have to be made with that

#

if it is a synced object

#

then you need to tell the owner

#

to reset it

unborn hornet
valid totem
#

oof

fiery yoke
floral dove
valid totem
#

I got real deep in this udon game and then realized how network events are the way to do things if I want people to play together

fiery yoke
valid totem
#

When I refactor for that, it seems like I need to change my SendCustomEvents to SendCustomNetworkEvents

#

What is the OnDeserialized for?

floral dove
floral dove
valid totem
#

thanks again @floral dove and @fiery yoke

tribal meadow
#

On an object I have set the 'transform rotate' node, is there a way to increase or decrease the speed of the rotation?

paper plinth
#

show graph

void ridge
#

If you want to continuously rotate, you can execute that node for a small amount of rotation each frame. The angular change per frame is what determines the speed.

tribal meadow
#

ok, increased the angle value and that appears to make it do what I want...setting it to 100 is making it go really fast now

void ridge
#

Consider multiplying that value by Time.deltaTime. That allows framerates to vary but the rotation speed of your thing will stay constant (Because Update happens every frame, and the time between frames is squishy)

#

Oh, I see now that you meant you already had it rotating, sorry for misunderstanding 😛

tribal meadow
#

yeah, I should have tried that before asking

valid totem
#

oohh it would be cool if there was support for incoming/outgoing webhooks

#

imagine it could get weird though lol

fiery yoke
#

Yeah, you wanna open the flood gates for malicious people? :P

valid totem
#

not particularly, but having an in game survey would be nice

muted basin
#

Is or isn’t it named after a type of noodles?

cunning mist
#

The nodes have some wiggly connectors, chonky noodle time

muted basin
#

It really is
I’m happy now

valid totem
#

wellp

#

everything works in test, but in game it doesn't

#

For events to work in the live game, everything needs to be network events?

dusk orbit
#

is it possible to have an animated mirror

#

like, a mirror on a plane with blendshapes, so when you toggle the mirror on, the plane opens up

#

if that makes sense

#

i tried adding the mirror component and material to the plane but its showing up black

fiery yoke
#

And Im talking about the model data, not the gameObject

dusk orbit
#

gotcha

#

i decided itd be easier to just animate it in unity

mighty quiver
#

anyone knows how i get the name of the player that interacts with a specific object with Udon#?
kinda new to Udon 😅
and how to synchronize it as well if possible xd

idle flare
#

well udon is interesting to learn. If I have 1 target gameobject with an an animator how can I set it up to when I interact, the animator turns on and the animation plays (i've figured that out), then it will wait for a few seconds until the animation is done and turn on the game object?

paper plinth
#

interact plays the animation and sets a boolean
update handles turning on the game object
put a branch between the update and your logic to turn on the game object to check for the boolean being true and the animation being done
very last thing after your gameobject logic executes, reset all your booleans and return it to a ready state

idle flare
mighty quiver
#

thanks, but i figured it out already by getting every player and check if one of them is the local one, then just get the display name of the player

ivory thorn
#

It will not be synced though ?

mighty quiver
#

not sure, havent tested it yet with another player

#

how exactly does syncing even work with Udon#?

#

all i can find was normal Udon

ivory thorn
#

Either sync variables for late join or synced methods which are called for everyone in instance

#

I never opened normal graphs, they are terrible without Merlin udon would be DOA

mighty quiver
#

as someone who learns java at school, the node programming is hell for me

ivory thorn
#

Anyways you need to assign owner to object then call method for everyone which will display the name of owner

mighty quiver
#

hmm, guess this will be a lot more work than expected xd

ivory thorn
#

should be like 4 lines

mighty quiver
#

i also have a reset button for the object, shouldnt this be synced as well?

ivory thorn
#

by default everything will be local 😛 so depends what you want

mighty quiver
#

so yea, i have to sync that as well xd

ivory thorn
#

I guess on player enter trigger is is networked by def

#

well not really because player enters the trigger for everyone 🙂 unless you put trigger on player local this is what I meant 😛

mighty quiver
#

Udon does not currently support syncing of the type 'TextMeshPro'
thanks, udon...

native kiln
#

I'm a new player to VRchat and when I was inside the game it randomly started downloading inside the game I've been waiting for the last 1 hour and the progress bar is still 22.49 I'm not sure if I paused it or something but can someone help

mighty quiver
#

try restarting the game, there is no pause option for downloads.
also wrong channel ^^

native kiln
#

Oh

paper plinth
# idle flare I am very new to Udon so much of that is giberish. Currently I have two variable...

It's really the same process for triggering an event off an interact as trigging an event off of anything. There are many ways to do this, you just need to find the one that works best in your application. For me, I use update and gate the core functionality of the script with a boolean set by the interact, then clear that boolean after the payload is delivered. But that's super simplistic and doesn't account for really any external influences or network events or anything.

open ermine
#

any sdk 3 tools similar to pumpkin for world thumbnails ?

idle flare
paper plinth
#

Sure you need stuff to toggle and reset.

#

If you can do it without boolean, show code.

#

I have animations that don't require triggers and resets, lots of things. Car drives around the block, for example. My bauble that triggers the transporter pulsates a little. Other things move in basic ways and don't need animations at all, just move them around and synchronize the position.

#

But if you want the user to be able to influence it you need to trigger it somehow and make it interact with the user... Could be any way, could be an interact, could be proximity...

idle flare
#

also how do I know if anything in udon is happening locally or globally?

unborn hornet
#

Stuff you put in your world is always local unless specified explicitly as synced, either by ticking 'sync position' on an udon script in the inspector, by declaring a variable as a sync variable, or by explicitly calling SendCustomNetworkEvent.

The things that are implicitly synced (ie global) is player/avatar data, such as player position, avatar bone/IK information, etc.

mighty quiver
#

yea, i know the theory behind it, but syntax wise im pretty much nowhere. Google doest show anything useful and the Documentation is also pretty lacking

idle flare
#

alright and in the case of detecting whether an animation is done should I set the variable and use an animation clip instead of animator as Im using now?

unborn hornet
#

Im not intimately familiar with animators specifically, but I think you can have the animator set a target bool flag that you can check elsewhere for if it has ran or not.

idle flare
#

Yea im gonna watch vowgans door animations tutorial, seems to have similar concepts at least? Idk I am totally lost on everything this is foreign to me

unborn hornet
mighty quiver
unborn hornet
mighty quiver
#

oh thanks! didnt know he had a discord

unborn hornet
#

Yup. Np.

idle flare
#

how do you add the public animator? cant seem to find it

fierce pond
#

I feel like i broke something. I can't find Unary Negation after recently updating my SDK. Has it been renamed?

#

Is it Boolean.UnaryNegation now? I had to go into the Boolean section to find it, instead of searching "Unary".

wraith wedge
#

I recently purchased "Dinosaur Pack 1.0" asset pack b/c I want to include some dino's in a world i'm working on. they all come with animations and have an Animation component that controls them but seeing as Udon doesn't support the Animation component would anyone be able to point me at some info on how I can change this to something that will play the animations?

valid totem
#

Anyone have ideas as to why local only udon scripts work in build & test but not live?

stoic mountain
#

Hello. Just a little curious about Udon, and particularly what you can and cant do in a custom world regarding scripts, physics & so on ... how much freedom do you have to make custom interactive worlds ?

floral dove
floral dove
stoic mountain
#

so it looks like a proprietary visual scripting system, no c# I guess ? I suppose while you can do quite some stuff with it you must be pretty limited too compared to simply a unity project ?

paper plinth
#

you can use udonsharp

floral dove
floral dove
valid totem
stoic mountain
#

I dont have any particular project, but I have a few questions to get a better idea of what is possible. Can one ...

  • Attach objects to player bones, like bracelet or a hat ? ( ignoring the fact that morphology can vary wildly)
  • Access players ingame camera pictures ? For instance, allowing a player to display on a screen a picture he took with the ingame camera
  • Prevent or force avatar change and apply this rule to specific players ?
  • Get data from an external database ? (like an externalised highscore list)
  • Detect information about avatars, like is the avatar lipsync capable, what its bounding box size & such ?
  • Use physics collisions / joints ? Somewhat heavy scripts ? (what are the server-side performance limits ? is there even a server side or is it just p2p sync ?
wraith wedge
valid totem
floral dove
hallow sable
#

How could I send a set url to a video player with udon? want to setup set youtube videos to play on a button push

floral dove
# stoic mountain I dont have any particular project, but I have a few questions to get a better i...
  • You can make objects follow player bones, though you can't access a Player's hierarchy directly.
  • Direct access to player photos is not supported, but you can create cameras in your world that take pictures visible globally.
  • You cannot prevent an avatar change. You can force a player into an Avatar but you need to tread carefully here - it's important to let players be in charge of their appearance and identity and if this is used maliciously the world could be taken down
  • You cannot GET data from an external source
  • There is currently no lip-sync capability information available. You can use information about bones, etc to get an idea of size but no direct information about Avatar is made available.
  • You can use physics collisions and joints. Would need more info about what you want to do with "heavy scripts"
floral dove
void ridge
#

I can't see the ray that I expect to be drawn with Debug.DrawRay, either using Build & Test or CyanEmu. Build & Test should be enabling the debug gui, right? Or am I missing something?

floral dove
void ridge
#

Oh, is it only visible in Scene view? That might be what I'm missing

floral dove
#

Only visible in Scene View unless you turn on gizmo drawing for game view.

valid totem
quaint onyx
#

Quick question, if collision detection doesn't work with players and we have to use onplayercollision instead of oncollision, does regular raycast still work with players or it doesn't work either?

chilly crater
raven peak
#

@hardy crown which part are you having problems with?

hardy crown
#

I posted it in the forums because it takes a minute to explain what I've tried and where I'm at https://ask.vrchat.com/t/multi-camera-effects-in-vrchat/2964

#

Player camera depth seems to default to 0

#

No matter what I set the reference camera depth to

#

But even with that, I don't know the exact reason it works in Unity but not VRC

#

I'm not even sure this is an UDON problem

raven peak
#

vrchat clamps the reference cameras near plane to .01 - .05