#udon-general

59 messages Β· Page 82 of 1

grand temple
#

yes

jaunty dagger
#

ERROR: [UdonBehaviour] An exception occured during Udon execution, this UdonBehaviour will be halted

#

Quite useless error message.

grand temple
#

hold tab and then click expand top left

jaunty dagger
#

Its already expanded

#

doesn't tell me anything else but that message

grand temple
#

it should show more details if it's expanded

jaunty dagger
#

let me try again

grand temple
#

you can also just go to the file where it's never collapsed

jaunty dagger
#

Possibly that's the error:

2022.01.07 20:49:31 Error - [UdonBehaviour] An exception occurred during Udon execution, this UdonBehaviour will be halted.
VRC.Udon.VM.UdonVMException: The VM encountered an error!
Exception Message:
An exception occurred during EXTERN to 'VRCSDKBaseVRCPlayerApi.__GetTrackingData__VRCSDKBaseVRCPlayerApiTrackingDataType__VRCSDKBaseVRCPlayerApiTrackingData'.
Parameter Addresses: 0x00000009, 0x0000000A, 0x00000008

Object reference not set to an instance of an object.

#

Not sure, as the log is a mess

#

But I do nothing with TrackingData here, so might because I am not using a VR headset

grand temple
#

that's probably a different udonbehaviour

#

are you sure this udonbehaviour is crashing when you click interact?

jaunty dagger
#

Yep.
Because the script is a simple Light button toggling room lights and changing the lamps material from a material with emission (turned on) to the same material without emission (turned off).

#

And what actually happens in game is, that only the first light gets disabled, but when it comes to the first MeshRenderers material, thats where it breaks

grand temple
#

then find the part in the log where this udonbehaviour is crashing

jaunty dagger
#

When I cut off the material part from the flow, the lights successfully turn on and off

#

2022.01.07 20:49:27 Error - [UdonBehaviour] An exception occurred during Udon execution, this UdonBehaviour will be halted.
VRC.Udon.VM.UdonVMException: The VM encountered an error!
Exception Message:
An exception occurred during EXTERN to 'UnityEngineMeshRenderer.__set_material__UnityEngineMaterial__SystemVoid'.
Parameter Addresses: 0x00000009, 0x0000000C

Object reference not set to an instance of an object.

#

This one I guess

grand temple
#

yeah that would do it

jaunty dagger
#

I am using one FOR loop for both, lights and MeshRenderers

grand temple
#

so are you sure every single mesh renderer is valid in that array?

jaunty dagger
#

Because every light has exactly one meshRenderer

#

Should be, I just dragged them in one by one again to be sure

grand temple
#

could you take a picture of the inspector with the lights and meshrenderers?

jaunty dagger
#

I will, one moment.

#

I just saw that somehow the array length chaned in the editor. 2x light, 1x meshRenderer. That would explain the error. Let me quickly double check and test again

grand temple
#

if you want to harden it against that kind of thing, you could add an isvalid check on everything

#

you could also use mathf.min on two array lengths so even if they're not the same lengths it'll stop on whichever one is shorter

jaunty dagger
#

Good idea! thank you πŸ™‚

#

I just saw that somehow all MeshRenderers got reset. Not sure what kind of change did this, but I definitely need to be more careful in double checking these things when errors occure.
I guess now it will work once compiling is finished. Again thank you for your help! Definitely learned how to more efficiently Debug in Udon thanks to you

#

Still same problem. Could it be a problem that I attached a VRCObjectSync to all light objects? Would it be better to attach it to the light switch and will this have the same effect? (All players having the lights turned on or off if somebody uses the switch)

grand temple
#

objectsync doesn't have anything to do with this

#

it does not sync whether or not an object is enabled

#

all it does is sync the position

#

if you want this synced you should have a synced bool

#

but that's still not your problem if it's crashing

jaunty dagger
#

Oh okay

#

Yeah, still same error, despite having added all MeshRenderers and Lights. I will try it now with removing all VRCObjectSyncs from Lights, LampMeshes and Light Switches, just to make sure they don't interfer

#

Is there a difference between GetLength() and get Length() ?

grand temple
#

I don't think so

#

are you sure the meshes aren't getting deleted by something?

jaunty dagger
#

Shouldnt happen, nothing else is accessing them

#

I will try a different approach

#

I will try to create two for loops, one for the lights and one for the meshes

grand temple
#

that's not the problem

#

if it was, you would get an index out of bounds exception

#

just add isvalid before doing anything with the meshes

jaunty dagger
#

Okay, then I'll try that

#

Thank you, the isValid did the trick and addresses all MeshRenderers. Still wondering as to why it doesn't run through the loop without it.

grand temple
#

because somehow, one of your meshrenderers is invalid

jaunty dagger
#

Hm, I will check them one by one and see if I find the reason.
Other question: You mentioned to sync the lights between players, I need to sync the boolean

#

So I added a boolean to the Udon Graph which has sync checked and once the boolean gets set to true/false, there is also a check in "sendChanges"

#

Do I also need to add a VRCObjectSync to the light or the lamp mesh (parent of the light) ?
It seems not to sync between my two instances.

#

Ah nevermind, it gets synced, but on my PC only shows the changes once I change to the other instance.

#

Oh, no it doesn't sync. I got confused. Seems the light toggle only works locally

grand temple
#

you need to hook up the boolean so it actually applies the changes you want. It's not automatic

jaunty dagger
#

Should I maybe better create a RequestSerialization of the light[] and meshRenderer[] ?

#

I know, I hooked it up

grand temple
#

the basic flow is that on interact you would setowner (localplayer), set the bool to it's inverse, then requestserialization.

Then onvariablechanged of the bool, you would set the lights to the state of the bool

jaunty dagger
#

aaah okay

#

thank you! I will try that

#

Where do I find the "onVariableChanged" ?

#

It's an event?

grand temple
#

hold alt while dragging a variable into the graph

jaunty dagger
#

ooooh okay!

#

by setOwner you mean the owner of the light switch or of each light and meshRenderer?

grand temple
#

the owner of the object with the udonbehaviour

#

the lights don't matter

jaunty dagger
#

okay

scarlet lake
#

Do you have to call playerapi methods on the client that is said playerapi?

jaunty dagger
#

What is the input of the RequestSerialization? The current UdonBehaviour I am in?

scarlet lake
#

Do they have ownership of their own playerapi?

jaunty dagger
#

Yep, I call it in some other udon behaviour

scarlet lake
#

you dont need to add it

jaunty dagger
#

So I don't need to feed it any input?

scarlet lake
#

nope

#

same as when you call an event

grand temple
scarlet lake
#

yeah i was getting errors yesterday when I tried to run immobilize on all clients from my game master

#

I think teleport failed silently

#

but good to know

#

Are player APIs owned by their corresponding player then?

jaunty dagger
#

Should be

#

At least that's what I was expecting from the PlayerAPI

scarlet lake
#

Can't malicious players call functions like teleport manually then?

jaunty dagger
#

How would they go about it? You mean when the necessary mechanic is built into the world?

scarlet lake
#

Well if they call the teleport function and they have authority (as they're the owner of the object)

#

there'd be nothing saying "no you can't" right?

jaunty dagger
#

Hm true, but how would you call the function from within Unity Client?

#

Via usable item?

scarlet lake
#

I'm not sure as I don't really know a lot about cheating (other than what to generally do to prevent it in networking)

#

But if they could make their own method calls through some client they make they could just make it execute a teleport function

jaunty dagger
#

I guess one could write a gun script that on first click stores the raycast hit its pointing at and on second click teleports there

scarlet lake
#

I'm mostly asking because I'm not really sure how to make my game safe from cheaters

#

I suppose its always impossible to prevent the current gamemaster from cheating

jaunty dagger
#

I think generally speaking, VRChat is not yet at a point where its cheat-safe. When you allow users to create content, you are literally opening the door for cheaters, with so many APIs exposed.

#

Btw, my script works now, Thanks Phasedragon!

scarlet lake
#

true πŸ˜„ I suppose I can just let it go for now and worry about it if cheaters become an actual issue

jaunty dagger
#

I mean, basically VRChat is a huge sanbox with no consequences gameplay-wise. To me it feels semi-immersive. I play a game but I don't really fear any consequences of getting hit, losing or whatever, as I can just leave the world at any time and things usually don't really collide with the player.

My world is trying to change that a bit. I made little robots the player sits on and drives around with to player soccer. When the ball hits another players robot really hart, the robot topples which also topples the players view and will feel quite uncomfortable, being thrown around in the world like this.
I will make a list of how many beta testers puke πŸ˜„

scarlet lake
#

Haha, yeah I think that'll create a lot of motion sickness.

jaunty dagger
#

Lets hope so πŸ˜„ People should be SCARED of getting hit πŸ˜„

#

Optionally I will implement a top down third person camera that is not affected by the toppling and see what people prefer.

#

Guess I know the answer to that already haha

#

Btw, when I want to teleport Objects, do I set the Owner of the transform or the gameObject itself?

#

I mean before teleporting

scarlet lake
#

set the owner to what?

jaunty dagger
#

localPlayer

scarlet lake
#

depends on what its for

jaunty dagger
#

I have a lot of physics clutter in my map and a button that reserts everything to its starting position

scarlet lake
#

you'd still want to sync it to the rest somehow

#

unless its like

#

physics clutter that doesnt have to sync

jaunty dagger
#

Each object has a VRCObjectSync attached to it

scarlet lake
#

then you dont need to set the owner

jaunty dagger
#

No, the clutter shall be synced

#

But if another player messes with the clutter like holds it in hands, the other player pushing the reset button won't be able to reset its position

scarlet lake
#

someone should correct me if im wrong because this is from a UE4 dev perspective, but generally you'd send a network event to the owner thats like

#

OnClientRequestReset

#

when the button is pressed

jaunty dagger
#

Not sure if it works the same way in Udon.
Afaik you add a VRCObjectSync to every object you want to sync between players.
To make them Physical objects, you add a VRCPickup which also gives them a Rigidbody.

Per se, these objects are already synced between players, but if by using a button, you try to Β΄set the position of the object, I believe you have to set the position locally and then make sure the one who clicked the button becomes the owner of all objects before teleporting them as well.

scarlet lake
#

I think it would work the way I described

#

what you're saying is basically saying "make the player pressing the button the owner, so his changes sync"

jaunty dagger
#

I didnt find a "OnClientRequestReset"

scarlet lake
#

what im saying is "make the player that pressed the button run an event on the owner of the object, which will sync automatically becaue its the owner"

#

wait

#

1 sec I'll show you what I mean

#

You'd have to make an event like that

jaunty dagger
#

Okay πŸ™‚

scarlet lake
#

custom event with a name like that

#

Basically, the button and the clutter is owned by the first player that joined and they have authority over them so their changes are the ones that get synced to others

#

so its easiest to just have the owner run the code that resets it all

jaunty dagger
#

Thats how the reset script looks right now

scarlet lake
#

ok im launching my project now and ill make some psuedo code

jaunty dagger
#

But owner changes when somebody else takes the clutter in hand

#

so after 5 mins playtime, half the clutter is owned by different players that were last fiddling around with it

scarlet lake
#

ahh

jaunty dagger
#

Clutter has the flag of changeOwnerOnCollision

#

This is why I was planning on just resetting ownership to the one who pressed the clean up button

#

It cleans up right now, but only if the person is already the owner of the clutter. Not sure why it doesn't Set the owenership

scarlet lake
#

in that case you could do either that or make it so the current gamemaster gets the ownership

jaunty dagger
#

I didnt touch the game master thing yet, otherwise I increase the amount of possible human errors when messing with that as well for the first time here xD

scarlet lake
#

the set ownership doesn't work because

#

probably

#

only the owner can set the ownership to someone else

#

let me double check that though

jaunty dagger
#

Okay, thank you!

scarlet lake
#

dont quote me on it though it's just an assumption

#

nvm im wrong

#

I'm not sure why its not working then

jaunty dagger
#

Hmmm, weird

scarlet lake
#

actually

#

im not sure its worded kinda weird

jaunty dagger
#

I have to read the ownership from the gO, not the transform right?

scarlet lake
#

I'm assuming the last bit is talking about the caller

#

i'd assume so yes

#

as its the gameobject that has ownership

jaunty dagger
#

Hmm weird, as I am doing exactly that

#

Checking if the current player is the owner and if not, giving him sovereignity over the object

scarlet lake
#

no errors?

jaunty dagger
#

lemme check

#

Ill quickly start two instances and check the logs

scarlet lake
#

kk

jaunty dagger
#

seems it successfully changes ownership

#

but fails at teleport.

#

Damn I have to run, friend is waiting. Thank you for your help mate! Highly appreciated!

scarlet lake
#

No worries πŸ˜„ I hope u can figure it out

#

@jaunty dagger there's a literal respawn function btw if you're looking for respawning the clutter

#

probably wont fix your issue

jaunty dagger
#

Ah perfect

scarlet lake
#

but might be useful for your case

jaunty dagger
#

thats what I would need

#

Friend is waiting to join but I fail compiling the map xD

#

Getting a weird error in the upload screen of Udon

scarlet lake
#

whats the error?

jaunty dagger
#

I updated Udon SDK today, could that be the reason?

#

Aaaaand i get kicked out from my account in unity every time after compiling and failing to upload

#

Deleted my old builΓΆds from the map and trying again now. HOpe this worked

scarlet lake
#

hmm no clue sorry

jaunty dagger
#

Np.

#

Maybe its the VRCWorld object. will try to delete that and recreate

#

This kind of crap always happens when you try to show your world to someone xD

#

Does anyone know where to find the damn VRC_PipelineManager?

#

Figured it out

scarlet lake
#

Can you save data in a world on a specific player? Like having a database basically

#

So you can have savegames etc

fiery yoke
scarlet lake
#

Cool, well I'll probably wait for the official support, I'm not in a rush πŸ˜„

jaunty dagger
#

Hey guys, was wondering if there is a tutorial out there for how to stream videos via the VRC api as in the world Movie & Chill

#

And also if anyone knows a better way of handling physics and collision via the network than Udons built-in methods and classes.
I need something more accurate and precise for a soccer game I am working on.

lament pike
#

but i dont think that is what you are looking for, sorry if i couldnt help

jaunty dagger
#

Ah a nice person from this channel just sent me the link πŸ™‚

#

I think it's the same player as in Movies & Chill

lament pike
#

ooo

#

glad you managed to get it!

#

A very dumb question but how should I go about making a audio slider for 1 audio source? the tutorial I am using has 2 and inserted a forloop but I don't know if I just remove it and continue everything else or if there is a completely different structure to it altogether

#

Here is an image of how the tutorials one looks:

fierce verge
#

After updating to 2019 (I put it off for quite awhile) all my programm sources are empty. How do I fix this?

#

I have backups btw

fickle stirrup
lament pike
#

Thank you! I will try my best!!!

topaz jetty
grand temple
lament pike
topaz jetty
fierce verge
#

I did that xD

grand temple
#

then try it again

fickle stirrup
fierce verge
#

I will, thanks anyway

grand temple
#

you could also try right click > reimport on your scene file

#

but only if you haven't saved it since migrating

#

sometimes that data is locked away and just needs to be refreshed enough to pull it out. But as soon as you save, you've lost it forever

fierce verge
#

I backup the 2018 version before updating or touching anything so should be no problem

grand temple
#

πŸ‘

lament pike
fierce verge
grand temple
#

probably wasn't you messing anything up, it's just that unity misses things sometimes

fierce verge
#

could be me could be unity, it is fixed so thank you!

fickle stirrup
lament pike
#

I have not checked yet but now im happy it looks ok πŸ˜„

indigo finch
#

Is there a way to get a player's Id from a raycast? Do I instead need to create an object associated to the player, that the raycast then hits?

fiery yoke
lament pike
#

what are common reasons buttons may not work?

#

I think i have my udon correct but are there any small details you would recommend double checking before seeking full advice

indigo finch
grand temple
lament pike
grand temple
#

here, check out some of the steps in this doc https://docs.vrchat.com/docs/vrc_uishape

lament pike
#

thank you!

grand temple
#

you do not need a uishape on every button

#

not sure if mesh collider works, that could probably break it

lament pike
#

Gonna Switch to box collider to set it out then!

lament pike
#

well the buttons work fine but they just dont do their respective duty. EG) play/pause can be pressed but doesnt pause. I think i have tried everything recommended thus far from people and the link so is it safe to assume it may be an udon related issue?

#

If sending ss of udon graphs can help identify the issue i am more than happy to

grand temple
#

you could check your log and see if something is crashing

lament pike
#

its empty which is the sadge part 😦

grand temple
#

pics of the button and the event that is supposed to be called would help

lament pike
#

will do, gimme a min ^^

#

Ima do just 1 button aka play/pause

#

I was working from Vowgan's tutorial

topaz jetty
# lament pike

You put Play/Pause in the event in your button but the event name is PlayPause in your code

fading cipher
#

Does VRC support Vector Graphics? (SVGs)

#

We can always convert them to SDFs if needed but I wonder if they're just inherently supported?

mossy crane
#

Is there a way to make a player look at something? via a PlayerTriggerEnter lookat(thing). or rotate to face said thing

#

Or can I grab the quaternion of a player holding a pickup?

#

nvm

craggy harbor
#

πŸ€” Everytime I create an U# script it says this... I guess there's no solution for this.

scarlet lake
#

im getting lag in my map and used the profiler to see what was going on. Does anyone understand where the lag is coming from here?

solar glen
#

I need help. I want to make a video world. Does vrchat not support splicing URL strings?

indigo finch
bleak echo
#

is there a way to change the interaction text on a gameobject via udon sharp?

lament pike
gray fjord
#

Can you get udon on chromebook?

lament pike
#

i dont think it should be impossible but dont take my word for it

topaz jetty
#

it might work if it's one of those newer x86 chromebooks that supports linux apps, and then using the linux version of unity, but that version isn't officially supported by VRChat and the majority of chromebooks are ARM anyways

lament pike
#

Not sure why but link loading doesnt work, i believe the url input field works fine, here is the event and button settings

grand temple
#

you have a box collider on the button?

lament pike
#

yes

grand temple
#

that's a bit unconventional

#

are you sure this is a problem with the video player, or is it a problem with the button?

lament pike
#

in the tutorial they have event custom and send custom event switched, i dont know if it makes a difference

#

uuuuuuuh

#

i would guess the button for loading the link as i can enter the url in without a problem

#

here is the settings of the url input field

#

if it helps

grand temple
#

is the button sending to the correct udonbehaviour?

lament pike
#

maybe? how would you go about checking it (sorry I'm not good with this)?

#

are you referring to this?

grand temple
#

if that's "TV+Player" then yes

#

does the udon graph from that have a LoadURL event?

lament pike
lament pike
grand temple
#

and if you click the button, does that cause the input field to stop working?

lament pike
#

The load button?

grand temple
#

yes

lament pike
grand temple
#

that's not what I'm asking

#

you said the inputfield worked if you don't click the button, right?

lament pike
#

when I say worked I was referring to me being able to write links in it but not load them, im sorry if im making this more confusing than it should be

grand temple
#

is there a reason why you're not just using a video player prefab?

lament pike
grand temple
#

building a video player is pretty complicated, so it's fine. Maybe you can take a look at what this is doing to see how stuff is supposed to work

lament pike
#

That's an amazing idea

grand temple
#

though it does use udonsharp, which could complicate things even more. I don't know off the top of my head any video players built with graph

lament pike
#

the tutorial i was watching used both graphed events and udon sharp so I can compare the prefab to the tutorial, either way thank you very much for the prefab!

#

Now i just hope i dont struggle at somkething as simple as putting it into the world

mossy crane
#

I can use TeleportTo to set a players pos and rotation, and then i want to use Set Velocity to boost them forward, but calling SetVelocity even with a delay after the TeleportTo is not sending them in the constant velocity direction(like 5 on the z)

#

It seems to always send them the same direction in relevance to where they were facing before the TeleportTo, need a way to wait until they are facing the right way

grand temple
#

calculate the forward direction with where you want them to be rather than their current tracking data

mossy crane
#

My graph just died so i have to recreate, but i basically took the currentpickup quaternion, and used that as the reference for the TeleportTo and it will make them face away from the pickup on collision

#

And im trying to make it happen anytime anywhere, based off current rotation of pickup

#

always just face away then set velocity forward

grand temple
#

so whatever rotation you're plugging into the teleport, take that and use it for the velocity too

mossy crane
#

ooo okies, lemme remake everything and try, thanks!

#

unless you know how to fix this?

grand temple
#

not sure what's broken about that

mossy crane
#

opening the graph just gives this on every click and the variables wont load

#

and the nodes wont load

#

or highlight

#

started happening random 😦

grand temple
#

make a canny and post the graph

mossy crane
#

Roger, 4 hours on that graph ;_;

#

where do i log in to make canny?

grand temple
#

it should prompt you to log in with your vrchat account

mossy crane
#

lol

#

I need a canny for making cannys >_<

#

So without SetVelocity it works

#

but the setvelocity is like 10000 times too powerful and doesnt go in the right direction

#

So he always faces the right direction, but he only moved to the left

#

No matter where i am

#

direction is good, velocity is not

indigo finch
# mossy crane

you want to times a vector3 (velocity amount) with the quaternion rotation and put that into the set velocity. you don't want the Quaternion.eulerAngles

mossy crane
#

so i would take a made up vector 3, and times it against the raw quaternion?

#

and slap that as velocity?

indigo finch
#

multiplying a vector3 with a raw quaternion changes that vector to face that rotation direction. never done it in udon graph though

mossy crane
indigo finch
#

give that a go. see if it does what your after

mossy crane
#

!

#

yesss!!! thank you!

#

quaternions are so damn wierd

indigo finch
mossy crane
#

any good double jump examples?

#

or where to start

#

I can get the InputJump, and test if the player is grounded, but how do i get the local player who jumped to mess with?

grand temple
#

input events only happen on the local player

#

so just use local player

mellow parcel
#

where does the pictures go when u take a selfie

grand temple
#

should be in your pictures folder under vrchat

mossy crane
#

What would go on false for instance to let another jump event happen when they are airborne?

grand temple
#

inputjump happens on both the down and the up, and the bool value indicates which

mossy crane
solid hamlet
#

i asked before tho it was under world development but with no luck, perhaps here i would have some as i think it might be udon related aswell,
so im looking for whatever can make me able to build a map where i can have spherical walking or / and sideways wall walking etc, basicly the trippy illusion of walking upside down but everything is in normal angle for u, i saw maps having some like it before and i wonder how to do for vrc because i barely can find any proper in regards to it .

grand temple
mossy crane
#

Just adding a boost if they try to jump while in the air would suffice

#

But this doesnt work

grand temple
#

you don't have the flow connected on the left

mossy crane
#

the HECK

#

ty...

solid hamlet
# grand temple That's technically possible but really really complicated and janky

yeah all i found in regards to it, if udon scripts etc was player based, i tried to add them to the vrc_world but with no luck as it seems it wont apply it to the player itself kinda, also i believe its partially something that would have to be made on the objects / meshes rather than the player i believe ? tho im not sure exactly, it is a very complex one but i would love to build a map with that in main focus .

mossy crane
#

infinite jump woot!

grand temple
mossy crane
#

Now is there a way to limit it? Like set them grounded for a bit

#

but while airborn

grand temple
solid hamlet
mossy crane
#

ty!

grand temple
#

the biggest challenge is networking. The whole thing is just an illusion and you need to manipulate where players see each other

mossy crane
#

Looking to get a hand bone for instance, and calculate a velocity using point A of hand OnPickupUsedown and point B being OnPickupUseUp, Vector3 Distance returns a float but unsure how to jam that back into a V3 variable for velocity

grand temple
#

B - A = the difference between the two

mossy crane
#

Will this work on a disabled gameobject?

#

My Otherscript is disabled atm

grand temple
#

I think as long as it has been enabled once before, then yes

#

not sure though

mossy crane
#

Will test then, thank you!

#

Is there a way to test build in VR with multiple clients?

#

Or even have a desktop client as long as 1 can be in VR>

grand temple
#

yeah, just launch VR then disable VR and launch again

mossy crane
#

Hmm cant seem to get it

#

i can get 1 VR and non but they arent in same world

grand temple
#

disable reloading

mossy crane
#

whats that

grand temple
#

it's an option that reloads the client's world instead of launching a new one

#

but if clients are not launched together they won't be in the same instance

mossy crane
#

Is that found on the VRChast SDK window for building?

grand temple
#

if you go to the settings page in the SDK and "show extra options" you'll see it

mossy crane
#

ahh thank you!

#

and then launch 1 client without force non and 1 with?

#

or 2 with

grand temple
#

with and without

scarlet lake
#

how can i make the point toggle for mirrors

#

instead of the buttons

mossy crane
#

Can I put a cube with rigidbody on the Player layer and make it fire OnPlayerTriggerEnter event? or is that only player players

night viper
scarlet lake
night viper
scarlet lake
#

here

#

see

scarlet lake
night viper
#

Change the layer to "default" I think if it is in "UI" you can only interact if you open the vrc menu

indigo finch
#

if you don't want people to collide with it, walkthrough is better

scarlet lake
#

going show screen shot in world deve what ive been working on

gusty trout
#

Anyone know why Udon Behaviour would start showing like this after an U# update?

tall vault
#

Change your inspector from Debug to Normal

mossy crane
#

Is there a good trick for activating a collider that hits anyone but the local player?

#

as in person A activates a collider and B,C,D are effected but not A

gusty trout
tawny kite
#

Hello, how can I add a video playlist? Is there a project where I can download it or something? Right now I am using USharpVideo player, is it possible to do something like this with that video player?

#

I've found ProTV video player which has a playlist.

gusty trout
#

Now that I managed to fix the first issue I had by reimporting everything, I am getting this error. Even tried to revert VRCSDK and U# but nothing is working. Everything that has an udon script is showing as not found.
Tried restarting Unity and reimporting all related scripts but no luck.

Any help is much appreciated ❀️

EDIT: idk how I fixed it but I must have reimported Udon Sharp, VRCSDK, Udon and some other scripts 10+ times and it eventually worked. Love unity

icy pollen
gusty trout
icy pollen
gusty trout
dense goblet
#

As soon as i pull any gameobject out of my scene into udon it starts screaming

#

How can i fix that?

twilit breach
#

Is anyone familiar with drop input events for Quest? It works fine on my WMR but doesn't seem to fire when I release my grip on the quest

tawny kite
#

Hello, I am using ProTV video player, I added a playlist with a search box, but the search box doesn't work, can someone help me?

grand temple
twilit breach
#

Ah, perfect I'll switch the nodes to grab. A nice easy solution, thanks Phase

dapper lion
tawny kite
dapper lion
#

"Playlists to search"

#

put your image playlist in that array

tawny kite
#

Sorry, I'm not sure what you mean by that

#

oh wait

dapper lion
#

what does imageplaylist inspecotr look like?>

tawny kite
#

It works now, all I had to do was put the PlaylistSearch in to the ImagePlaylist "Playlists To Search" array.

#

Thanks

scarlet lake
#

how do i make a transparent mirror

dense goblet
#

How can i go back to look for other Stuff in the create node thingy

#

everytime i click it it goes to VRCEvent Search

#

but i want the search that i had the first time i opened this

grand temple
#

make sure you don't have another node highlighted

#

when you click on a node, it will give you only search results related to that node

dense goblet
#

Makes sense

#

is there a way to make an object uninteractable after something happens

grand temple
#

sure, set disableinteractive true

dense goblet
#

What would be the instance?

grand temple
#

the udonbehaviour that you want to disable interactive

#

you can leave it blank if you're talking about the one that this script is running on

dense goblet
#

Thank you

dreamy gorge
#

Anyone know how to disable the TMP things in the editor, they get really annoying

dapper lion
dreamy gorge
#

Yknow what

dense goblet
#

How to add 2 numbers together in udon i litterally cannot see it in the math module

#

I'm feeling very stupid not to be able to add 2 numbers together lmao

#

Found it

indigo finch
dense goblet
#

How can i get a variable from another udonbehavior

grand temple
grand temple
#

Depends on your use case. The reason to use an object pool is because you usually want those objects to be able to send networked data, like with pickups. If you don't need that, you can use instantiate and have it all be managed and synced by a central non-instantiated object

#

if you're working with virtually unlimited objects then you might not even want every single object to be sending data anyway

#

could you provide more details about what you're trying to do? I could give you some recommendations on the best way to accomplish your goal

#

yeah you should just have a big object pool

#

make sure to put the pieces on a layer that does not collide with itself and performance shouldn't be too bad

#

pickup collides with itself. 500^2 collision checks is expensive

#

and you don't need 500 objects of each type, you only need 500 objects that can transform into whatever type you need

#

that transforming can be done with instantiation

#

you could have a big manual synced int array somewhere that corresponds to what type each object should be. Then it instantiates whatever children it needs to be that type

#

not if they're instantiated

#

but you can sync on the main object

mossy crane
#

Is there a good trick for activating a collider that hits anyone but the local player? As in person A activates a collider and B,C,D are effected but not A

grand temple
#

onplayertriggerenter, check if not local player

delicate bluff
#

What is udon?

mossy crane
#

Ahh, my 3 am brain couldn’t compute that thank you

mossy crane
delicate bluff
#

O ok

mossy crane
#

Its a visual scripting addon like Playmaker but someone made it so you can C# code as well and turn it into "U#"

grand temple
#

not avatars

mossy crane
#

oh is that just SDK 3

grand temple
#

it's just worlds

#

avatars have their own SDK3 which is a different system

#

?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

dreamy gorge
#

any way to play audio from url containing .mp3 file?

mossy crane
#

I have a InputUse im using to enable a gameobject with a collider, the collider has a graph on it to play a audio 1 shot on enable, and then a OnPlayerTriggerEnter and after 1 second the object turns off until InputUse is called again. My problem is both clients hear the OnEnable audio but the OnPlayerTrigger is not firing on non local players

#

This would work to detect other players on trigger enter right

#

adding the islocal and branch makes it not fire on the person triggering it, but with or without i cant get other players hit

wind atlas
dreamy gorge
#

I'm about to try

#

i have to edit the source code since im making a song browser

#

a track contains a VRCUrl object and when you click it, it should just play on the USharpVideo

#

i gotta figure out how i can do this the easiest way

#

ill just make my own method

steady sun
#

Man this is so cool I wanna get into it too

wind atlas
# dreamy gorge i have to edit the source code since im making a song browser

ProTV has a working playlist, with a custom editor to manage what's inside which is neat.
However, making it yourself isn't too difficult. Not sure if creating a script for every button is a good idea performance wise, probably fine if you disable networking. I'd personally give each button an Id and use that to identify the song in a VRCUrl array.

dense goblet
grand temple
#

plug the udonbehaviour type into it

dense goblet
#

and out of that getComponent how exactly am i able to get the ProgramVariable?

grand temple
#

like this

dense goblet
#

oh

#

type

#

ofc

dense goblet
#

I think i'm missing something

#

but i don't know what

grand temple
#

that should work, are you sure that isLocked and isClosed are spelled correctly?

#

and that there is an udonbehaviour on Door with those variables?

dense goblet
#

Yes and yes otherwise CyanEmu probably would've complained

#

Oh wait

#

nevermind

#

me idot

mossy crane
#

this sets this gameobject active

grand temple
#

??

mossy crane
#

And the OnEnable of the other object fires

#

but the OnPlayerTriggerEnters only sees local player

grand temple
#

make sure the collider is touching the ground. Remote player colliders are a small sphere around the feet instead of a full capsule

mossy crane
#

Pretty big collider i think it touches

#

im basically moving a object to a players location on click

#

and anything caught in that triangle should get hit by OnPlayerEnterTrigger

#

which it does if the 1 who clicks steps on it

grand temple
#

does it have a rigidbody?

mossy crane
#

it does not

grand temple
#

if you're moving an object with colliders it should have a rigidbody if you want collisions to happen properly

mossy crane
#

before it was a child of a pickup with a rigidbody, maybe thats it

dense goblet
#

Ist this bool automatically changed when another script calls SetProgramVariable

mossy crane
#

definitely hitting other player, and the other player sees it hitting them

#

but only the 1 who clicked will get the OnPlayerTrigger Event

grand temple
#

what does the onplayertriggerenter look like?

mossy crane
#

it was working before on my OnPickupuseDown enable

grand temple
#

teleportto only works for the local player

#

you can't teleport other players

mossy crane
#

i def can

grand temple
#

no you cannot

mossy crane
#

D:

#

I had that same triangle collider on the end of a pickup, and wherever i faced that player, they would rotate the same way im facing, and get launched

grand temple
#

to teleport another player you need to communicate with them somehow and then get an udonbehaviour on their client to call teleport

mossy crane
#

but before i was using a pickup get player as my ref for rotation on the teleport

#

This 1 works on teleporting other players

grand temple
#

idk what you were doing but it's probably not what you think you were doing

mossy crane
#

oh

grand temple
#

Yeah, in that case the other player detects the collision and teleports themselves using the currentplayer of the pickup

mossy crane
#

Hmm how would I strip out the need for a pickup? and just have a disabled gameobject in the scene at start with the collider, be able to hit other players

#

a manual sync type deal?

#

with serial and deserial

grand temple
#

well how do you want to define the location that players get teleported to?

mossy crane
#

I want it based off their current location

#

basically want to move them up .01 Y to get them off the ground

#

turn them around

#

and velocity them away

grand temple
#

so why do you need to define some specific player?

#

and why does that need any networking at all

mossy crane
#

player A clicks mouse and enables and move the object so the collider is facing away from them, anyone caught in that goes woosh

#

but if i click while sprinting, i can also enter the collider and get wooshed

#

the isplayer local == false fixes the clicker getting wooshed, but still need any other players to feel it

grand temple
#

ok so when a player does inputuse they need to take ownership and set synced variables for the position of the thing. Then other people receive that data, move it into place, and if they touch it and they need to know about the owner they just do networking.getowner

mossy crane
#

hmmm... click > take ownership > others test for owner, OntriggerEnter if not owner execute?

grand temple
#

yeah

mossy crane
#

gotcha, ill play around with that thank you!

dense goblet
#

this should work yes?

grand temple
#

only if that event is on this udonbehaviour

dense goblet
#

Really

#

omg

#

no way to send a custom event to a different udonbehavior?

grand temple
#

plug a different udonbehaviour into the "instance" slot

dense goblet
#

oh

dense goblet
#

shouldn't this be switched everytime the event is called?

grand temple
#

yeah that should work

#

you really should just use an udonbehaviour variable instead of gameobject+getcomponent though

dense goblet
#

then something with my teleport system is broken because as soon as i interact with the door it just does nothing

#

The disable interactive is above this

grand temple
#

is target or count not set in the inspector?

dense goblet
grand temple
#

check your log to see if anything is crashing

#
hushed gazelle
#

I've seen a few worlds achieve vehicles moving on a track (eg UdonTycoon), what's the method being used to achieve that given splines don't seem to be exposed?

grand temple
#

make your own splines with math

unborn hornet
#

M A T H M A G I C

slate orchid
#

is there a guide to do the following when bullet hits a box it turn the renderer off, play a particle effect, play a sound,

mossy crane
#

Can probably just look up any unity tutorial for that, most of the things exist in Udon for Collider event and setting gameobject components on or off. As well as audio play 1 shots

indigo finch
# slate orchid is there a guide to do the following when bullet hits a box it turn the rendere...

It's rather niece topic, in an environment that already doesn't contain many tutorials in general. I would look into seeing if you can find any similar prefabs at places like VRCPrefabs.com and the likes, and seeing what they did and adjusting it. Most people will likely use udon#, and if your comfortable with that, many unity tutorials for C# will help. If your doing this with udon graph, perhaps looking at Bolt tutorials might help? but they too aren't that common either and there are differences between Bolt and udon graph.
As for that script in particular, it would be something like this. I haven't tested this, and I'm suspicious of the 'particle system play' part of it not working, but it'll hopefully give you some pointers as to where to look

slate orchid
#

@indigo finch could we vc and u help me out

indigo finch
# slate orchid <@!228024927054331904> could we vc and u help me out

Honestly, I think someone else will be better at helping you achieve it. There's just too many holes in my udon knowledge. I just shared something that will likely work (or at least close to it) to help give you a jumping off point, and/ or to get the code roasted and me learn something new ^^

slate orchid
#

i did see this

indigo finch
#

That seems as good of a reference point as any. It'll likely use udon#, but there are plenty of people that can help, expecially if you can break down the problem into a small, specific question

boreal lynx
#

Does anyone knows a way to load image texture from "URL" inside udon ?

indigo wagon
fickle stirrup
#

posters, calendars

fickle stirrup
slate orchid
#

@indigo finch this shit is getting to overwhelming i'm making a game and i did all the map making and i am not meant to be doing the f**ing coding my friend is but he has not done anything for a week and i really wana get this done i have been trying to do sht for 4 hour and i give up for now

boreal lynx
topaz jetty
#

Eventually SDK2 will no logner be supported, and then you can't upload or update worlds or avatars using SDK2 anymore

#

I wouldn't reccomend using it

#

plus a lot of cool prefabs are sdk 3 only

lament ether
#

Would anyone know how I would be able to toggle the material in for the world from dynamic materials instead of it being in the actual world?

obsidian turtle
#

Hi, is there a way to get video players to play a Youtube Playlist?

#

I'm using Wolfe's Video Player

#

currently it's playing the first video, but doesn't change to the next video

grave lantern
#

Is there an easy way to freeze an animation?

grand temple
#

sure, you could create a float variable and have it affect the speed of the animation. Then just set it to 0 to pause

grave lantern
#

Genius πŸ˜›

grand temple
#

yeah

opal dew
#

I'm trying to capture and store a still image from a render texture (to take a player 'profile picture') for a menu system (similar to what the Among Us world does), how is this achieved? I've tried something like the following but getting "ReadPixels was called to read pixels from system frame buffer, while not inside drawing frame."

#

Unless that update call is being fired before the current frame completes...

grand temple
#

you don't need readpixels at all, just render the camera to the rendertexture that's it

#

readpixels is for something else entirely

opal dew
#

And if I turn the camera back off.. it preserves the last capture?

grand temple
#

yes

opal dew
#

sweet!

#

Thanks

#

I'm building up a menu system for a game and for a game master to review a player list and assign roles etc. The main annoyance I have though is it seems the best way to do stuff is a menu where you cycle through each player, as its possible to say, have a button per player and know what button was just clicked on because of the limits of the event system not letting you pass data

#

So I can't do something like playerButton(player), only, playeroneButton(), playertwoButton() and that REALLY doesn't scale :D;;;

fiery yoke
opal dew
#

@fiery yoke The other thought that came to mind was doing something painful like seeing if I can read what control the laser pointer (be it head or hand sourced) is focused on.

#

Skimming through though, that looks like it would pretty impossible to discover though

grand temple
#

I still prefer the text string method though

opal dew
#

I thought custom events mind have no arguments though? Unless I've missed something here.

#

eg, if I have a player button with a display name

#

And I send 'PlayerButton()' clicked, how do I know which player button sent the message?

grand temple
#

correct, the text is a way of creating an argument though

#

The button sets the text then sends the event to the udonbehaviour. The udonbehaviour then reads the text as the argument

opal dew
#

Oh, so something like this is permitted?

grand temple
#

regular text, not textmeshpro

opal dew
#

Oh sure, I only had a textmeshpro to hand to quickly build this

grand temple
opal dew
#

Right, but even a deactivated invisible regular text field would still be updated?

grand temple
#

yep

opal dew
#

Okay, awesome

#

Clunky but awesome

#

Then I could string to int, int to matching int in the player list, then woo

#

@grand temple Many thanks :)

grand temple
#

use int.tryparse

opal dew
#

Oh, one small urk, I'd still need player buttons for every player slot wouldn't I? Because I'd need to input the data for the first field. I couldn't just VRCInstantiate a button and change the data within that onClick Invoker.

grand temple
#

so just have a bunch of buttons disabled

opal dew
#

Yeah.. that's what I thought. Just you know. Say, 32 player world, with the 2x overflow to the hard cap, that's 64 buttons to setup. Sob.

grand temple
#

that's not a big deal

opal dew
#

Well... one last idea.. split the difference. Use a paginated list.

#

Then I only have say ten buttons, and keep track of which users are on that page.

#

With a different ouch being that players leaving/joining would cause a reshuffle

grand temple
grave lantern
# grand temple yeah

So i got it to work but it seems that it doesn't work to play animations in reverse using a speed value of -1. Do you have a trick to go around this so i could play my anim in reverse? πŸ‘Ό

grand temple
#

use an animator variable for speed instead of the animator speed itself

#

when you click on a state in the animator, at the top right there is a "speed" property. You can enable a multiplier that can be a variable

opal dew
grand temple
#

yeah

opal dew
#

Ah cool! Well, thank you for sharing! ^^

vital cypress
#

How hard is it to convert a pc world to quest compatibility

brazen epoch
#

not that hard. There are some limitations such as limited transparency/cutout support.

Udon stuff is pretty much the same

opal dew
#

Depends entirely on the kind of world

#

I never quite understood that one, how do you do like... windows, without transparency?

brazen epoch
#

You can fake it with matcaps

novel prism
#

I have an issue where I can't click canvas buttons in-game in the world I'm making in SDK 3, any ideas?

grand temple
# novel prism I have an issue where I can't click canvas buttons in-game in the world I'm maki...

Take a look at the common problems in this doc https://docs.vrchat.com/docs/vrc_uishape

mystic pond
#

How can I globally reset objects in my world?

valid basin
#

@dusk lance i noticed the CyanClimbing package is listed as SDK2 prefab, is there a SDK3 version out anywhere?

wanton palm
#

Is there any way I can call finalIK script methods through udon?

dusk lance
wanton palm
#

Does anyone know how can I get local player bone positions?

#

I'm guessing it's something like

#

VRCPlayerApi.GetBonePosition(,HumanBodyBones.Head);

#

but I don't know what to put on the first parameter

grand temple
#

Networking.LocalPlayer

wanton palm
#

many thanks

grave lantern
#

this may be a silly question but how do i upload my world without replacing the version that is already published?

grand temple
#

upload to a different world ID

obsidian mountain
#

Is there a way of destroying objects?

grand temple
obsidian mountain
grave lantern
grand temple
grand temple
obsidian mountain
grand temple
obsidian mountain
#

Yeah I know about collisions, though I just realized I forgot I set the object with the script attached to trigger lol πŸ€¦β€β™‚οΈ

fiery yoke
#

OnCollisionEnter is specifically for non-trigger colliders

obsidian mountain
#

Still doesn't work it seems though

grand temple
#

are you getting any errors? Directly asking for the name of something like that could cause your udonbehaviour to halt if it hits a protected object

#

you could filter it by checking if (!utilities.isvalid(collision.gameObject)) return;

obsidian mountain
fiery yoke
#

Also because I saw it before you removed it, wasnt there thing with "PlayerManager"? I remember that some class names are already taken or used so UdonSharp gets confused. Or something like that.

#

It was a niche issue a while ago, not sure if thats still the case.

obsidian mountain
#

No worries on that, it was irrelevant so I removed it

#

Also Unity itself would alert you if you used the same class name

fiery yoke
#

Yeah not in all cases. Unfortunately its not all that straight forward.

#

I specifically remember having an issue with generically named class (Im like 90% sure it was PlayerManager)

#

But yeah:

  • Respect the rules for collisions
  • Make sure the behaviour didnt crash
  • Make sure your method of testing the collision actually works
    (So when you do a Debug.Log, make sure you also run a Debug.Log in Update to both make sure it actually logs and didnt crash)
dreamy gorge
#

How do I label this section of code? Like a comment

#

it gets a bit confusing, ive seen comments in other code

grand temple
#

right click, add comment

dreamy gorge
#

garcacas

#

gracisas*

toxic pecan
#

what is udon

novel prism
#

This is extremely frustrating, I've been working on this for an hour now, an Udon graph is working in editor when I invoke OnClick(), but isn't working in game even though I CAN click the button

grand temple
#
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

grand temple
novel prism
#

Hold on... Maybe my issue isn't with the button itself. Does VRChat not allow GameObject creation using C# script??

grand temple
#

no, you cannot upload worlds with C# scripts directly. You must use udon

#

however, UdonSharp is a tool that allows you to compile C# into udon

novel prism
#

Okay, thanks, now at least I know what's wrong

#
    {
        GameObject spawnLocations = new GameObject();
        spawnLocations.name = "spawnLocations";
        int count = 0;
        foreach (Transform child in transform)
        {
            GameObject location = new GameObject();
            location.name = count.ToString();
            count++;
            location.transform.position = child.position;
            location.transform.rotation = child.rotation;
            location.transform.parent = spawnLocations.transform;
        }
    }``` So what's wrong with this
#

I get this error System.Exception: Method is not exposed to Udon: Void .ctor(), Udon signature: UnityEngineGameObject.__ctor____UnityEngineGameObject

grand temple
#

you can't create new gameobjects like that

#

If you need to instantiate, you can do so with VRCInstantiate, which will clone an existing gameobject

royal acorn
#

any better way to create chairs without taking the VRCChair, scaling and moving it to the correct spot and deleting the model? I mean, obviously there is, but what would that way be? I feel like custom behaviors/scripting with Udon could be just as tedious, but maybe I’m wrong.

dreamy gorge
#

How would I call this U# method from a graph asset (featuring parameters)

novel prism
grand temple
#

are you sure you replaced all the new GameObject() parts?

novel prism
#
    void Start()
    {
        GameObject spawnLocations = GameObject.Find("spawnLocations");
        int count = 0;
        Vector3 position = new Vector3();
        Quaternion rotation = new Quaternion();
        foreach (Transform child in transform)
        {
            count++;
            position = child.position;
            rotation = child.rotation;
            GameObject temp = VRCInstantiate(emptyObject);
            temp.transform.parent = spawnLocations.transform;
        }
    }```
#

And I was gonna drag the emptyObject from the hierarchy onto the script in the editor

grand temple
#

I mean, if you're not using new gameobject then there's no way to get that error. I guess clear your log and recompile?

vague osprey
#

Could Udon be used to make a functional elevator where the door shuts, and the Elevator proceeds to go to the floor it's supposed to go to, open the doors up, and be able to use it again to go back to the original floor?

grand temple
mossy crane
#

So, i have a manual udon behavior that anyone can call with InputUse, it makes them owner, executes and OnPlayerTriggerEnter only hits non owner, what would be a good way to add a cooldown on InputUse for anyone who has called it recently to prevent spamming?

#

Seems to work

grand temple
#

set a float to time.time and check if time.time-float > cooldown

mossy crane
#

ahh gotcha thanks!

#

I can skip a separate object for cooldown and just make a custom event that counts?

grand temple
#

sure

mossy crane
compact stirrup
#

Quick question for peeps here! Event_OnPickup, does it fire for only the player picking up the item like Event_interact? Or will it fire for all clients in the world when the object is picked up?

grand temple
#

only the person who did it

compact stirrup
#

perfect, thanks

mossy crane
#

How are people making these? Right click Comment just gives a centered text line and it obscures all my noodles

#

groups seem to work but i cant change their size

#

Ah nevermind, select nodes then group

hushed gazelle
#

Is player TrackingData not consistent between desktop and VR? I'm trying to track the head position for a portal camera, but it's coming out off-position in VR.

unborn hornet
# dreamy gorge How would I call this U# method from a graph asset (featuring parameters)

You would have to open the uasm asset and find the udon variable that it compiles into, which is fragile because certain changes in the script could cause it to compile to a different variable name.

The better option would be to predesignate a variable to act as the method parameter and be used by the method in place of the usual one.
Attached is how I would write it using an IN_ prefix to denote the variable as one that is used explicitly as an input to an event call. To call it, you'd do UdonBehaviour -> SetProgramVariable [target, "IN_PAUSED", true] then UdonBehaviour -> SendCustomEvent(target, "_SetPaused");
(Ignore the red squigglies, cba to type out all the objects).

brazen epoch
#

Might be because you don't set a value on PickupUse* events

#

gotta connect a const value to the value input

#

boolean const true or const false and attach those constants to the value input

mossy crane
#

Does the owner of a gameobject also become the owner of the UdonBehavior on that object?

brazen epoch
mossy crane
#

Excellent. Thank you!

boreal lynx
edgy sparrow
#

Hello there, i'm just kind of reposting my message from #world-development here, trying to be more specific.
Is there a way to add 2 different interactions in one component depending on the platform the user is on ? For example, a door handle that could be grabbed in vr to trigger a sliding door that would just be a trigger opening the door automaticaly in PC ?

lament ether
#

So I currently have this Udon graph to change the mesh renderer from a material already in the world. However, I also want to use a material from Dynamic Materials as well but I have no idea how to do that. Any help?

grand temple
lament ether
#

So i'm gonna have put the texture on a plane and then just grab from there instead.

grand temple
#

just make a public material variable and drop it in the inspector

lament ether
#

How would you do this? I'm very new to udon and don't really know that much

grand temple
#

make a new variable

#

make it a material

#

set it to public

lament ether
#

Like this?

grand temple
#

the name doesn't matter, I mean check the public box in the dropdown

lament ether
#

Ok done it

grand temple
#

now it 2ill show up in the udonbehaviour as a slot you can put anything in

lament ether
#

I don't see any new slots

#

Oh wait nevermind just needed to compile

#

give me a moment to sort it and i'll see if it works

#

I think I am still a bit confused, may try again later

dapper brook
#

Hi I followed a tutorial to create a URL player with play/pause, volume control but the volume is the only part that works! the play/pause dose nothing and loading a URL just freezes the current playing video! can anyone see whats wrong?

dapper brook
#

There is no UdonExampleScene in the VRChat Examples folder?

grand temple
dapper brook
#

will check that over now! thanks

dapper brook
#

ok that fixed the play/pause button! had a cap L in play by mistake! load URL still not working so gonna have a look and see if i can see whats up with that part of the graph?

dapper brook
#

nope no idea why the URL is not working? back to reading docs i guess

novel prism
#

Is there even any way to automate object position reset in Udon?? I ended up writing this script that should automate creating empty gameObjects where the spawn locations would be, with an Udon graph that teleports the objects to those empty gameObjects. Now it works half the time, and they teleport very slowly. public GameObject emptyObject; void Start() { Debug.Log(transform.childCount); GameObject spawnLocations = GameObject.Find("spawnLocations"); int count = 0; Vector3 position = new Vector3(); Quaternion rotation = new Quaternion(); foreach (Transform child in transform) { count++; position = child.position; rotation = child.rotation; GameObject temp = VRCInstantiate(emptyObject); temp.transform.parent = spawnLocations.transform; } }

hollow smelt
#

hey im kinda new to unity and i was wondering if there is like a way to union diffrent cubes together

grand temple
hollow smelt
#

thanks for the help!

#

appriciate it

grand temple
#

sure, just replace playerapi set velocity with rigidbody set velocity. Make sure the object has an objectsync on it and then also make sure you do setowner

indigo finch
scarlet lake
#

How would I get every instance of a component in a scene? Say, for example, every MeshRenderer component? Every time I try an alternative method, I receive an error that the method isn’t exposed by Udon

grand temple
#

you're welcome!

hard panther
#

hey so is there a way to fix the β€œunusual client behavior”

#

and thats a ip grabber

indigo finch
scarlet lake
indigo finch
slate orchid
#

hi I'm working on a game i no next nothing about udon it's a gun game i have the map made it;s just coding i'm stuck on could someone help where i should start

#

i flicked throught it but he did not really explain it he just kinda did it i'm trying to remake steel n gold but know nothing about coding

slate orchid
#

@reef nebula u have been typing for soo long

grand temple
#

current it is getting the player's velocity and adding onto that, then applying it to the rigidbody. You probably want to add onto the rigidbody's velocity instead

#

that doesn't really explain why it would do nothing though, it should still move it just not how you want

#

have you assigned a rigidbody to the "fighter" variable in the inspector?

#

is the rigidbody set to kinematic false?

#

kinematic true will disable physics and setting velocity will do nothing

#

if you don't want it to have gravity you can disable gravity

#

probably want to add a bit of air resistance unless you want it to keep flying indefinitely

#

that will prevent it from speeding up beyond 50, but that will not slow it down

reef nebula
#

I don't know if someone from the support team can talk to me now

grand temple
#

it's a value on the rigidbody

reef nebula
#

anybody please

grand temple
reef nebula
#

yeah but what I want to reports is complicated

grand temple
#

either way, this is not the appropriate channel for that

kindred trench
#

Tf is UDON

grand temple
#

?whatisudon

reef nebula
#

like target crash one person (me) from a map and when relaunching the game return to the same map it instancrash again

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

kindred trench
#

Ah

#

Thanks

slate orchid
#

@blissful shore how would i make it so when a animaion plays so does the particles at the moment when i run a ani atm i have the gameobject it is in just turn on and off but after testing my bool it dose not render the partical more then once

reef nebula
#

I don't know who to talk to and what category to report it

#

and if I can talk in this server of this

grand temple
slate orchid
#

ooo thanks i was looking for something like that did not know what it was called thxs

slate orchid
grand temple
#

animations can't do that, you'd need to do it with udon

slate orchid
#

ooooki

scarlet lake
#

It doesn't appear that Udon offers many methods to arbitrarily find and return one or more components/GameObjects. I'm trying to add a component to all players at runtime, but I can't seem to find a practical way of accomplishing this. Does Udon not intend for this kind of usage?

slate orchid
#

could someone vc and help

#

this is my graph atm

grand temple
# scarlet lake It doesn't appear that Udon offers many methods to arbitrarily find and return o...

I guarantee there's a way to do what you want, but not specifically through adding a component to a player. There is gameobject.find to find some object by name, but that will not give you players because players are protected and cannot be modified by the world. Furthermore, adding a component to an object is not supported. You can instantiate objects as a copy but be aware they will not have any networking capabilities

slate orchid
scarlet lake
grand temple
grand temple
scarlet lake
grand temple
#

if you give some details about what you want I may be able to point you in the right direction

scarlet lake
#

MeshRenderer to allow LightProbeProxyVolumes

#

For higher-fidelity dynamic lighting. No idea why it isn't a feature by default

grand temple
#

ok that's fair

slate orchid
#

so like this but how do i connect it so when the ExplodableBarrel animator is true they both play at the same time

grand temple
#

connect the arrows with the white lines together. That is called flow and determines the order in which things happen

slate orchid
#

so conect it to the setbool one?

grand temple
#

yes

slate orchid
#

urrrrr? i'm sorry i'm still lost

grand temple
#

connect the white arrows together

slate orchid
#

i did

grand temple
#

and how does it look now?

slate orchid
grand temple
#

yes, that should work

#

make sure that the particles are enabled and do not get disabled by the animator

scarlet lake
#

hello?

#

i need help

grand temple
slate orchid
#

vrc need vc chats here

grand temple
#

non-convex mesh colliders don't work on rigidbodies. Set it to convex, which will simplify it

#

transform.rotation

slate orchid
#

must be fucking something up

grand temple
#

you can get and set transform.rotation, though you probably won't want to directly set it because that will spin way too fast. You could instead use Quaternion.Slerp and provide the current rotation of the rigidbody, the desired rotation of the rigidbody, and some very low number like 0.05 which will determine how much it moves per frame

grand temple
grand temple
#

does the animator work?

#

in both directions - turning it on and also turning it back off

slate orchid
#

yup the mesh turns off and the sound plays

grand temple
#

could be something wrong with the particle system. What does that look like?

#

also woah, you have two scenes. That's not supported for a VRChat world and would probably prevent you from uploading correctly

civic birch
#

I'm trying to port a world from SDK2 in which an animation plays upon interaction with a part of the world and makes a game object active. I've gotten the former to work, but every time I try to add the object enabling, the whole thing breaks, possibly because said object is part of the armature doing the animation

slate orchid
slate orchid
#

is it cus the bool is in the animation

grand temple
grand temple
# slate orchid

I see nothing that would prevent that from working. The animator is not touching the particle system. Does the particle system play when you manually click play? Does it not have emission or something weird?

civic birch
grand temple
grand temple
slate orchid
grand temple
#

how exactly are you testing this?

civic birch
slate orchid
#

CyanEmu pushing toggle on the event

civic birch
slate orchid
#

wait u talking to me @grand temple or @civic birch

#

lol

slate orchid
civic birch
#

@grand temple Also it seems that the anim is working okay, but the object isn't spawning

grand temple
slate orchid
#

i did

grand temple
#

you disabled the other scene. Unload it

slate orchid
#

u sure the graph is right the bool comes from the animation controller

slate orchid
#

did that

#

@civic birch what r u making?

civic birch
#

It's supposed to do this when I click on a part of the machine

slate orchid
civic birch
civic birch
#

But I am trying to use a bool in Udon to toggle it

#

I'm wondering if there's just a reeeeeally specific thing I'm missing

grand temple
dreamy gorge
#

can someone show me how an IF statement works with udon?

#

that did not work ^^

grand temple
civic birch
dreamy gorge
grand temple
#

with a branch

dreamy gorge
#

OH

civic birch
#

TCGum was also the means of deactivating the machine in SDK2 as its own trigger, so I enabled and disabled the object itself

dreamy gorge
#

Okay thanks

#

thank you:D

grand temple
civic birch
grand temple
#

do you have any other udonbehaviours that affect TCGum in any way?

civic birch
grand temple
#

you have slerp, but not doing anything with it. You need to slerp from the rigidbody's current rotation to the pickup's current rotation. The resulting rotation should be plugged into a rigidbody set rotation node that happens after you set velocity

#

actually moverotation I think would be the best

#
civic birch
#

I'm about to lose my mind over a piece of virtual gum

grand temple
#

@civic birch @slate orchid I'm not sure why you're having issues, those both sound like extremely simple things that shouldn't be having any problem. I would recommend trying to recreate the same scenario in a fresh scene where nothing is happening except this one udonbehaviour and animator. For good measure, you can also take a look at this page and make sure you're not getting any errors. https://docs.vrchat.com/docs/debugging-udon-projects

You could also try adding udon debug logs to make sure that things are happening when you expect them to

slate orchid
#

i got it working but....the particles goes off a good few sec before the ani

grand temple
slate orchid
#

shouldn't i have everything done in udon instead of turn stuff on and off in the animator

grand temple
#

depends how you want to do it

slate orchid
#

is there a easy code to toggle a bunch of verbal's at once

grand temple
#

if it requires a bunch of complex timing and moving objects to specific places, it's easier to do that in an animator. But if it's just enabling and disabling some objects that's easily something you can do in udon

slate orchid
grand temple
#

you can create a Gameobject array (it looks like Gameobject[]) and that can contain multiple gameobjects. In your udonbehaviour, you can use a "for" node to loop through that array and apply some change to each of those objects individually

slate orchid
#

so all iwant is for the audio to play amd then the mesh and collder turn off and particles turn on

civic birch
#

I got it! I got it!

grand temple
civic birch
grand temple
#

that... doesn't make sense but ok

civic birch
#

Odd... it isn't giving me the option to edit interaction settings

grand temple
#

do you have an interact event?

civic birch
#

Added it oops

#

forgot this was just a custom event

#

How do I remove interactability from an object?

slate orchid
#

@grand temple this worked but i just need to workout when i push it again go goes back to it's default state

civic birch
#

Hmm, I can't seem to be able to interact with TCGum when testing

#

Do I have something set wrong?

civic birch
grand temple
#

enable disableinteractive

civic birch
civic birch
grand temple
#

it's a node that affects the udonbehaviour

civic birch
#

Wait found it I think

grand temple
#

weird to use unarynegation like that, just use a const bool

slate orchid
#

@grand temple can i get some help about setting everything back after pushing the toggle again

grand temple
#

ahhh I should really be going to sleep πŸ˜ͺ

slate orchid
#

oki sry

#

u should sleep

grand temple
#

try searching google or this channel for previous questions and answers

slate orchid
#

hi is anyone able to help me

civic birch
#

I don't need this info right away, but does anyone know how to make an object work as an avatar pedestal without showing the preview image? Could this be done just by Udon or can a pedestal activated remotely accomplish the same?
I plan on making this a toggleable easter egg

slate orchid
#

can i plz get some help

indigo finch
#

Trying to get a raycast to work (just a simple gun), but for some reason this script seems to crash after the first shot

#

I wanted more info for why it might be crashing, so I did it in udon#, but this one doesn't crash, but it seems to be working... kind of. there is a massive delay between shots, and/ or it almost seems like I have to move the gun around like I have to dodge the old collider. unfortunately, there are no error messages... any ideas what I'm doing wrong?

indigo finch
#

It shouldn't need a const bool value, and wanted to setActive to false not true. Did realise I didn't check if the raycast hit anything on the udon graph, and thus it might have been crashing if it didn't see anything, but that doesn't explain the weird behaviour with the udon# script

#

perhaps somethings wrong with the use in the world... eh, tomorrow's problem

blissful shore
blazing hedge
#

"attach to me" package works when "I build and Test" when I try to publish the world I get this Error ... PLZ HELP!

elder peak
#

does this error stop the build/upload?

blazing hedge
elder peak
blazing hedge
elder peak
blazing hedge
elder peak
#

nice! you are welcome
what happened: you had a false-positive error caused by vrchat's sdk going to play mode but player contexts were invalid there thus the scripts failing and if you have the error pause on, it will somewhat halt the upload, a bit silly

pseudo pelican
#

Why do Udon# scripts sometime close up like this?

#

Unity restart fixed it

#

Weird bugg

high mural
#

how can i get/set the public variables from the VRCWorld component in udonsharp?

grand temple
#

the scene descriptor is not exposed to udon

high mural
#

so it's not possible to adjust a player's walkspeed in-game?

grand temple
#

you can adjust that, but you would not do so through the scene descriptor

#

you would do so by getting networking.localplayer and setting runspeed/walkspeed/strafespeed

high mural
#

cool i'll try that thanks. can you also get the player avatar's height like that?

grand temple
#

the script on the vrcworld that does that is simply an udonbehaviour which applies settings like any other udonbehaviour can

#

depends what exactly you need. You can get the player's bone positions or tracking data and compare the distance from root to head

#

though if they crouch it will be inaccurate

high mural
#

well i saw these mirror buttons that adjusted in height depending on the height of the avatar you were currently using. i wanted to try and recreate that myself in udonsharp

blissful shore
#

I'm stil working on this one @grand temple . All the ship does now is float in space (its kind of Calming actually) how ever grabbing the flight stick and pulling the trigger does nothing.

grand temple
#

you're not doing anything with the slerp

blissful shore
#

what should I put on slerp? how do I utalise it ?

grand temple
#

A is where you're slerping from, B is where you're slerping to

#

you want to slerp from the rigidbody's current rotation to the pickup's rotation

#

that will give you a resulting quaternion that you can then take and plug into a rigidbody move rotation node

blissful shore
#

ohhh ok like this?

grand temple
#

use A and B inputs

high mural
#

how do you transfer ownership of an object to another player in udonsharp?

#

tried this but got an error
Networking.LocalPlayer.TakeOwnership(transform.gameObject);

blissful shore
#

are we there yet? @grand temple

grand temple
#

you're using a and b now, but they're going in the wrong direction. You want to slerp from the rigidbody's current rotation to the pickup's rotation. So you need to flip the A and B

grand temple