#udon-general

59 messages · Page 93 of 1

coarse parrot
#

The layer is blank

visual gale
#

yeah idk what it is

#

but somehow its working when its blank??

coarse parrot
#

Could you click on it and show layer number?

visual gale
#

?!

coarse parrot
#

I'd guess the blank one is on layer 22

visual gale
#

so how would i get it lol

coarse parrot
#

Add Layer

visual gale
#

the hidden layers

#

lol

coarse parrot
#

The layer name is arbitrary so it can be anything.

#

But name it PostProcessing

#

For layer 22

#

See if it show up in the sleep mode object

visual gale
#

Working!

#

Thank You!

#

Also one more question

#

@coarse parrot do you know if there is a way to easily transfer the sdk2 pedestals to sdk3 bc there are missing scripts or do I have to manually make them sdk3 peds

coarse parrot
visual gale
#

alright no problem

#

thank you!

visual gale
#

do you think this is why it doesnt show up in scene?

coarse parrot
visual gale
#

can I separate the capsule collider from the pedestal itself

coarse parrot
# visual gale

A collider is need for interaction for a game object though.

scarlet lake
#

anyone know why the world disappears while flying ?

#

things just become very hard to find because it gets unrendered or something

dapper lion
#

occlusion culling

scarlet lake
#

i dont think i even enabled it but ill check

#

where can i enable/disable it again?

dapper lion
#

occlusion window

loud bridge
scarlet lake
#

its basically a veryyy big platform to show where the ground is of the world

#

how can i stop z clipping?

loud bridge
#

You can't. In normal game dev, you can adjust the camera's clip settings, but I don't think those are exposed in VRChat. You'd just need to scale down and move closer.

scarlet lake
#

the problem is, its a flying world so scaling it down isnt really an option assuming you are talking about the world

dapper lion
#

you can change far distencs in main cam in vrcsdk

coarse parrot
#

You can set camera clipping for vrchat though

loud bridge
#

There you go. do that then ☝️

dapper lion
#

set near distance low as possible so peipke dont complain later

loud bridge
#

Yeah, but then you get ugly z-tearing.

dapper lion
#

when far away for 000

#

in a perfect scenerio. the space around would move to local space rather than world

scarlet lake
#

this camera?

coarse parrot
scarlet lake
#

i just set it to reference camera in vr wold prefab

coarse parrot
#

And set reference camera in world desciptor to that camera

scarlet lake
#

and i pushed the far up and near

#

does camera placement matter?

coarse parrot
#

What camera placement?

scarlet lake
#

of the main camera

#

does it matter where it is

#

in the world

dapper lion
#

no

coarse parrot
#

So you meant location. Doesn't matter

scarlet lake
#

ok good

#

gonna run a quick test

coarse parrot
scarlet lake
#

alright

#

and

#

how can i find the borders of the world?

dapper lion
#

wym

coarse parrot
scarlet lake
#

so when i am flying, i will randomly get kicked out of the plane once i reach a certain area

#

some directions are closer

#

some are further

#

they seem to be borders

loud bridge
scarlet lake
#

i notice in some flying worlds they have borders too

#

also the camera clipping is fixed

#

thank you guys for that

dapper lion
#

this isnt blender but ok

loud bridge
dapper lion
#

32bit

scarlet lake
#

hmm alright what would you recommend is a good way to set up borders?

loud bridge
#

4byte=32bit

dapper lion
#

ihni heard someone call it 4 bytes before lol

dapper lion
scarlet lake
#

flying world so a lot

dapper lion
#

far away borders then

scarlet lake
#

im trying to think of how I will make the borders

coarse parrot
#

Better think how you'd like it to be

scarlet lake
#

maybe just giant walls with a glass like matieral

dapper lion
#

fog

scarlet lake
#

fog/

#

?

loud bridge
#

Just put the whole map under a big simpsons-esque dome.

scarlet lake
#

xd

dapper lion
#

proximity shader

fossil moss
#

Hope you don't mind the ping. But thanks a lot for sharing your footstep Udon! I've been trying to make one since around January myself but I couldn't (I'm just not experienced enough).
I've made a small addition to it by adding isplayergrounded so it doesn't play midair and to find if a gameobject is active to only play in a specific area.

#

I do have a question about this tho if anyone can answer. Is there any way I could possibly make it based on a player is walking on a mesh collider? Currently its based by a gameobj that is enabled through a box collider, very wacky.

scarlet lake
loud bridge
fossil moss
#

I guess that isn't exactly happening then lol

loud bridge
#

You could also raycast downwards and just see what you get. May not always be properly accurate though.

fossil moss
#

I don't even know what that means, F

#

Seems like hellalotta more work

#

Thanks a lot for the suggestions nonetheless. I think this is a quite decent start for having footsteps, albeit a little cumbersome but works as intended

full jetty
#

Anyone know how I can make particles emit in each players hands?

loud bridge
#

Get the VRCPlayerApi, then in Update, get the hand's bone position and orientation and apply those to the particle system's transform.

full jetty
#

Hmm... how do I specify which particles go to which players?

loud bridge
#

Depends on how you want the activation to trigger.

full jetty
#

What do you mean?

loud bridge
#

As in, what causes the particles to be applied to their hands?

full jetty
#

Umm... lets say for testing purposes there are different colored particles and the player can choose which one they want by pressing a button?

loud bridge
#

Then when they interact with the button, you know which player to initialize the script for.

full jetty
#

Well... the thing is I'm very new to Udon. How do I say the person who pressed this button is the person who gets this color?

loud bridge
#

Depends on how the button is implemented.

#

But generally, when something is interacted with, the player who interacted with it is passed as an argument.

coarse parrot
#

Interacting can only happen in local client with local player though

#

Determining which remote player pressing the button is quiet tricky

arctic scarab
#

how i sync toggle in udonsharp

#
    public override void Interact() {
        GameObject test = GameObject.Find("Deck1");
        if(test.transform.childCount != 0f){
        Transform selection = test.transform.GetChild(Random.Range(0, test.transform.childCount));
        selection.parent = GameObject.Find("Deck1 active").transform;
        selection.gameObject.SetActive(true);
        }
    }```
arctic scarab
#
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;

public class deck1 : UdonSharpBehaviour
{
    void Start()
    {
        Debug.Log("start");
    }
    public override void Interact() {
        GameObject test = GameObject.Find("Deck1");
        if(test.transform.childCount != 0f){
        Transform selection = test.transform.GetChild(Random.Range(0, test.transform.childCount));
        SendCustomNetworkEvent(NetworkEventTarget.All, "Sync");
        }
    }
    public void Sync(){
        selection.parent = GameObject.Find("Deck1 active").transform;
        selection.gameObject.SetActive(true);        
    }
}
#

will that work

floral dove
arctic scarab
#

okay i just hold everything 10 million meters away

pastel tiger
#

hi. I'm trying to make a boss fight arena. All what I need to do is to make the player respawn when colliding with enemy projectiles. For some reason (mostly I don't understand how the respawn function works) the player doesn't respawn when colliding. Doesn't matter if I do it with udon graph or udon#. The collider is working fine and it's pushing the player backwards on contact.

#

these are the projectiles (blackholes looking balls)

fossil moss
#

Are these projectiles using a box collider? If so try enabling "is trigger"

pastel tiger
#

then changing it from onPlayerCollisionEnter to OnPlayerTriggerEnter?

fossil moss
#

i mean the projectiles themselves.

#

but yes try that as well

pastel tiger
#

didn't work

fossil moss
#

gimme a sec

#

wow this isn't as straightfoward as i thought it was

pastel tiger
#

yeah

fossil moss
#

I can show you an alternative if you wish

#

not as wholesome and straightfoward but this works

pastel tiger
#

what I'm thinking about now is

#

to teleport the player under the map

fossil moss
#

oh, then you can definitely use that

pastel tiger
#

thank you

fossil moss
#

you simply create an empty game object and place it where you want the player to respawn

pastel tiger
#

will try it now

#

not working🤣

#

the projectiles pushes the player backwards, but the collision even it not being called

fossil moss
#

eh?

pastel tiger
#

yeah mean. I have seen wonders with udon

fossil moss
#

the projectiles pushes the player backwards,

pastel tiger
fossil moss
#

Is the projectile itself supposed to teleport the player, or do you have some collider behind the level that will teleport the player?

pastel tiger
#

the projectile isn't set to be destroyed on collision

#

I just made a ball that's moving in a specific path. Set a teleport location under the map. While I move the player in front of the ball, the ball just pushes me back and the collision event doesn't trigger

#

so yes the projectile itself is supposed to teleport the player, as a way for the player to die while being hit/damaged

fossil moss
#

I wonder if rigidbody makes things different, but shouldn't

pastel tiger
#

I will try it without a rigidbody

#

also it's a sphere collider but I think it should work almost the same as a box collider

fossil moss
#

yeah should be the same

#

Do 1:1 of the udon I did

pastel tiger
#

ok

#

lol everything works now

#

even the scripts that I coded but were not functional

#

I think they were not being updated

#

but once I imported your asset

#

I think all scripts got reimported

fossil moss
#

nice

pastel tiger
#

Thank you so much

#

been suffering with this for 3 days

fossil moss
#

winner moment

pastel tiger
#

you are my savior

leaden granite
#

Does anyone know if there's a way to access the local player's camera object in a script?

indigo finch
leaden granite
#

I'm trying to create a fake window that shows a camera's view but also have it show up properly in VR

indigo finch
leaden granite
#

I saw a world (I think it was called Udon Portal World) that had functioning portals that worked in VR, no idea how they did it though

#

probably possible through shaders

unborn hornet
#

A snippet that I once saw and stashed. Never actually used it though, so not sure how well it works

var cameraScale = (headTracker.position - lastHeadTrackerPos).magnitude / (camera.localPosition - lastCameraLocalPos).magnitude; // Merlin's trick to get camera scale
leaden granite
#

oh cool

unborn hornet
#

Though tbh not sure what the camera variable represents beyond it being a Transform of some kind.

leaden granite
#

i'm really not sure what that's doing or what headTracker or that camera are pointing to

unborn hornet
#

headTracker = Networking.LocalPlayer.GetTrackingData(VRCPlayerApi.TrackingDataType.Head) basically.

#

camera is what I don't get. I need to poke the guy who I swiped this from to see if this is actually still valid code or not.

unborn hornet
spark walrus
#

if i run a function on Update() it gets called every frame and eats up performance? What if the object the script runs on is active at some time, does it still eat performance when inactive?

fickle stirrup
spark walrus
fickle stirrup
#

yes but by itself it should not do any great impact on the performance

grand temple
#

functions can be called on a disabled script (as long as they've been enabled once before) but they will not receive any unity events like update

spark walrus
#

is there a way to lock the players movement when pressing Usedown on an Object?

granite basalt
#

immobelize on vrcplayerapi

#
spark walrus
full jetty
#

So I'm trying to make a world where players can have these particle orbs in their hands, but when I try to line it up with them and make the particles follow them there are some issues. The emitter doesn't actually rotate from where the bone is but rather from it's own center, so how can I make the particles sit in the players palm?

bold marlin
full jetty
#

I actually figured it out. I just put it on a parent object and off set it a bit. Now when the parent object rotates so will the particle system, just on a different axis. But now I have a new issue... I'm trying to get the particles to be toggleable, but not traditionally. I'm trying to say if you interact with this object then the particles will start/stop looping (If I just turn them off they blink out of existence)

bold marlin
#

So you do not want them to just disappear instantly after the interacted with it?
Maybe make a script that stops the looping and then a timer to end the emission?

full jetty
#

I already have the way to stop the looping... and I guess a way to start the looping... just no way to do either depending on if it's currently looping or not

bold marlin
#

have a bool run with it to tell it if its looping or not?

full jetty
#

I don't know how to do that. I'm very new to Udon

bold marlin
#

your using graph or sharp?

full jetty
#

graph

bold marlin
#

@full jetty this is with a toggle bool with stopping a particle looping

full jetty
#

I'll try this now, thanks!

#

Where do I find whatever the Set LoopToggle is?

#

Nevermind, found it

visual gale
#

Anyone know how to fix this?

#

for clientsim

#

and a smaller issue my vrchat examples udon script is deleted and even when I reimport the sdk it doesnt fix it know what i could do?

pallid roost
visual gale
#

I have 999 errors about postprocessing???\

indigo finch
indigo finch
# visual gale yes

one of those links is a vrchat sdk. It will give errors if you have your own installed as well. would start there

visual gale
#

I do see this

indigo finch
visual gale
indigo finch
visual gale
#

ok so just delete the folder???

indigo finch
#

folders. but yea

visual gale
#

yes

indigo finch
#

I couldn't get client sim to work with udon#

visual gale
#

udon#???

#

no

indigo finch
#

nevermind, doesn't seem like you have it

visual gale
#

it just says I need to fix compiler errors

#

postprocessing gives me 999

#

and spams my unity logs lol

#
UnityEngine.Rendering.PostProcessing.AmbientOcclusion.IsEnabledAndSupported (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Library/PackageCache/com.unity.postprocessing@3.1.1/PostProcessing/Runtime/Effects/AmbientOcclusion.cs:183)```
#

Found the solution, remove and readd the post process layer

#

new issue

indigo finch
visual gale
indigo finch
visual gale
#

oh its com vrchat base

#

as thats already included in the sdk

#

new issue

indigo finch
#

will it run at all?

visual gale
#

looks like its missing a directory

#

im going to try to reinstall it real quick

#

Assets\com.vrchat.ClientSim\Runtime\Helpers\ClientSimSpatialAudioHelper.cs(8,48): error CS0246: The type or namespace name 'ONSPAudioSource' could not be found (are you missing a using directive or an assembly reference?)

#

Anyone know what this is?

#

just reinstalled twice dunno why its doing this

scarlet lake
#

how do i stop hating udon so much

visual gale
#

lol

lament valve
#

What do these errors mean?

arctic scarab
#

what is script limits for setting positions

#

selection.position = new Vector3(0, 999999999, 0);

#

x and z being assigned but not y

scarlet lake
#

So I have an idea and I want to know if it's possible

Right now I have some effects that can be toggled on and off globally for everyone to see at my dj booth.

For optimization purposes I want to know if it is possible to make it so people can toggle off those effects locally and make it so the global trigger no longer effects them until they turn it back on

Is that possible?

sonic burrow
#

What does it mean when it says “(1 of 2)”

#

Does anyone know?

scarlet lake
#

By themselves

sonic burrow
#

Sometimes it says (5 of 20)

obsidian stratus
#

I'm currently working on a home map for someone should I avoid using sdk3? I've heard that if your home world is udon other worlds won't work properly

slim hound
obsidian stratus
#

The last time I saw someone run into this issue was last month I believe. I hope it's been fixed by now

bleak magnet
#

Anyone know if there is a plan for bringing back old object sync? The current one does not support animation syncing and is something i need to convert my other projects over that have already made animations.
currently was looking at this trigger system that was made to work with udon but i don't think it will work with syncing animations up to late joiners and the stuff i had help trying to figure out with just got more confusing and seems to be either alot more steps that should be needed or to abandon my animations and start over. thank you

molten zealot
#

So vrchat keeps giving the message “make sure your device has working internet connection’ message pls help

fickle stirrup
elder peak
bleak magnet
#

i see the sync seems to be working great for me in my 2.0? had this world for over 3 years

bleak magnet
#

is there a way to do player teleport without interact by using something like on avatar hit? Or do I have to use on enter trigger ?

bleak magnet
#

oo ok

#

stays local right?

fickle stirrup
#

after that you need to check if returned from method player.IsLocal (or player equals to Networking.LocalPlayer, both are doing the same)

bleak magnet
#

ya just needs to be local its a player reset area to reset the map when you respawn

gleaming sage
#

How would one go about using udon (graph if possible) to play an animation, or attach an animation to a slider? (eg. controlling brightness in a world)

scarlet lake
#

Show I’m looking to Optimize my world even more than it is already to get give more fps any tips

verbal socket
#

Question does anybody here take udon coding comissions ?
I want to make a small game in a world i got. I cant code it myself ive tried XD

wind atlas
#

I have a weird issue where players can run around and do stuff while they are stuck at the spawn for everyone else. No idea when it happens, and why, and I personally have never seen it except other people showing it to me.
They seem to be moving a little bit, and you can hear their voices.

scarlet lake
#

also does anyone know where to get good looking tents at?

#

like camping

dapper lion
bleak magnet
#

how would i hook up a teleport spot to this? not using interact so no field to drop my empty to

#

using on enter triggers

bleak magnet
#

figured it out had to drag the transform part in the object and not the object itself from my list

#

how would i make this local only and not global ?

topaz jetty
wind atlas
full jetty
#

Does anyone know how to toggle particle looping on and off with udon?

wind atlas
full jetty
#

I'm able to turn it off, and theoretically turn it on, but not toggle them

wind atlas
#

This is how it will look like

full jetty
#

How do I get it to toggle the looping though?

uncut tusk
#

uhm is anyone here and can halp me? i have stil a problem with Videoplayer to use a Reverbzone qwq

wind atlas
#

Or is the looping important?

#

If the looping is important you can do this:

full jetty
#

The looping is important yeah

#

It's the only way I can think of that won't just blink the particles out of existence when they turn off

#

Alright, I'll try this out. Thanks!

wind atlas
#

Np, looping might work with that. If not, you might want to look into stopping the particle system manually.

verbal socket
#

Toggle the particles by their emission tab not the emitter itself that keeps the ones it emitted going till their dead

#

But stops new ones from.emitting

full jetty
#

So... it turns them off but not back on again... how do I fix that?

arctic scarab
#

how i turn local function to function that syncs for everyone

scarlet lake
#

So I have an idea and I want to know if it's possible

Right now I have some effects that can be toggled on and off globally for everyone to see at my dj booth.

For optimization purposes I want to know if it is possible to make it so people can toggle off those effects locally and make it so the global trigger no longer effects them until they turn it back on

Is that possible?
(resent)

wind atlas
bleak magnet
#

i got my teleport to be local . is there a way to make my set active go local? the on player enter trigger is making it global still

wind atlas
bleak magnet
#

how?

wind atlas
#

The reason it's "global" is that you see every player move on your client. So other players can move into the trigger on your screen basically.

#

player > islocal

bleak magnet
#

the player is local at teleporting but the rooms are still global

wind atlas
#

and then plug that result into a branch.

bleak magnet
#

i need the node between the teleport to and my block to convert the global back to local if possible

#

my teleport is working fine

wind atlas
full jetty
#

Uhh... yeah I have no idea what to do about the particles... I'm very new to Udon

bleak magnet
#

do i plug in the player api to the branch ?

bleak magnet
wind atlas
bleak magnet
#

so only the 1 that enters will tp and set objects active ?

#

ty going to test with alt

bleak magnet
full jetty
#

I figured out the particle stuff!

wind atlas
bleak magnet
#

from my get is local ?

wind atlas
#

TeleportTo will crash if it's missing the player in general. Same with all other nodes that require all the inputs.

bleak magnet
#

aw i see ty

#

i will try again

bleak magnet
#

i have to use false which only makes the tp local and not the set actives

#

could i use exit trigger for after player teleports it does the object actives?

wind atlas
bleak magnet
#

with the interact it would work fine but because i need it to be a walk in for what ever reason it wants to be global by default.

bleak magnet
#

i think this solves it

#

tbh the 1st branch on the tp might not be needed at all

visual gale
visual gale
#

thas a lot of udon graph

bleak magnet
visual gale
#

2.0 was best

bleak magnet
#

too much extra steps less user friendly and easier to break

visual gale
#

udon does allow for some custom scripting tho something never possible before on vrchat worlds

#

which is nice

#

quality of worlds has increased with udon

bleak magnet
#

ya i just wish 2.0 had udon applied on top of it not seperated my world im converting slowly has like 16 rooms in it and the new object sync doesnt work with my animations

visual gale
#

i just wish they could have coexisted

#

guess not tho

bleak magnet
#

cyan made a trigger system but i decided to just do it the hard way

visual gale
#

UdonSharp is the new thing now

#

udon is going obsolete lol

visual gale
#

I had to relearn everything for my world

bleak magnet
#

think there keeping nodes

#

they should both work together

visual gale
#

no reason not to keep nodes

#

lol

topaz jetty
#

they will keep nodes, udonsharp is just a compiler made by someone, not the vrchat team

#

although they did hire the person that made it recently

bleak magnet
#

kinda wish udon had a pre made node system for multiple things like how they did player mods in the world asset that gives you your jump etc in udon

visual gale
#

yeah they hired them

#

idk im more comfortable with nodes lol

#

my friend says he only knows how to use udon# and not the graph LOLLLL

topaz jetty
#

same here lol

visual gale
#

the graph is too advanced for people??

#

lol

topaz jetty
#

wrote thousands of lines of u# code but never used graph

bleak magnet
#

nodes is easier on my eyes scripting is giving my html5 flash back in my game design classes lol..

visual gale
#

graph is easier imo

bleak magnet
#

graph seems easier but slower than scripting

topaz jetty
#

for small things it is yeah but if you wanna make something complex graph only slows things down and makes things more confusing

#

it's harder to keep order for very big scripts

visual gale
#

I only make hangout worlds

#

im not a game dev

#

so graph works fine for me

topaz jetty
#

yeah then graph is fine

#

though still prefer u# even for small things lol

visual gale
#

yeah even with avatar peds i use graph i can not use the U# shit idk how that works lol

topaz jetty
#

it's faster than dragging nodes

visual gale
#

code ew 😂

bleak magnet
#

i reccomand using the block nodes to keep things clean like how i did on my game set actives true and false collumes

visual gale
#

its code i have to learn and im not willing lol

topaz jetty
#

and in graph you don't have function arguments and function returns which makes everything aside from simple things like a million times more tedious to do

bleak magnet
#

my collumes will get pretty long im using a is trigger at spawn to reset the world to its defaults

visual gale
#

i mean thats not that hard

#

I also use legacylocomotion bc Nostalgic old locomotion Sdk2 style chad moment

bleak magnet
#

im keeping udon close to how my 2.0 logic was so if vrchat ever just poofs my unity will have easy to redo with any trigger system

visual gale
#

ye

topaz jetty
#

doubt vrchat would poof but other unity based social vr games live on lol

bleak magnet
#

for complicated games i would say scripting might be best if can use but i would still node

topaz jetty
#

if anything would succeed vrchat it'd probably run on a custom engine

bleak magnet
#

hope vrchat keeps lasting even tho i hate the udon and spending hours to figure out 1 thing that was fast in 2.0 wasnt fun but they did make something interesting just wish they stopped adding extra steps to ever update. dont fix it if it isnt broken

topaz jetty
#

just use cyantrigger if you don't like udon

#

I never used sdk2 but from what I've seen it looks a lot more annoying to use

#

but then again I've been programming for a few years so learning udon wasn't that hard for me

bleak magnet
#

i need to figure out how in udon you can make animation sync that the old object sync had. really need the old object sync bk xD

topaz jetty
#

yeah syncing is really annoying in udon

bleak magnet
#

the stuff the triggers did was fast but the over all syncs needed is still a pain even if i went with cyans

topaz jetty
# bleak magnet i need to figure out how in udon you can make animation sync that the old object...

https://docs.unity3d.com/ScriptReference/AnimationState-normalizedTime.html you could maybe sync a float variable in a continues sync and then make it set the normalized time on the clip, or if you want it to be less stutter you can make it check how big the difference is between the local animation's time and the master's animation's time and sync if it's above a certain threshold for less frequent stutters but larger individual stutters

bleak magnet
#

maybe but i have to see to kinda understand

#

spent all day figuring out my manual culling to be local

topaz jetty
bleak magnet
#

to replace object sync?

topaz jetty
#

no for the animation sync

#

for object sync just use the sdk3 object sync

bleak magnet
#

o ok so this is the part that 3.0 removed

topaz jetty
bleak magnet
#

ya i use object sync on pick ups

#

just cant on my animations

#

ty

sudden flume
#

I cant find the scripts for these new contacts and receivers

pallid roost
sudden flume
#

yeah I figured that out sry

#

lol

zenith kiln
#

why isnt my dynamic bones working at all for me on vrchat quest?

topaz jetty
# zenith kiln why isnt my dynamic bones working at all for me on vrchat quest?

The new physbones have to be added manually for quest avatars because the already uploaded quest avatars don't have dynamic bones on the quest versions, so they can't be converted to physbones either. It'll only work on newly uploaded avatars which right now (a few hours after launch) is pretty rare but you'll probably come across more soon

neat jasper
#

working on a game world with two rooms, a spectator area and a play area—i want players inside the spectator area to be able to hear everyone, but players inside the play area should only hear other players inside the play area.

is there known good practice for doing this so i don't have to go crazy in local testing? searching for anything involving "mute" makes the results a giant mess, LOL

pallid roost
#

That should be pretty simple. Are the rooms near eachother or far apart? If they are far apart you could just set the voice far value of everyone in the other game room to far for thenprople inside the spectator room

pallid roost
neat jasper
#

it’s around a 3-second walk, LMAO

#

are OnPlayerTriggerEnter / OnPlayerTriggerExit reliable for players besides your own?

full jetty
#

How do I set ownership of an object to a player?

pallid roost
neat jasper
#

nod

#

aaight, thank you for the information

#

if you've got that script uploaded anywhere, would be cool, but as long as trigger regions are reliable this doesn't seem too bad

pallid roost
#

I can find it after work if you need but it wasn't too complicated to do.

neat jasper
#

i'd appreciate it if it's not too much trouble, just because testing networked stuff from a single PC is a huge drag—I only need a single zone as well

#

if nothing else, it'd be a nice reference to have for late-joiner stuff

feral merlin
#

Is it possible to have udon (or unity in general) read data from a spreadsheet?

grand temple
#

yes, you can reference .txt files as a TextAsset

#

dump your spreadsheet in there, use string operations to split and parse it

pallid roost
feral merlin
tribal widget
#

My camera kinda died? How do I make it re-appear and show the lines of what it sees?

indigo finch
jaunty schooner
#

I'm trying to make a video player emit light that casts shadows from dynamic objects. All the solutions out there which I've found so far for having a video player emit light can only handle baked shadows. I think a color changing shadow casting spotlight combined with a real time reflection probe would give me an effect which is good enough, but I need a way to sample the average color of the video that's playing. I'm guessing the fastest way to do that would be to sample the lowest level mipmap of the video player's rendertexture. Has anyone tried this? I'm pretty sure I've seen lighting effects in worlds which change color with the video that's playing, so I'm thinking someone has already made this work.

pallid roost
#

But that still only has static shadows

#

I'm pretty sure you can sample pixel colour from a render texture though and use that to set a spotlight colour

pallid roost
neat jasper
#

tysm! really appreciate it

pallid roost
#

No worries

jaunty thistle
#

Im pulling my hair out. When i teleport the room does not get enabled and i just fall. It was working a minute ago then i change something unrelated and it breaks?!? What is wrong

bleak magnet
jaunty thistle
bleak magnet
jaunty thistle
#

too late already saved over it unfortunately

bleak magnet
#

can try and save that script put to the side and make a new 1 to try again?

#

just make sure you compile and its green

jaunty thistle
#

the script wasn complicated so i already deleted its contents and started over

bleak magnet
#

o ok

jaunty thistle
#

yeah no other script is using anythin related and the gameobject doesnt get turned on

#

ok well i fixed it

#

i changed nothing just kept recompiling and testing

bleak magnet
#

ya udon does that. spent a whole day doing my tp on enter and manual culling. things kept breaking or reverting to global instead of local lol

bleak magnet
#

does the block do the nodes in order from top to bottom? i need to reorder my teleport so the next room loads b4 you get there or at same time to remove flickering of things being activated

#

well fixed my issue i removed the exit trigger for culling and only used enter trigger for both and have the tp and culling attached to a block. flickering is gone

#

is the get local really needed or could i just use direct with the branch switched to false? trying to simplify a little more since i have to repeat this for my other 16+ rooms and i don't think i can copy nodes over to new scripts lol. will be at least 30+ doors left to plug bk together from my 2.0

elder peak
#

why would you copy this over?
there is an idiom known in computer science (and many other aspects of life...) DRY: don't repeat yourself

it's a bit hard to follow your graph, as most is not shown
just note, you cannot teleport anyone but yourself

bleak magnet
#

its manual culling for local

#

everything after the block is either teleport or the 2 set game object actives

elder peak
#

that does not really explain why you need multiple graphs when you can just use the behaviour again

robust venture
#

why do i see other ppl fall avatars and hwo to turn it off

turbid bear
#

does anyone know how to have 2 different sounds play when interacted with?

loud bridge
turbid bear
#

ok how would i do that

turbid bear
#

sorry i dont use or know how to use c#

#

ive been using graph

loud bridge
#

Yeah, that function is available in Udon Graph. Udon just mirrors Unity's C# library.

#

(most of it, anyway)

turbid bear
#

ok

loud bridge
#

So, I heard a rumor that Avatar Pedestals can be used for persistent world data... does anyone know anything about this that can expand on the subject?

cunning basin
#

there's the avatar image reader project "Decodes UTF16 strings from image data stored in avatar pedestals. Allows you to update text inside a world without updating the entire world."

loud bridge
#

Bingo. That's probably what I heard about. I'll look into it.

feral tartan
#

I have a UdonSharpBehavior question:

How can I set from script 1
Namespace.Class.Void();
so it runs in script 2?
Both are UdonSharpBehavior c# script but on 2 different GameObjects.

Because

using namespace; //Namespace from script on different GameObject

public class blabla :UdonSharpBehavior
{
  public class MyClass
  {
      public static void Main()
      {
           var anInstanceofMyClass = new MyClass2();
          anInstanceofMyClass.TestCall();
      }
  }
}

is not working in Udon.

Or when I do:

using namespace; //Namespace from script on different GameObject

public class blabla :UdonSharpBehavior
{
  public class MyClass
  {
      public static void Main()
      {
          MyClass2.TestCall();
      }
  }
}

Then I get an CS0120 (An object reference is required for the nonstatic field, method, or property 'member') error.
Thank you in advanced.

loud bridge
#

(A) you really shouldn't be nesting classes in UdonSharp.
(B) You shouldn't be using statics either, generally
(C) You need to store a reference to the object on which you want to invoke the method as a class member. Then you can assign that reference in Unity's inspector window.

elfin kestrel
#

Trying to make a button that disables all world audio (audio caused by a toggle on/off button with the audio attached to it). All I want the button to do is turn off the audio, that's it. And then I can go back to pressing the audio toggle buttons and they continue to work. I tried one way but it caused the original button (the toggle audio) to not work at all,

The image shows the code being used to mute all audio. The intended effect being as if a player pressed the toggle button, but it happens to all toggle buttons at once. This current code as I said stops the original button from working however.

So literally just a stop button, that's what i'm tryna make, but it no work

loud bridge
#

Did you assign the audio source in question to the "newVariable" slot in the inspector?

feral tartan
#

Do you mean something like this?:

public class blabla :UdonSharpBehavior
{
  [SerializeField] private UdonBehaviour OtherGameObjectScript;
  public class MyClass
  {
      public static void Main()
      {
          OtherGameObjectScript.Invoke()
      }
  }
}```
loud bridge
#

That's better, but you still need to stop nesting classes. And there is no Main function in Unity. You probably want to use Start or Update (and not static).

feral tartan
#

Ok, I can see If I can make a work around without nesting. The Main was only for this example.

elfin kestrel
#

then the original button stops working completely

loud bridge
#

What's the code for the original button?

elfin kestrel
#

had to rearrange to fit into a single pic

#

(no code changed)

loud bridge
#

Looks to me like you just may need to press it twice after using the mute button (because the mute button won't ever effect the "Toggle" boolean).
Also, you could refactor that toggle boolean completely out and just branch on the AudioSource's isPlaying property.

elfin kestrel
#

i'm going to try something drastic, i'll update you (i tried that way btw and still no)

clear root
#

How would I make a interact that would reset multiple moveable objects to original positions?

spark walrus
indigo finch
# clear root How would I make a interact that would reset multiple moveable objects to origin...

Provided they all have an object sync component on them, you could create an object sync [ ], and cycle through it with a for loop, playing the node objectSync, respawn.
Here's a video on that: https://youtu.be/nSIFN9rRcQs

respawn object tutorial: https://youtu.be/p6vtL_BRMEo
cycle through array tutorial: https://youtu.be/s3mZ7SLfmzI

This has been asked a few times now in my comments on my original video covering how to respawn only one object, so I thought I better address it in a little more detail. Didn't think it warranted a full video though, so here is a ro...

▶ Play video
indigo finch
clear root
#

This will just respawn all objects with an object sync attached correct?

loud bridge
#

Not if you store them as a class member array and assign the ones you want in the object's inspector

indigo finch
indigo finch
indigo finch
clear root
#

Thanks 🙏🏼 and ok I’ll do that after work and yes beginner is a overstatement

indigo finch
clear root
indigo finch
clear root
#

very much so, so do your other videos

clear root
# indigo finch glad it helped ^^

actual just one thing, when i interact with the button the first time, it resets everything, but if i move the obejcts again, it wont reset them a second time?

magic drift
indigo finch
clear root
indigo finch
clear root
indigo finch
# clear root

Sorry, I meant that i wanted to see the whole udon behaviour in the inspector. Including this bit

clear root
#

it goes down more theres 92 in total

indigo finch
# clear root it goes down more theres 92 in total

ah, there's the problem. you can't have any empty slots in the array. they were at the end, so the code crashed after it respawned everything above it. As unity is a bit of a pain for changing values causing it to reset values, I would (if your pc can handle it), change the array's size to 10092, and then delete the 100 from it

clear root
indigo finch
clear root
lament valve
#

How do I reference the player's view camera?

loud bridge
# lament valve How do I reference the player's view camera?

You can use GetBonePosition/GetBoneRotation or GetTrackingData methods of the VRCPlayerApi instance:
https://docs.vrchat.com/docs/player-positions

#

I don't know if you can get a reference of the camera itself.

lament valve
#

Oh ok, thanks!

thick mesa
#

More or less an avatar question but um

#

Is it possible to add a custom script to an avatar?

#

I'd like a script that could change the value of the value inside the FX (Float Value) in increments when a Contact Receiver is set to true.

#

For example: The longer you press the nose, the farther the ears will slowly go down.

indigo finch
bold wren
#

hi, i have a question, everytime i change my avatar in vr chat, my arms are down and i can't control it, is there a fix?

#

like i just cant control my avatar

bold wren
#

ok ty

brittle sphinx
#

Hello there, im just new here. I just tried to build fresh and new UdonExampleScene, and those error appears. any ideas?
(also i want to know how to test in-editor, like player interactions)

last geyser
#

I got another question, I have two buttons that do the same action and are in sync with late joiners. But how do I get the other button to perform the same sequence by pressing button 1? and cause button 2 to also trigger? Reason for it cause When you press button 1 to open it and then press button 2. It will open too but 2nd time will close it. I want both button to be in sync with each other according to the interact.

coarse parrot
scarlet lake
#

I cant test/build as this shows up -and im confused on why? the scene is downloaded is it as the scene needs to go onto evberything dropped into the world if you drop assessts/furnitre or?

coarse parrot
scarlet lake
tepid tiger
#

Hi have a question if someone might know the issue. So I did buy vr today and was on PC before, and now I can’t use 90% of all my avatars and also can’t see others avatars, anyone know how to fix that?

elder peak
#

do you use a quest?

crimson loom
#

I have multiple toggle objects for udon graph, but how do I make it so activating one toggle will reset the others?

#

if that makes sense

#

because it's text and I don't want them to overlay on each other

mental hamlet
#

vrpill ?

outer rune
#

More of a technical question than a true udon question, but should we expect any performance improvements with Udon considering the recent upgrades to the avatar SDK with this new unity compiler ? Currently udon can be hundreds of times slower than C# and figured there could potentially be more than meets the eye with this

grand temple
#

no, burst compiler is not being used in udon

outer rune
#

Sorry, let me ask this in a different way, are there plans of having the udon vm run through burst in the future ? I know udon code itself won't ever run through burst

grand temple
#

I'm not entirely familiar with burst, but it sounds like it's supposed to just work with the jobs system better. Udon is not multithreaded and even if it was, it would need massive changes to existing world scripts to take advantage of that

#

it seems like it would be quite the feat to get udon to interact with the jobs system though. I think there are better ways to get performance before introducing multithreading and jobs

wooden wren
#

Hi I don't know if we ask questions here or not but I'm looking for avatars with the dynamic bones trait since it just recently came out on Oculus I'm trying to find some people that know where good ones are for females

solar crater
#

Hey!
does Udon work with 2d arrays or jagged arrays?
ive seen that it doesnt work with 2d arrays but using a jagged array just results in this and im not sure why

worldly tapir
#

I'm using jagged arrays in my project and it works fine. normal 2D arrays are sadly not supported.
Check for IndexOutOfBounds errors, put some logs of your index and the length()s in your code.

grand temple
#

make sure that you initialize all layers of the jagged array

#

it's just putting an array inside an array, so if the children arrays are still empty then trying to access them will not work, same as any other array

worldly tapir
#

btw, did something weird change with canvases and buttons in the last six months?
My old canvases still work perfectly well, but if I make a new one and add buttons within a panel, they don't work.

Image: blue marked button works, red marked button doesn't work. They have the same setup, the canvas has the UdonUIShape on it.
the not-working ones don't even turn darker when clicked, so it's not a script error.

All of them work in unity play mode, but not when built, so it has to be something with the canvas I guess...?

grand temple
#

are you sure it's not being hidden behind that text?

worldly tapir
#

I don't think so, looks fine to me

#

the "i" is slightly obstructed but works perfectly well

grand temple
#

there's some other element there, is that the text that says minimum local buffer? Or the 40ms?

#

try going through the common problems here https://docs.vrchat.com/docs/vrc_uishape

worldly tapir
#

accidentally rotated the canvas in the last screenshot, text got hidden behind the mesh.
these things also seem fine, I'll read through the link you sent now ^^

grand temple
#

that doesn't look fine though, that looks like it's pretty clearly sitting directly on top of the buttons

worldly tapir
#

thick white outline is a panel that contains the 40ms and the buttons.

grand temple
#

hmmm ok

#

could be one of the other things in the link then

worldly tapir
#

things in the link are all things I already checked.
Might just have to make some mesh buttons instead, adds the benefit of showing the interaction text when pointed at

grand temple
#

could you show me the button's events?

worldly tapir
#

sure thing.
But again, not even getting the darker tone, so it's probably not reaching that part.

grand temple
#

ah, if it works in play mode but not vrc then it's usually something wrong with the vrc uishape

#

can I see the whole gameobject of the canvas, including the collider if it has one?

worldly tapir
grand temple
#

the inspector?

worldly tapir
#

1 sec

#

oh god damn it.
apparently it was because it was parented to a gameobject and rotated 180°.
unparented it, now it works...

ebon musk
#

So I tried to convert a C# script to an udon script and it seems to have broken every script in my Project

errant ivy
#

Can you make an API get request in udon?

ebon musk
#

Does anyone know how one would go about making an engine sound that is variable to speed?

#

I am trying to convert the standard assets script but its much more complicated than expected

indigo finch
# ebon musk Does anyone know how one would go about making an engine sound that is variable ...

Converting scripts would be a hassle to walk someone through, but here is my two cents for this question. I did this for a hoverbike world I made (and later abandoned), and at first I used a bunch of animations, and put them all into a blend node in an animator. Then I could change the float parameter on the animator, via udon.
Later on though, I just went for a basic pitch change, and this was the code for that:

#

something I did notice however, is that it would stutter like crazy if I had a vrc audio Source on it, but it was fine with just the standard unity one. thinking back to it now, it may be because I did it on update, and not late update or something, but I'm sure someone else would know more

last geyser
#

I've come to a realization that the script I been working on for a week, Is overcomplicated but unable to create a simple Graph of a certain thing.

Udon Behavior 1 is suppose to spawn food onto the plate which looks like this

#

Udon Behavior 2 is suppose to be on the food that when you interact with the food, It becomes unparent which looks like this

#

and mouse interaction which causes the food to be eaten and disappear looks like this.

#

Problem is this whole thing isn't properly graphed properly, Which Behavior 1 is activated and works fine but Behavior 2 is obsolete because the first one is using the animation that causes it to constantly play and never change with the 2nd one being triggered as well the the 3rd. I am not exactly too sure how to even graph this whole thing properly. Despite the tips I been given, It hasn't been working too well.

vapid niche
#

Okay, so I’m trying to make a toggle in which I press a button, it sets an entire area inactive. (I have the transport script)

I have something sort of working, but its under the premonition that something is already inactive. I feel like this should just be an easy script to make but yet I can’t figure it out

forest mist
#

Hey, dumb question but how do you get Comments in Udon?

It's not showing up in search, and it's not under Special ->

#

Update: I am not a smart man

lament valve
#

How do you make something work globally in U#?

arctic scarab
#

how i make function synced for everyone

arctic scarab
#

hmm i see i have to sync entire class

worldly tapir
worldly tapir
topaz jetty
agile harbor
#

Does anyone know how to get the pens to work when editing in android? I got them to finally load into my quest world but nothing happens when you try to draw with them, the tail length is .5 also

worldly tapir
#

Are you using nodes or U#?

arctic scarab
#

u#

#

and since i dont know csharp at all

#

main difficulty is that function has rng in it so i cant put it whole into sync as everyone will have different results

#
    public override void Interact() {
        GameObject test = GameObject.Find("Deck1");
        if(test.transform.childCount != 0f){
        Transform selection = test.transform.GetChild(Random.Range(0, test.transform.childCount));
        selection.parent = GameObject.Find("Deck1 active").transform;
        selection.gameObject.SetActive(true);
        selection.position = new Vector3(6, 1, -1);
        }
    }```
worldly tapir
#

Alright.
If you want a function to be executed by everyone that's currently in the world, use the line I posted earlier.
Keep in mind that this is fire-and-forget. doing e.g.
SendCustomNetworkEvent(VRC.Udon.Common.Interfaces.NetworkEventTarget.All, "CloseEntranceDoor")
will, provided you have a function called "CloseEntranceDoor()", fire that function for everyone. Players that join after this line has been executed will not receive this call.

If you want something to be synchronised for everyone, even when they join late, you use synced variables.
Put a "[UdonSynced]" above a variable to sync it. Since SemdCustomNetworkEvent does not directly allow you to transfer variables, you can use this in your case too.

Now, there's two methods of synchronisation, only one can be selected per behaviour:
continuous and manual.
synced variables in a continuously synced script will always stay synchronised on all clients, while manual synced script sync all variables only when you call "RequestSerialization".

arctic scarab
#

i would use synced variables but these seem to have much more work with them

worldly tapir
#

They do make things a little more complicated. Keep in mind that you can always use both (any)synced variables and SendCustomNetworkEvent together., this can sometimes make things simpler.

arctic scarab
#

as soon i paste in udonsynced im having lots of errors

worldly tapir
#

a bit difficult in your case since transform can't be synced yet. I gotta test something really quick, back in 5 minutes or something

arctic scarab
#

i mean if i only can sync values like ints and bools then i would need another function that assigns them to correct places

brave granite
#

ok so i want to make a basic udon ai. just an avatar that look at the player for now but not sure what to program or where to start with this anyone have any advice. i can already do basic codeing in udon so no basic tuttorials plz

brave granite
#

guess what i would like to know is how to get a players viewball location?

worldly tapir
# arctic scarab i mean if i only can sync values like ints and bools then i would need another f...

I don't know exactly what your goal is with these functions but one way to do this would be to put a UdonBehaviour onto your child objects that contains a synced bool (manual if you don't need to keep changes for new joiners, continuous if you do).
Then, on OnDeserialization, use the bool to see whether the child should be to its new parent and do all the other operations there if the bool doesn't match its status.

arctic scarab
#

theres like 100 child objects

#

so id rather keep all script in spawner script

worldly tapir
arctic scarab
#

can i just make one more script that will auto sync whenever player joins or value changes

brave granite
#

thats a start for sure thanks.

worldly tapir
#

...apparently you can replace the Networking.LocalPlayer. and just use VRCPlayerAPI. instead

arctic scarab
#

cant i make synced variable have sync like object sync component?

worldly tapir
# arctic scarab can i just make one more script that will auto sync whenever player joins or val...

you can definitely do that. Do not be afraid to have a small script on 100 objects though, especially if it's just used as a container for manual syncing.
Keep in mind that, if you have one script dedicated to syncing, it will sync all variables of all child objects you want to keep track of, you can't sync a single one.
Using a script to keep track of syncs while the syncs themselves happen in these container scripts on the individual object keeps network traffic low.

worldly tapir
arctic scarab
#

like vrchat automatically manages grabbables

#

and dont have to do anything more with them as they are always synced properly

#

hoever when i want to change position or toggle objects then all changes are just for one player

#

i would like each position or state change be shared across clients

worldly tapir
arctic scarab
#

but problem is i probably have to all time run loop that syncs it

#

and index everything

worldly tapir
#

that's why I'd just put the sync script on the individual objects and see how well that works. Saves a lot of hassle

#

if you join, send an event to the world owner/master that tells all objects with the script to RequestSerialization

spark walrus
#

can you get a list of the child_objects from the script of the parent? How can i send a custom event to the child?

brave granite
#

@spark walrus well you can send a custom networking event and then recieve that event on the child object.

brave granite
#

@spark walrus you can also use an animators perameters as well.

scarlet lake
#

How do make things with udon?

compact stirrup
#

Did the avatar dynamics update do something to framerate-based calculations? like are update and fixed update no longer framerate dependent or something?

grand temple
#

your max fps in desktop now matches your monitor's refresh rate

worldly tapir
brittle sphinx
#

Hi there, I'm currently using UdonSharp, and I just tried to test TriggerCollision

 private void OnTriggerEnter(Collider other) {
        if(other.TryGetComponent<OdenBehavior>(out OdenBehavior oden)) {
            oden.SendCustomNetworkEvent(VRC.Udon.Common.Interfaces.NetworkEventTarget.All, "Fry");
        } 
    }
#

and Error appears like this

Assets\Scripts\UdonBehaviors\OdenSoupBehavior.cs(15,51): System.NotSupportedException: UdonSharp does not currently support node type DeclarationExpression
#

any ideas?

grand temple
#

use GetComponent instead of TryGetComponent

#

then if you need to check for success, you use utilities.isvalid

brittle sphinx
grand temple
#

I would also recommend doing utilities.isvalid on the original collider other just in case. There are some cases where it is possible to receive ontriggerenter from a protected object like vrchat's UI or player colliders

brittle sphinx
#

another short question, how can I detect runtime exception during test?

grand temple
#

you can watch your log for exceptions

#

which you can access ingame with rshift + tilde + 3

#

or you can set up the udonsharp log watcher in edit > project settings > udonsharp. This tool will watch your logs for errors and create the error in the unity editor, and clicking on the error will bring you to the exact line of code in C# where it happened

brittle sphinx
#

what a great advices!! T_T that solves all for now!

#

Thank you sooo much!

scarlet lake
#

what's udon?

grand temple
#

?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

glass shoal
#

Avatar channels: how upload 💀
Udon channels:

arctic scarab
#

can i get object origin position

tribal meadow
#

is it possible that an udon behaviour script could overide your proximity settings in the pickup script? It doesn't seem to matter what I set the pickup proximity to, it does not change (you are able to grab the object from too far away) looking for possible causes. Object is in the root of the hierarchy. Collider is the same size as the object. Also does the order the scripts go within the inspector matter?

indigo finch
tribal meadow
#

VR

#

Basically you can see here how far away the object is interacting with the player, even though it's set to almost nothing. Is the proximity setting only for non pickup-able objects? and if so, how would I adjust the proximity for grabbable objects? This is being used on a lighting control system so there are many of these objects, so when the proximity is this high, you often end up getting the wrong object, or it interferes with other non grabbable objects.

indigo finch
tribal meadow
#

yes

#

makes no difference

#

It looks like the proximity for movable objects is preset. The proximity setting only effects static objects like a button or toggle. This also seems to be the case for canvas UI objects, the proximity setting has no effect on that either. I put in a feature request for pickup object proximity (unless anyone else has some ideas) I see others are asking for this for the canvas UI as well.

ebon musk
#

How would one go about disabling player collisions when in a seat?

indigo finch
zealous vector
#

is the phizbones in unity already or is it a file I need to find and download

clever flare
vapid niche
#

alright, I have my world and I have areas load and deload on teleport, mainly for optimization. However, I need to add a script that like, sets the main area active on respawn, as I have several people who do this to get to the spawn point to see their friends quickly. Is this even possible?

indigo finch
vapid niche
#

I managed to make a work around.
I have a platform under the respawn point that you fall on. From there I have two buttons that need to be clicked that gives the reverse. You have to respawn twice, but it works for now.

ebon musk
indigo finch
# ebon musk I can't seem to find a node that allows me to connect playerApi output from OnSt...

the playerApi is saying what player entered the station. it doesn't contain any information about the object you want to change the layer of.
From the playerapi, put that into a playerapi. is local node. that will give us a bool to say whether or not it was us, the local player, that entered the station. Then put that into a branch node with the arrow from our onStationEntered plug into it's arrow slot. Now we only want to toggle our object if we were the one to enter the station, so coming out from the true arrow, we want to plug that into a gameobject, set layer node.

this node requires both a object to change it's layer (the instance slot), as well as the layer we want to change it to (walkthrough layer = 17). Go up to your variables tab, hit the little plus button, and create a gameobject variable. Give it a name, and hit the little dropdown and make it public. Then plug it into the instance slot.

When using the code, you will need to plug the target gameobject into this slot, in the inspector.

ebon musk
ebon musk
#

Or would it be playerlocal?

magic drift
#

How would I make an area that sends an event or trigger if an object is placed on it? (or a certain amount of specific objects)
preferably using Cyantrigger

indigo finch
indigo finch
worldly tapir
#

@red gazelle thank you for the nice words!

To answer your question, yes, as you probably noticed it recognizes note-on events at note-off when velocity is zero. This is common practice for modern midi devices, it's just that a lot of people don't read the midi spec when making maps, since note-on and off seem so intuitive :D

For the networking, I'll have to answer that laer because my break is over rn, sorry :P

grim bluff
#

Hey guys!
I'm in a bit of a pickle.
I have base64 strings of images in a json file that I want to load in vrc.
Is there any way I can convert these strings to images/textures?
I have tried creating a new Texture but Udon doesn't support the constructor of this.
If you have any idea's, thank you in advance!

fluid summit
#

Hey so me and my friend are in development of a Bendy Themed Horror World,wanting to add monsters that chase the players,any one know how to make a monster AI for Undon?

#

Or if any pre existing thing that we could use and edit

fickle stirrup
# fluid summit Hey so me and my friend are in development of a Bendy Themed Horror World,wantin...

you can check this https://youtu.be/xVXXS7HX7Og

TLX

In this TLX Spring 2021 session, Centauri focuses on how to create simple local and synced AI, and different ways to sync it between multiple players.

Check out other talks from the TLX Spring 2021 event at https://www.youtube.com/playlist?list=PLTgqlzYxsEMxiUvVaqBcD5OL9MpdmkiSH

Learn more about Prefabs TLX at https://tlx.dev

Follow TLX on Tw...

▶ Play video
fluid summit
#

Ah! Thankyou

#

Oh good grief it’s an hour 😂

#

Oh well

pure scarab
#

hi there, so uhm, udon just screwed up my complete project, and now i cannot even use it in a new project anymore, cuz im already getting 36 errors, is anyone mabey able to help me?

scarlet lake
#

what is the latest udon version rn?

pure scarab
dapper lion
#

what is sdk version?

#

and also show errors plz

arctic scarab
#

why vector3 position is double and not float

#

i cant change to position with dots

river musk
#

Is there a way to make a point system using buttons to add certain points on a scoreboard of text?

river musk
#

I want it to add a number to text with one button, but if a second button is pressed a different amount from the first button is added ontop like a counter. Ive tried using ints but it just replaces the existing number instead of adding with the amount there.

wind atlas
#

Not sure if that's what you meant though.

#

You could try posting what you tried.

river musk
#

This is what I had so far

wind atlas
river musk
#

All I want is that when this custom event happens, I want it to add numbers from the addition Int to the text and if there is already a number on the text to add ontop not replace it

dawn forge
#

Is there a way force a user into a defined avatar or scale to specific dimensions for the duration of the map visit or in order to participate?

wind atlas
#

You use that to store your counter, then add to it, and then to display it as text.

wind atlas
river musk
wind atlas
dawn forge
jaunty fiber
#

I have a feeling I already know the answer to this, but
I have an idea for a game and would like to automatically post and store user scores via a webserver.

I know that using the video player I can do GET requests, but is there anyway to parse responses coming in from that?
Also, are you able to change the header and body of that request?

wind atlas
# river musk Like this?

No, you are using using the wrong get. Notice how it says Int32[], you need the one without the brackets. Just drag counter in and it shows you the hotkeys for it.

#

Also, you don't really need the for loop, I'm really confused why you are using it.

#

It looks like you are missing some coding basics, so I might make a graph myself in a bit when I have time.

wind atlas
river musk
#

Im having trouble finding it, Do you mean get value? There is no other get node besides the one you said is wrong

wind atlas
wind atlas
#

CTRL is for making a set node

river musk
#

So the Set Counter is what I need?

#

I just tested this and it works by itself but with all my shit i did I need to fix it

pure scarab
#

i have soo much errors with udonsharp, is there anyone able to help me for a sec? i already recreated my world 3 times.

pallid roost
#

Right after importing the vrc world sdk and udon#?

pure scarab
#

i just got it working, but the errors are still there, and when i click play, it even gives me more errors.

pallid roost
#

What versions of you have of:
Vrchat word sdk
Udon#
Unity

pure scarab
#

all of them the newest ones, i just downloaded everything fresh

#

and unity is 2019.4.31f1

pallid roost
#

What are the errors your getting?

#

Screenshot your console scrolled up to the top

torn pendant
#

is there any prefab that let you add picture as a slide?

#

like a powerpoint presentation

near quiver
#

Hi, random question, can anyone tell me how to go about restricting arm and such movement in vrc world stations? The custom animation I have always plays for a second before giving tracking back. I haven't been able to find information on how, so I'm asking around.

magic drift
#

If I wanted to make the players speed
4.317 m/s walking, 5.612 meters/second running, and jump 1 1⁄4 m, what would I need the values to be in VRCWorldSettings?

indigo finch
torn pendant
#

Hi!

so in Udon script graph does anybody know. for every object interaction the animator integer increases by 1?

pallid roost
#

And then the logic to to pass the int to the animator

torn pendant
pallid roost
#

You need an interfer variable, and each time the interact event happens add one to it's value

#

And then provide that int to the value field on the setInterger

pale sentinel
#

Is there a way to play youtube playlists with udon media players?

pallid roost
solar crater
#

Hey!
im trying to attach a script to a button's onclick event but im having issues with it.
What is the best way to accomplish this goal?
I have tried RunProgram but that doesnt seem to work.

loud bridge
arctic scarab
#

how i make toggle for on/off certain object

solar crater
#

but ill look into it

solar crater
river musk
#

Ok so this works on a singular button for points on a scoreboard, but when i hit another button to add more points it erases the original points and replaces with the new amount of points. So instead of having 37 points before the second button, after the second button is pressed it says 17 instead of 54.

proud skiff
#

Hey, i downloaded the VRC Billiard from Github, and when i put it in the scene, i get 138 script compile errors, has anyone else had this problem?

river musk
#

you need UdonSharp to load it

#

if you already have the sdk in

pallid roost
proud skiff
#

ohhhh okayy

#

i dont read

#

I just download it expecting to know what to do with it, like everything else thats successful in my life, lol

loud bridge
spiral spruce
#

is there a way that i can make people not able to respawn

pallid roost
#

You could move the position of the respawn point to the users location so that when they do respawn they don't get anywhere tho?

#

But they're always gonna be able to click the respawn button

pallid roost
#

I've not tried it to be sure, but You could probably just move the vrc world object to the local player in an update event

#

Or just have a recursive event that does it every few seconds

spiral spruce
pallid roost
#

I would but I'm on my phone so I honesty don't want to type out a full explanation. 🤣 It would be a pretty simple script.

  1. Move object to the players position
  2. Have the event call itself again with the custom event delayed by seconds event
faint delta
#

Hopefully a quick question. Is the Udon Start Event run on all clients by default upon entering the world? Or do you need to pull each one from a VRCPlayerAPI array using a For loop?

pallid roost
loud bridge
pallid roost
#

True true. Gotta keep an eye on that for some things.

faint delta
#

TY both

rough mesa
#

can anyone please tell me how to easily create a toggle button in my world that will change the skybox (rotate 3 even?) do i need to use udon to do this or a c# script?

faint delta
#

This may be more of a general VRchat question, but it also relates to Udon. Can a pickup that is held by a player still collide with a trigger in the world while being held, and generate an OnTriggerEnter event? (EDIT: It can, just answered my own question. I had something misconfigured).

pallid roost
rough mesa
pallid roost
# rough mesa can you point me in the direction of a way to learn how to do this?

https://youtu.be/yC9h-51jvBg
Google does wonders 😝

Here's a tutorial on how to make a cool little button that switches the skybox of your scene when clicked. It cycles through a list of skyboxes each time, and I've included how to do this both locally and globally.

This works really well as a day - night toggle, or combine it with some effects to create something truly awesome!

Hope this help...

▶ Play video
scarlet lake
#

How would I go about making a shield that starts off small then grows into a larger one when you toggle it

I'd also like it to shrink when you toggle it again

#

Ideally it's something you would run around with in its small form then trigger it to grow into a large one

pallid roost
#

You could just make an animation for that that either scales it bigger / smaller, or have a blendshape to change the size / shape and make the animation blend between the two.

true ore
#

hey does anyone know why turning the fog on in cyantriggers doesn't work? i can turn on and off the gravity and most other things, but SetFog only works in CyanEmu, not once in vr, not even in a very basic scene. hopefully it's just something extra i have to do with my trigger i haven't thought of yet, and not something deeper that the sdk is preventing.

true ore
#

hmm, in a simple test it looks like if i start with fog on, and have it turned off once we enter the world, then i can turn it back on. i knew some udon stuff had to be on at runtime but didn't realize this was one of them.

mental hamlet
#

My animation is needing to send a custom event.
I have my custom event specified in animations but my Udon behaviour doesn't appear to be receiving the event.

#

This explains everything

elder peak
#

do you use SendCustomEvent? you cannot call the methods directly

#

it does not matter whether the udon behaviour is enabled, so that's not the issue here

mental hamlet
#

Yeah, I have start up firing the event.
Then each of my animations sends the event again that this behaviour catches now.
Seems to work now that I have the script I was using enabled

elder peak
#

what does the animation event look like?

mental hamlet
mental hamlet
#

And also my amazing udon graph wow

opal dew
#

Augh, UdonSharp support for Interfaces when. grumble-grumble

river musk
#

Does anyone know how to sync a single counter to multiple buttons?

coral latch
#

hello guys

#

I seem to be getting

#

200+ errors upon

#

literally having udon in the unity project

#

does anybody know why that could be the case

#

I seem to have the latest files so

#

can't see why such thing would occur

vast sparrow
#

some other assets might be calling for udon sharp not the regular udon check if thats the case

coral latch
#

I also have UdonSharp master

river musk
#

Use the latest release

coral latch
#

I was just looking for a way to add a button to execute a sound that's all

#

could there be any recommendations towards this type of thing

river musk
#

You can use udon by itself for that

coral latch
#

oh I see

#

in that cause I could simply remove udon master

river musk
#

basically

coral latch
#

oh that fixed it

#

lmao

#

thank you

#

I have another question if you don't mind

#

when I play a sound, is there a way to let others also hear that sound

river musk
#

Use SendCustomNetworkEvent

coral latch
#

got it, thanks !

vestal mica
#

Hey i try to make a world camera. What material should i use for the render texture? Right now it dont look hq

prisma bramble
#

how do I make an object move towards the player with udon graph

indigo finch
vestal mica
#

i have unlit :/

#

doesnt look sharp

high mural
vestal mica
#

@high mural i did that also :/. could it be because i use stage lightning?

#

i have those strange artifacts

#

second is without world cam

high mural
#

yeah a camera render texture is never going to have the same fidelity as your actual view. could be something with shaders,, not sure. but that's probably about as good as you're going to get it to look, imo

vestal mica
#

I just saw the camera in ddvr club. there it looks waaay better

high mural
#

my guess would be something to do with shaders then, but idk for sure

vestal mica
#

hmmm i think that too.. but idk

#

but thanks for taking time to help me 🙂

vestal mica
#

how can i turn up my voice? i cant hear the others and they cant hear me well in my world

loud bridge
#

Not sure what you'd need to do to get it to work with the RT camera though.

vestal mica
#

Hmmm okey

loud bridge
#

You might try importing the PostProcess package from the Unity Package manager standard assets and apply a postprocess volume with an anti-alias effect.

past lance
#

Hey there, so I just created a FNaF style door toggle and uploaded it to vrchat, however, there seems to be an issue that when I toggle it closed, it doesn't show that for other players meaning they can just walk straight through it as they see it open. I'm assuming it's something I forgot to tick on a box somewhere but if anyone knows how to help, it would be much obliged

pallid roost
#

It's not as simple as a box. You need to atnc the door state to other users

pallid roost
past lance
#

Ah thank u!

worldly quartz
#

hi! i put too many things on my unity scene and i think something is lagging out the loading is there a way to pause udon so i can laod only the geometry?

past lance
#

Hello there! So about the syncing toggle, could someone explain how to do it to an animation? I tried looking up a video on how to do so but I only get syncing object toggles and not animations. Any help would mean so much to me!

tepid spade
#

Hey my friend has a question and I am also having a question about what my friend's friend is experiencing but he's wanting to know what it means and I don't think he knows if it's a problem or not but I'll get to the point what does unverified player mean?

pallid roost
#

Instead of toggling the door shown / hidden

indigo finch
# vestal mica how can i turn up my voice? i cant hear the others and they cant hear me well in...

This should hopefully help:
https://youtu.be/hCK3oAH7WJg

Here's a tutorial covering the example script 'Set All Players Max Audio Distance', that allows us to change how far we can hear a player's audio. Using this, we can also make it travel less, as well as mute them.

This script seems to have gone through some changes over time though, so do be aware that I change a few things about it in the tut...

▶ Play video
cosmic pike
#

is there a way that I can set ramp steepness for players to still be able to climb? What's the angle across which collisions are interpreted as hitting a wall vs. hitting a ramp?

feral merlin
#

Would anyone be able to help me write a U# script to cycle through game objects using two UI buttons?

#

I have an idea of how the logic could work but no experience in coding

#

My idea is that it's controlled by an integer. Said integer increases by one with the press of a button, or decreases by one with the press of another button. Depending on the current integer value, a specific game object is displayed. I am willing to pay somebody to write this kind of script out.

indigo finch
# feral merlin Would anyone be able to help me write a U# script to cycle through game objects ...

Does it have to be udon#? You can have both udon# and udon graph codes running in the same scene, as they both get translated into udon assembler when uploaded to vrchat.

If udon graph is okay, there is actually an example script that sounds like it does everything you want. It does also have a ui text object on it, that displays the name of the gameobject that is being shown, but if you delete everything i've shown in red, it will get rid of that feature.

feral merlin
#

I'm not entirely sure how to set that up but I'll give it a go

#

Thank you

#

Doesn't seem to work but I probably did it wrong

indigo finch
indigo finch
feral merlin
#

I click my UI button and nothing happens

indigo finch
#

mind showing the modified graph?

feral merlin
#

I didn't change anything aside from removing the one variable you said to delete

indigo finch
#

and that would be it...

#

you also need to delete the group i circled

feral merlin
#

Ahh I see

indigo finch
#

also it's just the nodes, not the lines going though it

feral merlin
#

Still seemingly nothing happening

indigo finch
#

graph pics please

feral merlin
indigo finch
#

btw, if you don't already know, windows key + shift + s allows you to screenshot only part of screen

feral merlin
#

That's what I'm using lol

indigo finch
feral merlin
#

I still have friends that pin snipping tool to their taskbar and I just ask why every time

#

I feel like the program does most likely work though

indigo finch
feral merlin
#

I just set up the button wrong I'm assuming

#

This is my first time working with UI canvases

feral merlin
indigo finch
feral merlin
#

Oh I see

#

There actually appears to be two arrows that aren't connected

#

One just disappeared when I dragged out and let go

#

Looks like this now

indigo finch
#

the bottom one doesn't matter. its having a gap that's the problem

feral merlin
#

Gotcha

indigo finch
feral merlin
#

Should I run a test now?

indigo finch
#

yup

#

your inspectors look right

feral merlin
#

Still not functioning properly...

#

The buttons are definitely registering inputs as the color change occurs when clicked

indigo finch
#

that being said, are you just after changing the colour of an object?

feral merlin
#

Yep, that's how my scene is set up

feral merlin
#

I'm making a VR Pokedex and cycling through various Pokemon using navigation buttons

#

The buttons have color changing set up in their components by default

indigo finch
#

hmm...

indigo finch
feral merlin
#

Alright, thank you so much

indigo finch
pallid roost
#

Anyone had their project not generate a visual studio solution for some reason? normally i just open that to edit all my udon# but it isnt generating for some reason

wind atlas
loud bridge
loud bridge
#

Anyone seen this before? Not really sure where to start with it because there's no context provided at all...

modern wagon
#

all my video players keep breaking and this is a constant error for them, plez help

unborn hornet
ebon musk
#

Is it possible to prevent other players from picking up a pickup once its been picked up?

brave granite
#

alright so can someone help me figure out how to get a particle collision from a player so i can code with it? i know there is the event on player particle collision but i cant seem to do anything with that on its own even if the particle is sending collision messages

#

more specificly i can get a particle if its from the same game object but i want to get a particle emitted by a players avatar

#

or send information to the player itself to teleport it

pallid roost
#

What are you doing that specifically requires particles? As opposed to just normal object collision detection. Just curious what your trying to do.

brave granite
#

i am making a game where i need the player particles form an avatar to do damage to an object

#

i know i can make an object that does this like a gun or something but i want to use the avatars similar to the doom map for pc

ebon musk
# indigo finch this perhaps?

Sorry left out the part where I mean after said person lets go. Like basically only that person can pick the item up after that point until they disconnect. I've changed methods now tho

indigo finch
#

Here's a script for a button to do this with udon graph: https://youtu.be/szetLivbmdc
It will work fine with your player, as it calls the video player component directly, and shouldn't interact with the udon# coding at all. You can also have both udon graph and udon# codes in your scene at the same time, as they both translate to udon assembler anyways

Here's a tutorial covering how to change the url on a vrchat videoplayer with just a button. This is super handy if you want to have a quick instructional video, creating a karaoke world with a bunch of song videos for people to select, or even just a selection of some different background music without having a massive world size

So hopefully ...

▶ Play video
#

no worries. It's a little confusing, but the only thing that makes it an udon# video player, is all the inputs and ui for the video player, not the video player itself ^^

orchid stag
#

Hi!

Apparently I'm too stupid to set player tags. I've tried to do these things:

public Text tx
string t, tv = "hi";

public override void OnPlayerJoined(VRCPlayerApi player){
//player.SetPlayerTag(tv);
//player.SetPlayerTag(t, tv);
//player.SetPlayerTag("hello");

     //tx.text = player.GetPlayerTag(t);

}

But I can't seem to get it to work. What I want, is to assign every player with some tag, and when they enter a teleport trigger, they will be teleported according to what tag they have.

If someone can help me to get to the point, where I can get the player's tag in the Text output field, I'd be grateful 😅

mighty fjord
#

Wait, people actually use player tags? vrcBlush

orchid stag
#

I just found out about that apparent use today, so I have no idea what ppl normally do 😂

fiery yoke
#

Player Tags are actually pretty nice, but they are a bit of a black box and nobody knows if they really are supported or not lol

They are not really mentioned often...

orchid stag
#

Well accoding to this, which was updated 6 months ago, it should work, except
GetPlayersWithTag() 🤔

spare beacon
#

can someone explain what "Auto Fix" button in this case exactly do?

mighty fjord
fiery yoke
spare beacon
orchid stag
#

not sure why you don't have it, I can see, that if I use the component, I have that tick

fiery yoke
spare beacon
#

i'm using the latest SDK3 version on clean unity project

bleak magnet
#

does udon allow unity buttons for resetting objects to a set location still?

#

i made this for 2.0 that allows you to move a light back to a given location

orchid stag
#

You need to use the Udon Interact(), and override that

#

Something like:

public override void Interact() {
SendCustomNetworkEvent(VRC.Udon.Common.Interfaces.NetworkEventTarget.All, "MyFunction");
}

public void MyFunction(){}

vocal sigil
#

What does udon stand for

unborn hornet
#

?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

worldly tapir
#

Unity Doesn't Offer Nanites :(

bleak magnet
strange shale
#

heya
question for anyone who might know
is it possible to make a 2D array of game objects in the udon graph?
was looking for anything that may work like that... even the option of a sort of array within array system but i cannot seem to find a function that would let me do that

basically was trying to set up a grid system for a game and a 2D array would be much preferred to alternative methods >_>

worldly tapir
#

instead of
int[,] myArray
you do
int[][] myArray.
here, every entry of the "top layer" array holds an array of unfixed size, meaning that entry 0 can carry an array of size 6, while entry 1 carries an array of size 2 or whatever you need.

strange shale
worldly tapir
#

Oh I might have to disappoint you, My brain was still in Udon Sharp mode.
I don't think there's any 2D arrays in regular udon yet.

#

but you can always use a 1d array as a 2d array.

strange shale
#

no worries :3

#

a fine fella in another server suggested using an object[] to store GameObject[]s

#

in hindsight its kind of obvious i just kind of forgot that you could put anything in an Object field

#

thanks for the help anyway! :3

worldly tapir
#

That definitely looks like an easy solution! Otherwise, for fancy maths coding magic, you can map the grid onto a single dimension:
e.g. if you want a 8x8 grid, make an array of length 64 (so 8 times 8).
Let's say you have a Width(sizeX)5 and a Depth(sizeY)4:
Make an array of length 20 (aka 4*5 or sizeX*sizeY)
To access the fake 2d array's index (indexX=3, indexY=2), simply go to the "real" array's index of
indexX * sizeY + indexY

strange shale
#

funny enough you are kind of describing what i had though up as a sort of workaround solution x3
would be what i had gone with if i had not found a better solution

#

think the jagged array option will be easier on my brain to work with

#

especially given that i am self taught and there are precious few guides for this stuff

valid oar
#

I'm having a problem where interacting with buttons used to turn on objects are turning off the buttons. This is usually because the program is referencing itself but it doesn't appear to be

#

I'm sure there has to be a better way to do this but it should work.

granite pier
#

Extremely simple script, trying to make a script where I set a target object, and then the object with the script, follows the target at all times, plus an offset.
Currently, this script does nothing, the Sphere does not change its position no matter what target I choose. What am I doing wrong?

granite pier
#

terribly sorry, simply just forgot to put on an update event that activates set position. (I am very much a noob at this)

pallid roost
#

so check on the actual button that you've passed those values in

valid oar
indigo finch
# valid oar I'm having a problem where interacting with buttons used to turn on objects are ...

Everything looks right here. it is probably something to do with the hierarchy (perhaps you deactivating a parent object or something).

That being said, this would be the 'better' way of doing it. it's notably more complicated to script though, but it gives more flexibility. You would have a script on the button itself, that tells the slide manager object, what slide to change it to.

valid oar
#

Nothing is parented to them and some of the buttons seem to to not disappaear even though the only difference is which boxes are ticked but thanks for making a better version, I'll give it a shot! I tried using a material swap prefab but it wasn't working out.

indigo finch
valid oar
#

🙏

sonic ermine
#

Question... in Udon (using UdonSharp) how would one measure how many players are in the bounds of a trigger? I want to enable or disable an object when ALL players, not just the local one, are outside of a trigger. The idea is to change a thing behind the scenes when no one is there to witness it.

#

And ONLY when no one is there to witness it.

#

Specifically I have a system of small things changing randomly when the map loads, with a list of objects to be enabled via a random chance (and all its siblings disabled)

#

So I want to make it so this can run again, not on a timer, but when no one's in a specific area. (Teleported away to another part of the world)

valid oar
#

I'm sure something like that would be possible, I assume by storing the number of people that have entered the instance and then incrementing another variable when a player leaves the trigger zone, if those numbers are equal, then everyone has left the trigger zone. Of course, you'd also need to reduce that number if anyone went back into the trigger zone. I guess what I'm not sure about is how is checking that everyone is outside of a trigger functionally any different than checking if anyone is in the trigger? Because that seems like it would be easier to work with.