#udon-general

59 messages · Page 85 of 1

slate orchid
#

noddle's

weak violet
#

And a noddle is..

slate orchid
#

i have an event that makes it blow up all readfy

#

ready

mossy crane
#

noooodles

slate orchid
#

😵‍💫

mossy crane
#

let me see the blow up event

slate orchid
#

i have not done the health part cus everything is a mess my stuff is in graphs i cann read but my friend has done alot and its in udon# so i do not get it

mossy crane
#

then you can test the setup by triggering the blow up event instead of a decrease health event

slate orchid
mossy crane
#

just change the string name to whatever your blow up is

slate orchid
#

oki

#

it's not working

#

@mossy crane can i do two udon behaviors

mossy crane
#

on the same gameobject?

slate orchid
#

yea....

mossy crane
#

never tried it, dont see why not, but also dont see why you cant put it on a child if needed

slate orchid
#

this should work right

mossy crane
#

your toggle event seems deleted

#

the name

slate orchid
#

o shit that might be why it is not working

#

@mossy crane it's still not working

mossy crane
#

what does your cube have on it in the inspector

slate orchid
mossy crane
#

and whats bullet got

slate orchid
#

gameobject has our udon graph we made

#

other one is my friends script

mossy crane
#

you need a collider

#

on the bullet

#

that hits the cubes collider

slate orchid
#

@mossy crane do i need to set it to is trigger

slate orchid
#

R there any videos on vrchat game world making

#

Like combat system and stuff

#

The only thing I can find a like Dev streams

slate orchid
#

Wym sry

blazing hedge
#

How do I set a Directional light that only affect the users that join the world?

cold raft
#

shees, what surfaces get affect by what light is kinda a shader thing i think. some shader are set to unaffected by light

brazen epoch
#

If you want a directional light to only affect players, you have to set it so that the Player and PlayerLocal layers are checked in the culling mask of the light source. The light source also cannot be baked for those layers. Those layers have to be realtime

wooden rampart
#

can u change ur username in vrchat?

modest rapids
#

how do i do the avatars, if anyone has a screen shot or anything please help

livid berry
#

I’m not sure if this is the right chat for this.. but
I can’t find out how to import downloaded models in vrchat..

modest rapids
livid berry
#

I’m having a stroke reading that but like; the question is: how do I import downloaded models into vrchat?

modest rapids
#

i know how to import models into vrchat otherwise why would i need to attach then to udon in a world

livid berry
#

That’s cool how you know but, it’s my own question

#

How the hell

#

Do I import models

#

That’s not like, a response

#

I’m just stupid

#

Okay lemme say it like this;
I wasn’t exactly responding to you, I just need help, myself

indigo finch
#

If your just after effects, you will want to play an animation. Here's a quick tutorial on that. The only difference would be instead of it playing an animation 'on interact', you instead want it to play 'on pickup use down'
https://youtu.be/M7pN8QYTGBQ

If your want logic to the gun, then you can really go down a rabbit hole. I would probably just make an invisible particle system with collision, and then anything it hits have a 'on particle collision' (its called that or something similar) to detect if it got hit. At least for something basic

Here's a tutorial on how to make an animation play when you click an object. This particular example covers firing a trigger on an animator, but hopefully this covers enough to help those wanting to change a int/ float/ bool on an animator as well.

So hopefully this is helpful. As always, if you have any questions, feel free to ask in the comme...

▶ Play video
blazing hedge
#

How to make player sit on chair and exit automatically

cold raft
#

ropes i guess

blazing hedge
wind atlas
visual elm
#

i'm having trouble with unable to move after leaving the Laying Down position

slate orchid
#

Are there any udon videos on combat system

visual elm
#

i did

#

after standing up, i can't move

#

i'm doing it for my world that has beach towls to lay down on

feral merlin
#

Does anyone know how to make a flight system where you can just continually jump forever?

visual elm
#

oh heyo Davilos

feral merlin
#

So does anyone know how to make a program that allows the player to jump indefinitely, even if not grounded?

lusty whale
#

can someone tell me why the objects position isnt being changed?
the object is spawned correctly, but it spawns at 0, 0, 0, and isn't moved to the specified location

glacial estuary
#

Can you get the parameter from a different udon script and write that value to this script?

lusty whale
#

which parameter? the position in the set position block?

visual elm
#

apparently, unchecking seated causes not to be in sitting down position, as i wanted to be, and when standing up, my character is literaly immobolized, can't move whatsoever

glacial estuary
lusty whale
#

im not sure i understand what you mean

#

i just opened udon for the first time and im just trying to make a button that spawns an object at a position

glacial estuary
#

original build was trying to change sources of a position constraint dynamically, this one i'm trying to change the object that the script reads animator values from since IDK how to read udon script parameter values

lusty whale
#

oh wait

#

ok there has been a major misunderstanding

#

your wording made me think you were trying to help me with my problem

indigo finch
# glacial estuary Can you get the parameter from a different udon script and write that value to t...

Here's a short tutorial covering how to get a program variable from another script. Something to note, is that the variable you wish to get needs to be a public variable for other scripts to be able to see it. Also, I didn't show it as I never put my script on a game object, but you would have to fill out the public udon variable when you go and...

▶ Play video
#

To set it, just do set program variable

glacial estuary
#

ah thanks

lusty whale
#

should i look into this "object pool" thing instead of instantiation

glacial estuary
indigo finch
#

Here's a simple tutorial showing how to get a bool and string from a different udon sharp script! The process is fairly straight forward if you call it by the class name, but the little detail of defining the variable type for an undefined udon script can throw people off (it sure did for me!).

Something to note: In general, it's recommended th...

▶ Play video
glacial estuary
#

thankya much

indigo finch
#

^^

blissful shore
#

does anyone have insight into Audiolinks?

#

im having an issue with these pngs/set to FADE

indigo finch
vestal mist
#

is there a way to set up 3dmodel to do Animations like a Character model to dance in the world

#

like if there where A vrchat avatar in the world how would i make it dance

tired orbit
#

I just want to detect how hard someone is pulling the trigger

sweet dock
#

Anybody have a good tutorial link for making cars move through a city while an avatar is sitting in it? Not driving but just sitting in it as it moves through the world?

mossy crane
#

How are you supposed to use this to get the forward of a objects vector 3?

#

transform.forward is world space, but i need the local forward

#

seems to work

mossy crane
#

Is there a special trick to rendering a debug raycast line in Vrchat? nothing seems to work but I have a Debug.Log saying Hit! if a raycast is valid but never see the draw

grand temple
#

debug lines only work in editor

mossy crane
#

ahhhh thank you, is that testable OnPickupUseDown with cyanemu?

grand temple
#

yes

#

only in scene view too, not game view

indigo stream
#

gizmos work in both scene and game view

mossy crane
#

Ah thank you now it works, can you help me tune my direction the raycast is firing?

#

Global direction

#

Local

indigo stream
#

what is the ray doing currently?

mossy crane
#

only works in the Z axis it looks like

#

when the gun is pointing at it

#

behind the cube its shooting into me cuz im downward Z

#

otherside its shooting strait down Z

#

need to be relative Z

grand temple
# mossy crane

get rid of the inversetransform. plug the forward directly into the raycast

mossy crane
#

The yellow lines are the rays

#

seems random not based on its Z axis

#

axis*

grand temple
#

spawnloc position and spawnloc forward should work, make sure it's compiling

mossy crane
#

_<

#

it reset spawnloc ref

#

to itself

#

Incredible lol

#

thank you!

mossy crane
#

Whats the best way to scale a custom capsule collider to a players avatar? For a basic hitbox

#

it already can track their location

lusty whale
#

i cant find any information on object pools

#

im still trying to figure out my problem from yesterday and someone told me to look into object pools instead of instantiation, but i cant find anything on the udon documentation for it

#

for reference im just trying to make a button that spawns a ball at a specified location

lusty whale
#

ok looking into unity object pooling in general unity instead of specifically vrchat stuff

#

this isnt even what i want

#

i dont want a pre defined amount of these things

#

i just want the button to spawn a new one every time its clicked

#

do i still use object pooling then

thorn folio
#

How do I remap values with nodes in udon?
Like I have a slider that goes from 1 to 10 and I want it to go from 10 to 1.

indigo finch
thorn folio
#

Yeah I know about that but the problem is that im changing two different things with the same slider but one of them needs to go the otherway

indigo finch
#

Oh, then it's just a simple math problem:
Slider max value - current value

thorn folio
#

the issue with that is it never goes to 10 and it also goes under 1
Like if I set it to 10 it will be 0 since 10-10 is 0

#

but the inbetween numbers are good

indigo finch
thorn folio
#

Now the opposite the inbetween numbers are wrong but the 1 and 10 are good

fiery yoke
#

There is a very elegant method using Lerp and InverseLerp that I would recommend:

    float inValue;
    float normal = Mathf.InverseLerp(inLow, inHigh, inValue);
    float outValue = Mathf.Lerp(outLow, outHigh, normal);
indigo finch
#

10 - 10 + 1 = 1
10 - 9 + 1 = 2
10 - 8 +1 = 3
10 - 7 +1 = 4
Etc...

indigo finch
vestal mist
#

Are there any Music players That have Ui In them

#

If so link them to me Please

#

im trying to get rid of the shuffle one i have currently

vestal mist
#

Assets!M.O.O.N\JoinNotificationSystem\Scripts\HudHandler.cs(51,31): error CS1061: 'AudioSource' does not contain a definition for 'clip' and no accessible extension method 'clip' accepting a first argument of type 'AudioSource' could be found (are you missing a using directive or an assembly reference?) i have 77 errors with all audio stuff how can i fix this

glacial estuary
#

Can textmeshpro text be altered with Udon/sharp? if so, can text scale be as well?
I have a pool of names I'm trying to pull from randomly, and assign to a text field

hoary echo
#

Are there any known issues with video players currently?

long lark
#

Pokeballer_1 is the audio source where should it fit in?

blissful vapor
#

how would i make a PVP system in udon? (toly's combat system is broken)

mossy crane
#

Does network event flow to the next thing instantly, or does it wait till the network event is fired on all clients

mossy crane
#

ty

mossy crane
#

Very loaded question due to all the systems that need to come together. Can look into Raycasts for hit detection, Object Pooling for assigning custom hitboxes to all players and storing variables in them to react to different rays

blissful vapor
#

thanks

scarlet lake
#

on you video I have a ui button and i made it say mirror hq and mirror lq i follow the sets but can not upload it. can you please help me

small magnet
#

hm hey we can ask questions here right

#

if we can i just have one question

indigo finch
small magnet
#

ah no i need help with something else

indigo finch
#

kk

scarlet lake
#

how do you make a off mirror in the ui sharp

shy crypt
#

Is there such things as scene variables you can do with Udon? I'm trying to get multiple Udon scripts to have shared variables, I now in unity you could assign scene variables but I don't know if they are supported with Udon.

elder peak
shy crypt
elder peak
vestal mist
#

is there a way to see World Size While in unity i hope there's a Udon Scripts for this

elder peak
visual elm
#

does anyone have a formula setup for a sound that plays ever 6 seconds, like a small spark? i tried from animator, but it did not work

visual elm
#

i don't know if this is correct

vast locust
#

Is it possible to force players gravity into a sphere so people can stand like this on a round object?

mighty fjord
#

Not easily, but possible through stations

visual elm
#

well, my method didn't work, i want the sound to rewind again and play the sound again each 6 seconds

visual elm
#

somehow i figured it out! i can use the animation for it

vestal mist
#

how to can i set up a icon on owner head for other people to see

#

for the instance

formal kindle
scarlet lake
#

how do you make a off mirror in the ui sharp

scarlet lake
#

Can someone help me and teach me how to turn off a mirror with udon sharp

indigo wagon
#

Is there a way to get a player's avatar ID

Becase I want to make an NPC system where diolouge changes depending on avatar

Like if in 1 avatar say something like "hey Franky is that you?"

But if your in a random one it will say
"Who are you? don't seem like a gool I've seen before..."

fiery yoke
indigo wagon
#

Sad, IG that means I'm gunna have to deal with it being linked to avatar pedistols then

fiery yoke
#

Well dont give up too early

#

you can still identify avatars

#

More or less

indigo wagon
keen crystal
#

Would also like to know that, i have a world where i want to allow a set of players to open certain doors, and afaik you can‘t just hardcode a list of usernames to use for that

fiery yoke
#

Something that all (humanoid) avatars have, is bones. Bones (or more accurately joins, but they are called bones, Unity is not always good at naming things) have a constant distance from one another. You can create a "map" for all of these distances and identify avatars based on meta information like this.

#

It doesnt work for avatars that use the same base i.e. skeleton/armature ofcourse

indigo wagon
#

Are you able to acsess the skeleton like that?
If so I can just add flag bones

fiery yoke
#

You can only access Unitys "Humanoid Bones"

indigo wagon
#

Thaught all you got was hand and head pos

keen crystal
#

You could run ml algos to detect how players move and create gaze profiles, not overengineered or creepy at all 😄

indigo wagon
fiery yoke
fiery yoke
indigo wagon
keen crystal
#

Interesting, so you could add a hidden bone to avatars and those would be detected

fiery yoke
#

No

keen crystal
#

Oh, right

keen crystal
fiery yoke
# keen crystal Is that considered bad practise? I cant think of a better solution

Well its called displayName for a reason (probably). Its not really meant for identifying users uniquely, but only for displaying purposes (like a score or something)

Also Im not a spokes person for VRChat, so takes this with a grain of salt, but as far as I know its generally considered "bad practice" to target specific users, both positively and negatively.

There is edge cases, like administrative powers, moderation, etc. but in general no user should be considered "special". It creates a social unbalance and is generally more harmful than good.
But ofcourse there is always exceptions to that rule. For example there is people who do performances for theatrics in VRChat and require special abilities to do the performance. So obviously that is a good example where its nessecary. But you dont want to give your friends VIP access to something, while everyone else doesnt have that. Its sort of a core principal of a fair social platform. But again. Just my opinion. I dont think VRChat has said anything about "giving friends or supporters special things", but they have said that "automated moderation targeting specific users" is against their Guidelines.

keen crystal
#

Fair point, though my use case is a recreation of a real club and i want the people who work there to be able to unlock the doors, since in real life the guests dont have keys either. So it would be part of the social experience that you have to ask someone to open the door, turn on lights and music 😄

fiery yoke
# keen crystal Fair point, though my use case is a recreation of a real club and i want the peo...

Yeah in that case I think thats a "fair use" kinda thing. As long as youre not abusing it to create a generally unfair or unfun situation for other people its fine I suppose.
But be aware that it might get broken, changed or removed at any point. I dont think that is going to happen, but whenever you do something in a way that isnt officially supported then you have a "use at your own risk" kinda thing

keen crystal
#

Gotcha, yeah i solved it with keypads and passwords for now, but having it work without having to remember a combination would be perfect

#

Thanks for the help, you really are true to your name 😌

scarlet lake
#

Can someone help me and teach me how to turn off a mirror with udon sharp

terse solstice
#

i want to use the "player.getBonePosition" thing... there is any chance of ppl use a avatar taht dotn have a head bone?

grand temple
# scarlet lake Can someone help me and teach me how to turn off a mirror with udon sharp

The second part of this covers U# https://www.youtube.com/watch?v=ibDu0dCeUE8

With the recent Udon updates, some of the basics have changed, so here's my most basic tutorial redone with the new editor, and not recorded at 2am! If I get enough requests, I'll redo my "Contextual Buttons" video as well, which will give me an excuse to just rename them "Event Buttons" which actually makes sense.

00:00 - Intro
00:20 - Udon Gr...

▶ Play video
grand temple
terse solstice
#

i see

#

i have been trying to make a 2D sprite of my characters animated, i have no skills with 3d so im trying to make make it 2d.
sadly it turns the characters into cardboard that disappear on the sides.
im trying to make a billboarding effect where the the sprite is always facing the head of the player to compensate it

#

im having some problems to make it work

#

pretty new on udon but i know a bit of code and unity

#

on my other non vrchat related projects i made it liek this

#

public Camera theCam;
void Start()
{
theCam = Camera.main;
}

void LateUpdate()
{
    transform.LookAt(theCam.transform);
}
#

using the camera transform

grand temple
#

get trackingdata, not bone position

terse solstice
#

hmm

grand temple
#

bone position can be slightly different from the camera. Tracking data is the camera directly, whether the avatar has that bone or not

terse solstice
#

i see

#

is the this_sprite->get transform part correct?

grand temple
#

it is correct but it's not necessary

#

anywhere that the node graph has a slot for transform, gameobject, or udonbehaviour, you can leave blank and it will self-reference

terse solstice
#

i see

terse solstice
#

yeah

#

i cant see why this isnt working

#

strange enought, cosding the thing with a direct C code also dont work

#

maybe soemthing is preventing the object from changing the transform?

indigo wagon
#

How do I do an on respawn event in U#

wanton palm
#

Does anyone know how to get the instance master?

#

Something like Networking.GetInstanceMaster()

indigo wagon
#

does U# support me calling the "OnPlayerRespawn" void on start

#

i mean testiong works

pallid fractal
#

Is there a way to Determine HOW people join a world, Wether from a spawned portal, or a stationary portal in another world, or from the world select screen?

pallid fractal
#

thought so, but i figured id ask. thanks 🙂

unique remnant
#

how would i make a script where every time the player hits the ground from a jump they gain forward velocity

#

also make it so that you can autojump by holding the button down

#

?

#

hello

brave meadow
#

Does anyone know how to make it where if players enter your world's water, it causes them to float/swim?

#

I saw some water-themed vrchat worlds be able to do that and couldn't find any good tutorials so far on how to replicate that effect. I'd like to make it so they float within the area of the water, and have the ability to move between the different depths much like how you would irl

broken bear
#

Pickup.IsHeld seems only to be accurate for local player holding. if the remote player is holding a pickup object, it's returning false for me. but if I hold it, it's returning true

#

If I initiate a ResetPickup event, and the remote player is holding the pickup, this returns IsHeld false and initiates the position/rotation change, and of course bugs out to the remote player. If I hold the object and initiate the event, IsHeld returns true and ends appropritately

unique remnant
#

how would i make a script where every time the player hits the ground from a jump they gain forward velocity and also make it so that you can autojump by holding the button down

wind atlas
wind atlas
#

Maybe there are assets that can make your life easier though.

vestal mist
#

so i use protv music player and i wanna make the playlist bigger with more rows of music have 3 columns

blissful vapor
#

how to fix these?

blissful vapor
unique remnant
unique remnant
wind atlas
blissful vapor
#

a screenshot of my problem, what do i do?

unique remnant
wind atlas
mossy crane
#

Is there a Udon equivalent of sending a raycast but only return true on 1 layer and ignore/pass through the other 30?

wind atlas
#

This might work, not tested though:

scarlet lake
#

Does anyone know how to toggle of a mirror on and off if the other mirror you looking at is on? Example if he mirror is on and you click the link on the off the low and he both turn off. And the opposite too. I using udon and udon sharp

vapid current
#

Is it possible to make a shader only render around player positions to a certain radius?

#

I can't figure out how I would pass Udon behavior or player locations to the material/shader

cold raft
#

posiable yes, like iv seen shaders do that, you only get to see the player when your near them, or shaders that change color depending on your distrance from them
but this is relative to the distance between the viewer and the player you see, i dont really react to other players, yet iv seen shaders do things when thier model intersected with other players

#

shader dont know anything about udon tho, its all shader language

#

and i cant help you write a shader. thats way above my skillz

wind atlas
terse solstice
#

how do i force change a object position?

#

im trying to fidn a way to change the transform component when i pull a leaver but i cant find it

vapid current
indigo wagon
#

Add a 5 to 10 second delay before it's called

Remember something about cooldown for pressing play on video players

#

Idk the prefab your useing

#

I usually make my own prefabs

wintry atlas
#

ah, i’m using usharp 0.3.0

fallen ember
#

Would it be possible with udon to detect when a player is calibrating and spawn a mirror in front of them?

lament ether
#

Would anyone know how to link AudioLink to USharpVideo by Merlin?

unique remnant
#

how do i bring up the code window

unborn hornet
#

Ingame?

wind atlas
# vapid current I’ve got a grid on the floor of my world, but I only want to render it around th...

So it's like a platform that's invisible outside of the immediate vicinity of the player? I mean yeah, you could have a disk following the player while they actually stand on an invisible platform. Shader are very powerful, you could make a render texture to capture the player position using cameras and display a texture based on that. Not sure how well that works with slopes though. Maybe it's better to make some kind of intersection shader that follows the player and draws the texture on whatever it intersects with.

unique remnant
wind atlas
#

Someone with more shader experience might know more though.

wind atlas
unique remnant
wind atlas
vapid current
#

Intersection would be genius actually yeah, I'll look into that. Thank you!

wind atlas
unique remnant
# wind atlas

so in there i just drag blocks into it and link them together and boom?

wind atlas
unique remnant
#

where do i find that script

#

oh nvm found it

#

yeah ima need a tutorial because idk what i'm doing

#

there is no setvelocity or isplayergrounded anywhere

#

@wind atlas

sweet dock
#

if anyone knows how i can add animations to the cars or has links to a tutorial let me know please!

wind atlas
# unique remnant there is no setvelocity or isplayergrounded anywhere

You might not be able to do what you are planning to if you are just starting out.
Start with this, or other tutorials on youtube: https://www.youtube.com/watch?v=8gXzBTqlP6I&list=PLe9XHNvXcouQjg5GULWGLj1tMzeythnQi

Learn how to get set up to create Udon-powered Worlds in VRChat.

  1. Visit https://vrchat.com/home/download.
  2. Create a VRChat Account if you don't have one yet.
  3. Download SDK.
  4. Install Unity Hub and current VRChat-compatible version if you don't have them yet. Check the Android Support box when installing Unity so you can make Quest-compat...
▶ Play video
indigo finch
# sweet dock if anyone knows how i can add animations to the cars or has links to a tutorial ...

Here's a tutorial on how to make an animation play when you click an object. This particular example covers firing a trigger on an animator, but hopefully this covers enough to help those wanting to change a int/ float/ bool on an animator as well.

So hopefully this is helpful. As always, if you have any questions, feel free to ask in the comme...

▶ Play video
wind atlas
#

No, loading remote images is not officially supported. Pretty sure the video player is the only thing capable of accessing the web.

broken bear
#

so using SendCustomEventDelayedSeconds, what's the best way to interupt the event?

clever bone
#

How do I set the Mirror to 0 in a world so it isn't automatically on when someone Joins?

wind atlas
#

I feel like interrupting delayed events might be a bit of a code smell though. Can you describe in what kind of situation you want to interrupt a delayed event?

broken bear
#

I'm tryign to run an idle-pickup reset. was using a transform checker and it seemed fine, using a check to see if it moved since drop, but experiencing an issue unrelated, ondrop is apparently being called twice for me, narrowing that down now

#

alright I think I got it working, just was my setup: edit, nope

wind atlas
unborn hornet
broken bear
#

I was getting wierd behaviors recursively calling, each delayed event acted like it's own thread, I had an exit but it was wierd in editor-emu. like with multiple delay events going, on a 5 second delay loop, I would get updates of values occasionally on :0 then immediately on :1, instead of on the 5s of the event. I'll come back to it

unborn hornet
#

Did you double check in B&T?

broken bear
#

not yet, disconnected the events for now, but I plan to do a detail log setup this week

#

Lets say the idle pickup reset was 10 seconds, I ran OnDrop, stored transform then pointed to a delayed event to run a check of change of transform. Ran into the issue of drop object (Transform 1), then at like 8 seconds, pickup/drop object again (Transform 2). at the 10 second mark the delay event ran and Transform 2 = current transform so it considered it idle, meaning you get the behavior of droping an object and it immediately respawning, rather than run a fresh 10 second check.

#

So I instead I split it up into chunks, advanced an integer that had to have the stored transform and transform at reset stay the same 3 times, and if so, then reset. Edit: I actually should store 3 transforms, one for each check, and make sure all of them equal the same each time.

#

Using recursion to the delayed event to incriment each time, That's where I got the wierd behavior, the delayed event should have been consistently timed, but it would run normal, then one second immediately after, etc.

#

I'll probibly duplicate the function and have each chunk be its own thing, and if it gets wierd then I'll post the code

unborn hornet
#

Right, so you were using the idea of a one-off delay for checking the respawn conditions.
I'm talking about having a constantly looping (as in at the end of the event, it then sends a custom delayed event of itself again) that checks against a target timestamp.
anytime the event runs, the timestamp would update to cachedTime = currentSeconds + delay if pickup isHeld or OnDrop. Then, while it is dropped, the loop continues to check (maybe like once every second or whatever) until currentSeconds > cachedTime, which then triggers respawn.

I might write it like this in U#

public float respawnDelay = 10f;
private bool skipRespawn = true;
private float cachedTime;
private bool isOwner = false;
void Start() {
    isOwner = Networking.isMaster;
    _RespawnLoop();
}
new void OnOwnershipTransfer(VRCPlayerApi player) {
    isOwner = Networking.LocalPlayer == player;
}
public void OnDrop() {
    cachedTime = Time.realTimeSinceStartup + respawnDelay; // or maybe some networking time idk...
    skipRespawn = false;
}
public void OnPickup() {
    skipRespawn = true;
}
public void _RespawnLoop() {
    if (skipRespawn) { }
    else if (isOwner) {
        if (Time.realTimeSinceStartup > cachedTime) {
            // Do respawn action here
            skipRespawn = true;
        }
    }
    SendCustomEventDelayedSeconds(nameof(_RespawnLoop), 1f);
}
#

The skip respawn is a culling bool for when the cached time has already been passed and respawn already happened, or if the user currently has the object picked up.

broken bear
#

hmm, I was doing transforms because of object ownership, if someone else picksup the object I don't run OnPIckup, so I think in this example skipRespawn should be synched and we play with ownership, but yhea this could work

unborn hornet
#

I think you could get away with just having an additional check of Networking.IsOwner(gameObject) for the respawn action part and it'd be fine.

broken bear
#

right since the programming would follow the owner

unborn hornet
#

Yeah

#

Hmmm...

#

There, a more optimized owner check.

fierce verge
#

Why doesnt this work?

fierce verge
#

when a late player joins it doesnt see the Swing function at all

broken bear
#

Speed doesn’t seem to be set on update mode but it’s being set for the remote player, just noting. Is Mode set as synched?

#

Also need to make sure the player setting the value of Mode on the Swing event is owner, have them take ownership of the object with this udon behavior

fierce verge
#

speed and mode are set to synced

#

how do I make the player owner?

#

only the world master can use Swing

#

do I still need to make it the owner?

broken bear
#

Under the networking nodes, set owner, pass local player as well under the networking nodes

#

On whatever is calling the Swing event you do a master check there so it’s only called by the master

fierce verge
#

only the world master can access the button

fierce verge
night viper
#

Your animator instance is empty on the "speed" parameter. So your script probably crashes for "not set to an instance of an object"

fierce verge
#

hmmmm let me test that

fierce verge
mossy crane
#

@fierce verge is your behavior set to manual in the inspector?

#

Also can add a debug log node right after deserialize and check the console on non local clients to see if they got the log

fierce verge
#

FML been looking why it doesnt work for soo long

mossy crane
#

Manual only matters on things you call Request serial on

fierce verge
#

hmmm it works now, so thanks I guess xD

mossy crane
#

Lol perfect

vestal mist
#

anyone has a music player that works with local music in your pc but comes with ui to switch music

dire holly
#

How do I enable legecy locomotion, aka Stutterstep

fierce jackal
#

is there someone who could help me change my Udon Graph to change which animator controller is active on an object by which button i press?

wanton palm
#

What would be the right way to go about syncing UI toggles for new joiners and other people in the map? Right now I have a bunch of UI toggles but they're all local and I'd like them synced

fierce jackal
#

that is what i used

wanton palm
#

yeah I saw that one earlier but that was before synced variables were a thing so I'm guessing the right way to do networking now is with them but not sure how

fierce jackal
#

i used his newest video to do the button then just added the sync parts

mossy crane
#

How would 1 send accurate raycast for a non VR player? Is it ScreenToPointRay?

#

instead of the slight orientation that happends when a desktop player grabs a pickup

#

if using z axis

#

Or how would I reference the players camera

#

^ answered. Cant access camera but you can get head pos and rotation to simulate

fierce jackal
#

is there anyone out there capable of helping me change my Udon graph so that it changes which animation is active on my lighting objects? i will literally pay for some help

broken bear
#

You want to swap the controller itself, or sync animation parameters to drive states

teal crown
#

So I'm very new but I have to start somewhere. Do I need to know UDON to play with shaders and texturing effects?

fierce jackal
#

My graph already syncs their state to new player joining but I need the buttons I made on my virtual midi controller to change which animator controller is on the lasers and lights so I can animate different pans, tilts, angles, and speeds and control lighting live https://youtu.be/hVtlyRR69sg

Lasers and lighting all move now. Started a virtual midi controller. Once I can figure out how to make my buttons change the active animator controller of the lighting objects and can make more buttons do different things to the lights and lasers

▶ Play video
#

my buttons now only control ON/OFF of the lasers and beam lights I want to animate more motions and set them to other buttons on that controller I made

broken bear
#

Can you show the graph you have now for a swap if the enabled state of the components ? Are the two animator components on the same gameobject ?

fierce jackal
#

I havent made a new one yet because I didnt know how to continue one sec lemme boot it

broken bear
#

I think if you go get gameobject- transform - get parent - get gameobject - get components in children type animator - it gives you an index Int to target the first, second, third etc component found. You can use that to find both components and enable/disable them separately that way

fierce jackal
broken bear
#

It searches the parent game objects then children, index 0 is first found, 1 is second found etc

fierce jackal
#

ive just been following tutorials i barely know what i am doing lol

#

ive figured out everything but this part

broken bear
#

Ah I can’t graph until this evening but what I described may help someone show you in the mean time

fierce jackal
#

the controllers are components on an object? it would need to disable the active animation and start the new one

#

Mind if I DM and oyu hit me up when youre free? Will pay you for your time

broken bear
#

Two animator variables, on start find the components through the parent/child component search and assign the two animators, then just use them later for enabling/disabling their components

fierce jackal
#

hah ya i barely understand that ive followed a tutorial to even setup the graph i do have

broken bear
#

Active animation or the animator controller themselves ? If it’s just animation swap that’s an easier thing

fierce jackal
#

i want ot change the animation which approach is best?

#

can i do a bunch of animations under one controller and change between those?

broken bear
#

Seems it would be more straight forward to program the animation controller to look for a variable and run different animations depending on that variable

fierce jackal
#

ok well lmk if you can help later through discord video or somethign i learn really quickly

broken bear
#

There should be examples on synching animator parameter, you send string to the animator and the value and in the animation controller you set the conditions based on that variable

fierce jackal
#

ya like i said that's mostly foreign to me if someone can just show me i understand better by seeing it actually work

broken bear
#

Sure it’s fine. Go ahead and build the animations and it’s a straight forward thing to set one set or another set running

fierce jackal
#

so make different controllers or make more animations under each controller?

broken bear
#

Well under the same controller for now

#

Look for an animation sync tutorial, it should go through the basic animation controller layer to look for a variable and to send that variable to the controller through udon

fierce jackal
#

ok ill keep digging some stuff was similar but couldnt find anything close enough to try it myself

#

that has 2 animations now then right?

broken bear
#

Yes

#

Now what you have selected is that single light game object if you build animations off the parent you can animate multiple lights at once

fierce jackal
#

every other light is currently same controller

#

they work opposites

broken bear
#

But it may be harder to add more lights done the line, ok if they’re the same then animate off the light itself

fierce jackal
#

ya there's 8 lasers each side 4 do one thing other 4 do another

#

maybe i should do the new animations on the parent tho then

#

because these new ones i want to affect all them both sides

#

no that wouldnt work because they wont move on same axis

#

i could separate left and right side into groups i guess and then do that on parent

royal gazelle
#

Are there any specific phrases I should be using to search for tutorials on sequencing animations? I have multiple objects I want to animate in specific orders based on the states of other objects, but I'm having difficulty finding examples and resources in my own searching.

#

e.g. If a door is shut, I want to open it and then extend a walkway. If the walkway is already extended, I want to retract it then close the door. I don't know how to set up the dependency correctly so it'll delay the launch of an animation until the first object to move reaches a specific state.

wind atlas
royal gazelle
wind atlas
#

So hierarchy is also important, make your door and walkaway a child of the animator.

#

If you need to animate a lot of objects and making them children isn't possible, then you have to look into timeline.

#

Timeline is kinda like an animator but a bit different, it works on the whole scene.

royal gazelle
#

Or is this a different function/setting that I just haven't seen in the inspector or animator window?

#

I'll start looking into timeline as well, it sounds like that may be the intended solution for what I'm trying to do

wind atlas
royal gazelle
#

I meant in the sense that if I create a 3D object and make it a door, I would create an animator by adding a component to the 3D object, with a controller corresponding to that object instance.

#

Is it possible to make an animator that isn't tied to an object? Because all of the animations are stored to the controller which I thought could only associate with one object at a time?

#

Or can you have a controller serve multiple objects?

wind atlas
#

For example, in the animation, this will be the path saved:

royal gazelle
#

I don't think I'm following. If I try to group multiple objects to the same controller and perform a transform animation, it'll perform the same transformation on all objects tied to it.

#

But if I want the different objects to move in different ways, I can't differentiate that within the same animation.

#

Okay, I think I see it now. I would have to place the animator component on a parent object. And if one doesn't exist, I'd need to create one to manage the animations between them.

#

I'll try tinkering with this a little later. Thanks for the help.

wind atlas
royal gazelle
#

I'll check back in here later when I have a chance to work on the animation timing in my scene. Thanks again 🙂

scarlet lake
#

A prefab Udon that allows you to freeze the player if he presses a button?

sharp echo
#

why can't i change a variable on an instanced object with U#
System.ArgumentException: Generic argument must be a valid type

newCheese.GetComponent<Cheese>().manager = manager;```
fiery yoke
fiery yoke
#

By default Unity does it automatically when you re-focus the window

#

The little "loading circle"

sharp echo
#

i'm not sure what i'm doing wrong then

#

i tried restarting unity as well

cedar iron
#

how do you force stop a udon graph script?

wind atlas
wind atlas
sharp echo
cedar iron
wind atlas
wind atlas
royal gazelle
cedar iron
#

i was thinking on setting up a branch to check for a boolean. It triggers true if they're in a specific room already

wind atlas
cedar iron
wind atlas
cedar iron
#

ok, so if the button is pressed, i change whatever the teleportpoint variable is bound in the behavior to the "credits" room?

sharp echo
# wind atlas What even is `Cheese` in your context? Can you post a screenshot of that class?
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;

[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class Cheese : UdonSharpBehaviour
{
    public GameObject manager;
    public RatController manager_script;

    public int id = 0;

    float timer = 0;
    void Start()
    {
        
        manager_script = manager.GetComponent<RatController>();
      
        id = manager_script.target_id + 1;
        manager_script.target_id = id;
        manager_script.target = true;
       
    }

    public void Update() {
        gameObject.transform.position = new Vector3(0, 0, 0);
        timer += Time.deltaTime;
        if (manager_script.target_id == id)
        {
            manager_script.target_pos = transform.position;
            if (timer > 10f)
                manager_script.target_id = 0;
        }
        
        if (timer > 10f)
        {
            manager_script.target = false;
            Destroy(gameObject);
        }

    }
}
wind atlas
wind atlas
sharp echo
#

yup

wind atlas
#

Does it fail at runtime?

#

Or when you compile, actually?

sharp echo
#

compile

wind atlas
sharp echo
#

i can't do that right now (not at my pc rn give me like half an hour and i can do that) but i tried clicking the compile all udon scripts thing on the udon component

wind atlas
sharp echo
blazing hedge
sharp echo
mossy crane
#

Does everything self reference if left blank or only some things in Udon graphs?

#

Like if this gameobject with the udonbehavior also has a Animator i dont have to reference it

fiery yoke
mossy crane
#

K i have this, and it no longer is crashing, the graph plays all the way, but my animation transitions arent firing

indigo wagon
#

I've never needed to call custom function from U#

#

this how I do it?

#

made void public and it is working

elder peak
indigo wagon
#

All it does is disable the info board from a UI button

elder peak
indigo wagon
robust bramble
#

You think it’s possible to make a Mario party world with a board and mini games and coins/stars?

#

Would be an insane amount of work but would be awesome

indigo wagon
indigo finch
robust bramble
#

Well can you force 3rd person cameras for people so they can look at who is rolling their dice?

#

I’m a noob when it comes to creating worlds, I’ve only done avatars for the most part

indigo finch
robust bramble
#

Idk just throwing out thoughts here anyway

#

I’d have to do some serious learning before I attempted something like that

indigo finch
robust bramble
#

I think there would be a lot of networking problems anyway

indigo finch
robust bramble
#

I still find the coolest udon world to be the one with the 2 mini golf courses if u have played that

#

Makes me want to create some cool stuff

civic birch
#

Having a slight bug where my volume slider gets activated when strafing left and right

#

Any way to remedy this?

indigo wagon
unborn hornet
copper flame
#

I'm currently in need of assistance. I'm trying to put together an udon home world that I have wanted to do for the past couple months but I've ran into some issues. The SDK seems to have broken (even when I import it into a brand new project entirely) and doesn't build properly. I don't think it's supposed to look like this. When building and publishing the world as unlisted to make sure it works with other users, I noticed that the video player plays sound but never shows the video picture and pens draw but you can never erase what you drew. I'm unsure how to fix this as I see no errors in the console and I've tried reimporting the SDK many times, importing other packages that are needed to run things like the video player and going through regedit and working with that to see if it would fix it. Any help would be very much appreciated.

meager herald
#

Has anyone used the Dastmann UDON liquid pouring system prefab? I'm trying to add in a bar that has pourable liquids, but pretty much every script for this prefab is throwing an error saying the each script's namespace already contains a definition for each script and I'm newer to udon related things so I'm not sure what to do to fix them. Here's some of the errors I'm getting at the moment.

#

Nevermind, it looks like I somehow had duplicate scripts in my project and that was causing issues.

cedar iron
#

Anyone know how to make subtitles?

indigo finch
latent cypress
#

Anyone know if there is there a way to get the position of the cursor on a UI canvas?

fierce jackal
#

is there anyone out there capable of helping me change my Udon graph so when i click buttons I have made it changes which animation is active on my lighting objects? i will literally pay for some help ive been trying to figure this out for over a week and can not find any help

copper flame
cedar iron
#

Is there a way to remove a picked-up item from someone's hand with an event?

lapis sable
#
public void Update()
{
        var tex = screen.material.GetTexture("_MainTex");

        if (tex == null)
        {
            test.text = $"Stand by";
            return; // Screen is Empty (NULL)
        }

        var pixel = (Color32)((Texture2D)tex).GetPixel(i, j);
}

I brought the video that VideoPlayer (AVPro) printed to MeshRenderer and read the pixels.

However, it is only output as Color32(255, 255, 255)
How can I read the pixel color normally?

cedar iron
#

Does anyone know how to teleport multiple people to an area without them clipping into each other?

topaz jetty
cedar iron
topaz jetty
#

TeleportTo

cedar iron
#

I'm already using TeleportTo to teleport the people, They are clipping into the same spot. I need a way for each person to teleport to 4 different spots in the same room, so they don't clip into each other when spawning

terse solstice
#

im trying to make a elevator plataform, i need to make the code stop running the update after the plataform position is the same as the destination

#

i cant find a node to compare 2 values

cedar iron
#

you can input what the instance and integer (or float) are.

terse solstice
#

oooh so i need to put the the type frist

#

and branch of it for a compare

#

ok

cedar iron
#

yep

terse solstice
#

thx

cedar iron
#

sure!

terse solstice
#

for some reason going to 1 postion work fine, it goes smooth to the location

#

but when i press the button again to move to the other position it just teleports my elevator

slim cedar
#

I am trying to have an object disappear on collision (and i can do that) but only if colliding with another specific object. (like a ball hitting a target). I would like to use udon graph. An actual graph example would help me a lot cause I am a bit lost. Can you help?

cedar iron
#

on collision with what? the player?

slim cedar
#

no another object. if my target (a cube) is hit by a ball, it would disappear. if hit by another object, it would not

#

it should be quite simple like checking if the object colliding corresponds to the one i have chosen, but i am dumb and i cannot figure out the graph 🥲

mossy crane
fiery yoke
#

Doesnt need to be on its own layer. You can differentiate different objects by for example including a special "tag" in their name like [LAYER1] and then filter for GameObjects with that name.

Layers do work, and theyre a little easier to work with. But you only have so many of them. So it depends.

mossy crane
#

Oh im remembering SDK2 times. Do we have access to use Unity’s tag system with Udon?

slim cedar
#

yes you can set tags and layers in the inspector

grand temple
#

custom tags are not uploaded with worlds

slim cedar
#

but i can't find "get layer" in the graphh

mossy crane
#

@slim cedar it comes from Gameobject

wind atlas
slim cedar
#

@mossy crane this is what i managed to do but it's obviously missing something...

indigo finch
cedar iron
#

does anyone know how to spread out teleportation between multiple points for multiplayer?

#

not spawns, but teleports.

slim cedar
blazing hedge
#

how to make a game object toggle when two Objects collide?

cold raft
#

well what SIR just posted above but then without the equals on layer

slim cedar
#

exactly lol.

#

except i am trying to discriminate

candid frigate
#

Is OnPlayerParticleCollision reliable enough for hit detection for a shooter game? Using particles would really simplify setting up bullet drop and shotguns.

mossy crane
#

@slim cedar is that graph on your bullet or the target

#

Er cube

slim cedar
#

the target

indigo finch
#

wait.. that might just be for ontrigger enter...

slim cedar
#

i think it shows up as collision by default when i pull the noodle out... but I'll check tomorrow again thank you

shy cipher
#

whenever i export it just shows the camera instead of the menu

#

ive reinstalled the sdk and unity

#

can anyone help?

lusty siren
#

Are vr chat servers ok?

meager herald
slim cedar
#

worked like a charm guys thank you!

topaz jetty
#

anyone knows what the prefab is called that can log your udon log to a menu in-game? I've seen it in worlds like the after dark arcade before, but that world is private currently for some reason...

fiery yoke
topaz jetty
#

oh ok that's fine, is there a prefab that has such an api already or do I have to make it myself?

dapper lion
#

someone had one, id consult booth.pm, i remember seeing at least 2 general use ones

meager herald
#

Would anyone know of a way to condense the amount of scripts I have on fish in my world into less scripts? I have 29 fish and each of them have a script on them to determine how they move around in the tank by using raycasting and then logic on how to move if an object obstucts the raycast. I wasn't sure if anyone knew of a way that I could modify the existing script to take in an array on objects and raycast from them like that instead. Essentially allowing me to put the script on a parent "Fish" object that all of the fish are in and then place the individual fish that need the movement as the objects being affected by the script itself. It would allow me to condense the scripts down from 29 to 1 which would be amazing.

I can send pictures of the code if needed if anyone has any ideas on how I could do this.

upbeat summit
#

Anyone knows how I can reset the props positions to the ones they had at startup ?

edgy ingot
#

weird U# question, anyone know how to fix the assembly reference issue between the SDKBase.utilities and the one shadergraph uses?

wind atlas
#

However, if you are looking to gain performance, I'm not sure if that will be that helpful. I feel like the raycasts might be more heavy, if you do them every frame.

meager herald
# wind atlas You'd need an array of your fish Transforms that you want to move, then iterate ...

I'm extremely new to C#/Udon in general, so this is a script that I got from a prefab of fish, but I've been reading through it to understand as much about it as I can.

I figured that an array that stores the fish transforms, as well as each fishes movement speeds would be needed, but I'm not entirely sure how to modify this code to do so without messing up what it already has in place at the moment.

wind atlas
wind atlas
meager herald
#

I am

#

I checked the analyzer in unity and scripts are clogging up the system the most, which the fish are the issue.

#

If I toggle off the fish in the world performance shoots up

wind atlas
#

This depends entirely on the implementation.

meager herald
#

Technically, compared to most worlds' standards, the world still runs above average, if not really well. But I would love to improve performance here if I could just to make it that much better.

#

Would you like me to DM you the code so you could see what it looks like? I'm not entirely sure what indicates to me the update frequency on the raycast and such in the code here.

#

I see the AvoidObstacles method that tells it to use the raycast to avoid obstacles though

wind atlas
meager herald
#

Awesome I'll send it your way, I'm really curious about learning how to do these things, but I genuinely don't know where to begin on what I should change in the code to work towards what I'm wanting to do.

wind atlas
meager herald
#

Honestly even if you can't, if I learn something then that is more than helpful for me haha.

upbeat summit
wind atlas
wind atlas
cedar iron
#

Does anyone know how to make subtitles for a vrchat world?

wind atlas
cedar iron
wind atlas
#

If you are asking about how to display the text, I personally would use udon for that. That can get more involved though and difficult to explain everything.

cedar iron
wind atlas
#

I think this project had a canvas that followed the head, if you want to see an example.

#

You can download it there.

blazing hedge
#

Why is this not working.... m I doin it wrong?

warm goblet
#

How do I make a UdonSyncPlayer (AVPro) sync the URL field when it changes and play for everyone?

#

late joiners arent getting the URL playing.

edgy ingot
stuck sentinel
#

can someone help me figure out how to write a certain teleporting script where someone walks to a certain area or into an object, the player gets teleported to a different part of the world?

scarlet lake
#

can this be fixed

primal hawk
#

is vrchat working?

scarlet lake
#

yeah

sullen jacinth
#

hey how do i make voice go far
or how do i make a mic that make the player near the mic go over the whole world

dapper lion
dim valve
#

Anyone know if there's a way to lower or shrink the VRChat capsule collider with C# or Udon when the player ducks down or gets down to crawl on all fours IRL?

#

Otherwise, is there a way to attach an invisible collider cube to the head of a player so I can use that to detect when the player is kneeling or getting down on all fours?

mossy blade
#

Are there any examples or prefabs of team management for players, to split a number of players into 2 or more teams?

mossy crane
#

I dont think this is the place for that Milo

elder peak
#

<@&397642795457970181> advertisement

twin zephyr
#

How do i make the movie player work on quest??

compact stirrup
#

I cannot find a Type ParticleSystem, is there a way for me to get the particle system component in this gameobject I'm trying to play?

#

I suppose I could use a string instead of a type

elder peak
#

what are you trying to do?

mighty fjord
#

There should be a Type ParticleSystem node

winged burrow
#

i need a little help with udon mirror trigger. i did exactly how i saw from a tutorial. but the gameobject of the buttons dont even light up. i have no idea whats wrong

upbeat summit
#

For some reason my VRC stations are glitched and if people too short try to sit on them it put them standing in the objects do anyone knows how to fix it ?

flint kite
#

so i wonder work for namespace on udon?

terse solstice
#

there is any simple udon AI tool?

#

jsut to move things on navmesh

cold raft
#

navmeshes do work but i dont know of any specific tools for it'

terse solstice
#

i see

#

i will try to makea simple motion thing

cold raft
terse solstice
upbeat summit
#

Any udon event that trigger when game object gets picked up ?

grand temple
#

onpickup

upbeat summit
grand temple
#

yep

upbeat summit
#

Thank you 👍

#

How can we use a pickup on pc vrchat ?

#

Which key is mapped ?

grand temple
#

if you're talking about onpickupusedown, that's only usable in desktop if the pickup's auto hold is set to true. In that case, it's just left mouse button

upbeat summit
#

I'm gonna check this out thanks again 😄

timber mortar
#

Is there a way to make a mute all audio button?

worthy beacon
#

is there anything tha can cause OnPostSeralization to not fire after you call RequestSeralization on an object you own?

#

im not getting any errors of behaviors failing, and nothing escapes the method that should call it. When in testing i know everything is running fine, and used to run fine. But for some reason now OnPostSeralization isnt happening, its a manual object too

grand temple
#

if it's instantiated or it doesn't have any synced variables that would happen

worthy beacon
#

it does, i have a byte array im using to transfer data that is synced, and this object exists on start

#

and the event is called on use of object

#

it even does the initial intended function

grand temple
#

only other thing I can think of is if you're extremely clogged

worthy beacon
#

hmm, whats a good way to check that?

grand temple
#

Networking.isclogged

worthy beacon
#

so to explain how it works

#

i have a timer loop that happens ever .2 seconds. This reads off a string array which has information i use to set the synced byte[]. Essentially it acts as instuctions. There is a Network.isclogged as a check, so if its called the method wouldnt even get called

#

i know the method gets called at least once because the sound is played

#

it sets another bool to false to keep skipping reading the next instruction until the last as successfully posted

#

which onPostseralization sets that bool to true

#

right now, it fires once, and i never get OnPostSeralization

#

i have a debug telling me when that should happen

#

if the network is clogged, that would mean any other object im syncing wouldnt work too right?

grand temple
#

syncing works when it's clogged, it just prioritizes pretty much everything else above manual sync so it takes longer

worthy beacon
#

hmm...well im not sure if its clogged, because if it was the first instruction wouldn't of even fired

grand temple
#

yeah I'm not sure. You can also see "Suffering" at the top left of debug menu 4. That's basically the same thing as clogged except it shows you a number instead of a bool. Higher the number, the more "clogged" it is

worthy beacon
#

its at 0

#

and when i use the object it doesnt change

grand temple
#

yeah doesn't sound like the issue is being clogged anyway

#

I guess go through the code, make sure you're actually the owner, make sure you're actually calling requestserialization

worthy beacon
#

i mean if im the only person in the world, cant really not be the owner

grand temple
#

wait

worthy beacon
#

i also do an ownership check

#

hmm?

grand temple
#

none of this stuff happens if you're the only one in the instance

#

onpreserialization, onpostserialization, ondeserialization

#

none of it

worthy beacon
#

oh

#

well....that kinda mucks up what i wanted to do....i suppose i should add a condition if you are the only person in world to not wait for the next instruction

#

actually ya, i can do a quick change to accomidate that

#

lemme double check to see if thats the case before i add the condition, but good to know

sullen jacinth
spiral horizon
#

Anyone know where to get a pool/hockey table, mini golf prefabs for udon or anything like thoughs?? vrcCatThink

charred blaze
#

vrchat build and test randomly stop working

cold raft
#

Sounds like you got the real vrchat sdk installed than

plain crater
#

So, I have no idea where to be putting this question. So I will ask here and if I need to move I will.

Does anybody know a way to make somebody a game host using Udon? Mainly by adding a tag to said player by a button press.

cold raft
#

you cant manupulate who is the host

#

its 100% imposiable

#

you can set by udon who owns certain network items like who can controll the video cotroller for exanple

vestal nimbus
#

I forget how to get a bool value from the property "isHeld" in U#, does anyone have an answer for this?

cold raft
#

that should just be a bool property right?

tacit pasture
#

is there any way in which to write data out of an active instance thats then able to be recalled and used in a new instance and or just write data out and not read it again?

cold raft
#

Not really by any legal means

#

Udon does not support this, the closest you get is making requests with the video player, but there the URLs can only be entered by user input not programaticly generated

tacit pasture
cold raft
#

No I dont know that world, I did a while back see a presentation on how callus row did thier data transfers but it required external bots running on servers

tacit pasture
#

all i want is support to save player data to be used again :(

#

how does the SAO map do it, i havent been to it but heard they save player data?

cold raft
#

Well you could do a password like system, where you give the player a code, they can enter again to reload statistics,

#

I don't know the SAO world tbh

tacit pasture
#

yeah i see how that works, like reload a checkpoint as such with specific stats, would kinda suck if anyone wanted to actually remeber the codes tho

cold raft
#

yeah

tacit pasture
#

well ty for your time ill have a think of some idea that could work

plain crater
cold raft
#

so you can do Networking.SetOwner() to set the player who own an object and on interact or something you check if said intereraction came from the owner

plain crater
#

If need be, would that support more than one owner?

cold raft
#

no an object always has one owner, but if you want multiple specific people to interact with it you can filter on for example player name or slot or other criteria

plain crater
#

I was thinking some form of tag or such that can be put onto a player. Or, a player is put onto a list with said tag.

acoustic vale
#

More to do with git & GitHub: When committing changes is there any files that contain sensitive information I should exclude? E.g if uploading an avatar the guid or login credentials? I'm already using .gitignore to exclude the VRCSDK, DynamicBone, etc but I just wanted to make sure before making my projects public?

exotic lark
#

is it possible to get a world camera to save a picture to the users computer, ie a photobooth style things

dapper lion
#

are udon vrcurlinput fields and normal inputfields officially disabled on quest or is something up on my end?

mighty fjord
tacit pasture
mighty fjord
tacit pasture
#

does it take any data outside of vrc, or can it store anything within a csv or txt file or anything?

#

but yeah i will have a look if you have a link

#

ok ty

mighty fjord
#

It does not write directly to a file, what it does instead is that it writes to a specific avatar's parameters, which in turn are saved in a local file once the avatar is unloaded.

tacit pasture
#

gotcha okay ty

gloomy fulcrum
#

Loving Udon but that documentation for it deff needs some love

dawn forge
#

Although I'd want to have a dev give the greenlight on it before passing it around, as to not pass around incorrect information.

raw ivy
#

is there some udon command I could use to make myself the admin of my own world?

ripe whale
#

not gonna lie, if the documentation / guides you're writing make their way into being public, i'm kinda interested as there's not much documentation on the subject x)

#

(or at least, i didn't find a good source on information on the subject yet)

fickle stirrup
cedar iron
#

Does anyone know how to force drop an item? I have this code but it's not working.

dawn forge
cedar iron
#

did you just remove it?

indigo finch
indigo finch
# cedar iron did you just remove it?

there are some checks that you may or may not want to do that I missed. First, you probably want to check whether or not it is the local player that entered the trigger. second, only the owner of the pickup can tell itself to drop it. if you want someone else to do it, you will need to call a networked event

cedar iron
#

I wanted it to check to see if anyone is holding it, and drop it.

indigo finch
#

then again, you don't need to check to say for them to drop it. just tell the owner to drop it. if they're not holding it, it just wont do anything

cedar iron
#

It still doesn't seem to be working.

indigo finch
cedar iron
#

other than the deac stuff that would occur after.

indigo finch
cedar iron
#

yea it says it doesn't work and halts the script

indigo finch
#

screenshots pls (windows + shift + s for part of screen)

cedar iron
#

oh wait nvm it worked

#

i had the script running through two beahviors, and forgot to apply the weapon to the second one, the one on the trigger that activates when they leave the level

#

i only did it on the one for the pickup script on the weapon

#

thank you so much

indigo finch
#

glad it helped ^^

raw ivy
meager herald
#

Extremely new to udon and coding and I am trying to make a script that allows me to have multiple game objects (with different post processing volumes on it) to toggle on and off. I want to have it so that bloom can be toggled on and off without effecting other toggles, but for my color grading, I want to make it so that if a player toggles normal mode on, it will see if neutral mode is toggled on and, if neutral mode is on, then it will toggle it off, but if it is already off, then nothing will happen to it.

I was advised to use arrays and for loops in the udon graph, but I don't really know what I am doing on the coding level, but I can understand conceptionally what people are advising me to do. I've looked for Udon array videos and nothing has really helped with this scenario.

#

I also don't know if there's a different way to accomplish what I am wanting to do since this is just a world menu that I'm working with. I know there are UI events I can send, but I'm not sure what ones I should use and how to manipulate them in a way to accomplish what I am trying to accomplish.

#

I followed along a short video i found on establishing a for loop that allows me to add more or less objects to an array and then I believe it is supposed to tell whether or not an object is active based on the int, but I am not exactly sure since I was following along the video.

meager herald
#

I actually figured out what I was trying to do without having to use a script, so never mind!

raw ivy
#

maybe post your solution for future reference

raw ivy
meager herald
#

Here is my solution. I have different game objects set up with the different profile settings for color grading. Essentially my Normal Mode game object is toggled on, while setting the value of the Neutral Mode game object to off. At the same time I had to set it so that the checkbox for the UI was turned on for Normal Mode and turned off for Neutral mode.

Then the Neutral mode settings are exactly the same as this, just the toggles are flipped so that it works in reverse.

#

Also ignore the animator. I was trying things and forgot to take it off haha.

#

I am however stuck on making a slider for bloom and world brightness for a sleep mode.

#

So if anyone has any ideas on that please shoot them my way as I'm still working on it at the moment.

indigo finch
indigo finch
# meager herald So if anyone has any ideas on that please shoot them my way as I'm still working...

You can't call the bloom directly, but you can change the post processing weight via an animation. Apparently now you can call the weight directly, but I've yet to get that to work. Made this video a wee bit ago covering that:
https://youtu.be/r-3L2h0yDkc

Here's how you can make a world darkness slider in udon! For now at least, Udon doesn't allow for you to access any of the post processing variables, so it took me a while before I learnt how you could do it via animations. That being said, using this method could totally be used for other post processing effects like bloom or vignetting, not ju...

▶ Play video
ripe whale
meager herald
meager herald
meager herald
#

Is there a way i can have them save their value and reload that when toggled back on?

indigo finch
meager herald
#

Ah, yeah it just doesn't work for me when using Cycle Offset

indigo finch
#

As for the toggling back on, your best bet is to call the custom event from the button that toggles it back on as well, to update it's value

meager herald
#

I'll give it a test and see!

#

The custom event on the button that toggles it on and off fixed the reseting problem. Thanks a ton!

indigo finch
#

^^

tepid salmon
#

I got a question is it posible to make a script to use particle to activate a enter trigger to do samthink ?.and how i would do that?

feral vault
#

what does it mean when it says "playersettings" does not contain definition? and how do i fix it

indigo finch
#

Would be the object being hit that gets the event

upbeat summit
#

I'm trying to immobilize a standing player on interaction with a button and setactive a game object do anyone knows the way to do so ?

dapper lion
#

or, you can set walk and run to 0

#

i can’t remember the exact thing but i believe its “SetPlayerWalkSpeed”

upbeat summit
dapper lion
#

what i think you should do is make a button/interactvoid that has the function you want to do, and seat the player in the station

upbeat summit
#

And how do I sit the player in the station on udon graph ?

dapper lion
#

uh, public varible “vrcstation”, that node should branch out some events you can use

#

i think its like: “UseStation”

#

thats what I remember it being called in usharp

upbeat summit
#

I'm gonna check this out thanks

eternal surge
#

men

fickle blade
#

Hopefully an easy one:
How can I make pickup objects play a sound when used? For example: a slurping sound for when you 'use' drinks.

eternal surge
#

just slurp irl

fickle blade
eternal surge
#

are you a guy i only suck off guys i mean play with guys

fickle stirrup
fickle stirrup
fickle blade
scarlet lake
#

Is it possible to force nametags off

wanton bobcat
#

yes

eternal surge
#

good im gay

#

jk

upbeat summit
#

Is there anything that can reset a gameobject and its content to how it was on startup ?

#

To reset a canvas more specifically

tepid salmon
#

@indigo finch you mean this one?

fickle stirrup
# scarlet lake Is it possible to force nametags off

not allowed by rules i suppose, but shaders can override what rendered behind, so player's hips position + box in offset with a shader on it. in the other hand - a text message on the wall that propose users to disable nametags on their quick menu settings for the "better experience"

scarlet lake
#

On the topic of shooting world, is anyone familiar with any scripts that the world "ShootingBattleVRC" uses?

upbeat summit
#

You can do like in the lasertag map

#

Ask players to turn it off

#

But yes some people may not do it so they can cheat

meager herald
#

@indigo finch I watched your video on animations with triggers which kind of helped me, but I'm a bit stuck on making it so that my world menu can toggle an animation with a bool. Trying to do a material swap between clear windows to rainy windows when people toggle on the rain ambience mode, but something in my graph logic is a bit off.

#

Also thanks for making the videos you have made, they have been extremely helpful for me since I am brand new to world creation.

indigo finch
# meager herald <@!228024927054331904> I watched your video on animations with triggers which ki...

Glad your finding them helpful ^^

I would need to look at the udon graph to get a better idea of where you might be struggling. I did make a quick one-take tutorial (unlisted) for someone trying to change in between lights, and that used int values instead. Might be worth a look: https://youtu.be/RVOtnG_8XD0

Also, is this a ui toggle button or just an object with an interact event?

So yea, here's a really rough, one-take video about changing the lighting for a world. Hope this helps solve your problem ^^

▶ Play video
meager herald
#

here is the graph. I thought it would work if getbool grabs the bool from the animator I place in it since there is only one, but i'm not sure if that's correct

#

following along your video, is this the right line of thinking?

#

just changing it to a bool for my case

indigo finch
indigo finch
meager herald
indigo finch
meager herald
#

I found a variable labeled toggle, not sure if that one is it or not.

#

there is also uint

indigo finch
meager herald
#

Okay would I then have it go to an equals node? I couldn't find a "get value" node

#

oh is it get enabled?

#

and then plug that into the value?

indigo finch
#

Ehhh, don't know if it's get enabled... But it's worth a shot. It goes into where you had your bool in the previous example

#

Aka: replacing MatSwap

meager herald
#

Trying different toggle nodes to see which one will work. I got it to swap on, but it wouldn't go back off haha.

#

got it

#

Thank ya so much

indigo finch
#

For reference what was the node called?

meager herald
#

for reference if anyone wants to know the graph

indigo finch
#

Is on...

meager herald
#

I had to grab the toggle's is on state

#

which makes sense

#

since if it looked at the active state, it wont work because the button itself wasn't being toggled

#

Thanks a ton though. I'm slowly understanding things more and more (despite still knowing like nothing haha) and it's been getting easier to do things

#

the more i understand what i'm doing instead of just doing it the easier it gets.

indigo finch
meager herald
#

That it is! thank you!

ebon plaza
#

Just a quick question in terms of local-vs-global. Are toggle functions local by default?

#

(As an aside question, I can't seem to get avatar pedestals working in terms of being able to select them.)

#

(Might be missing a step.)

ebon plaza
#

I've tried adjusting the collider settings, using different meshes... The pedestal component looks alright to me... Do I need to do anything with the graph?

ebon plaza
#

Nevermind, problem solved!

tepid canopy
#

what is udon...

cold raft
#

a type of noodles

#

or the scripting engine used in vrchat to make worlds interactable

upbeat summit
#

My ui character is going through colliders as if there were nothing

#

Anyone knows how I should patch this ?

#

If I set the layer to default I cant see the character at all

shrewd lark
upbeat summit
#

On unity xD

upbeat summit
#

Very global question how do I do something with udon if a bool is true and not if it's not true ?

mighty fjord
#

Using a branch node

#

It splits the flow depending on the condition of the bool

upbeat summit
#

Thanks

#

That's gonna make my life way easier xD

#

I love you dude now everything is working

tired spear
#

Is it possible to launch, for instance, a discord invite link by clicking on an button in VRC

#

And if so how ?

fiery yoke
hearty silo
#

gamers

#

is there any way i can get in-level cameras to show up on the desktop

#

like a streamer camera

dusky gorge
#

Is there a way with udon to make all my portals in my portal world to take people to East coast servers? Right now when someone walks through a portal it turns into a West coast instance.

pastel yew
#

Super quick question - is there something I can add to dynamic objects to make them bounce when dropped?

#

Instead of just losing all momentum and dropping like a brick. I'm trying to make a ball bounce.

pastel yew
#

Ah, I figured it out I think~ ¦3

meager herald
#

Can I network sync a parent object that has multiple sub-objects moving with an animator and not have to put an object sync on the children objects?

indigo finch
# meager herald Can I network sync a parent object that has multiple sub-objects moving with an ...

You can sync up a time float for the animation, changing the float via udon like I did for my slider. Or you could always restart the animation via a trigger or something. Perhaps slit the animation up and have it play the closest point.
Honestly though, I would have an object sync on all the objects (provide there isn't too many) and just disable the animator for anyone who isn't the owner of the object (the one who everyone syncs off)

meager herald
#

My only problem at the moment is getting the sync to be smooth between the host and anyone who joins.

tired orbit
#

What layer can I use to hide something from the camera, but still be visible to the player?

#

I have an indicator in my world that show who is the instance owner, but it doesn't need to be in screenshots

tired orbit
#

I don't see a player ui, but I'll try UI and see what that looks like

indigo finch
#

There are two ui layers. Couldn't remember what the other one was called so I guessed

elder peak
#

there also been changes to the layer names, where one reserved layer is now being used, updating sdk will reveal the name

tired orbit
#

This is what I see, + some that I created below reserved
I tried both UI and UiMenu and they're both visible in the screenshots on desktop mode

indigo finch
#

I mean... I don't think I've ever seen objects not show up desktop screenshots. Have you seen this in another world?

tired orbit
#

Not that I can think of, no

#

Parts of the UI don't show up in screenshots though, like nameplates and the camera itself, so I thought it'd be possible to do for other objects

indigo finch
#

Yea... Thats all on vrchats side of things. The best I can think off is a script that checks for someone going ctrl-h to hide their hud, and hiding the object along side it

tired orbit
#

Do the OnPlayerJoined and OnPlayerLeft events not fire when testing locally?
I have two instances up and neither one is printing any log messages that I can see.

indigo finch
tired orbit
#

Yeah that's what I have

    public override void OnPlayerJoined(VRCPlayerApi player)
    {
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!OnPlayerJoined!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        Debug.Log("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
        obj.SetActive(true);
    }
indigo finch
#

This part of the code I see no problems with

#

Unless obj is the same object as this script

tired orbit
#

No, it's not

#

The script is active, or at least starting, but it may be throwing an exception elsewhere

indigo finch
#

I would play test it with cyanemu, so you can see if scripts are been toggled off or whatnot

tired orbit
#

Can I use two clients with Cyanemu?

indigo finch
#

You only need one client to see if this event is being fired. Once you have that confirmed, then you will have to build and test

tired orbit
#

I guess I didn't think that OnPlayerJoined would fire for the one player itself joining

indigo finch
#

Nether. Kinda just stumbled across it myself making a player join sound

tired orbit
#

My problem ended up being that I was calling isInstanceOwner, which is always false in Build & Test mode
Thanks for your help though!

sour scarab
#

Hey, I have a graph that returns all of my object pool objects, but I need it to return only the one that enters the trigger. Can someone help me with it?

brazen epoch
#

Is there a way to see at the behest of which user a method is being called?

cold raft
#

well some events have a VrcPlayerApi on them as a parameter. but other than that no

brazen epoch
#

If I assign a synced variable's value and then immediately after send a network event, will the value be synced by the time the event is called?

tawny geyser
#

I don't think you can rely on that unless you use manual sync and call the network event from OnDeserialization, or OnVariableChanged.

cold raft
#

no

brazen epoch
#

Fair enough. That's what I thought I'd have to do

cold raft
#

synched values are updates 4 times per second, it does not look at your changes

brazen epoch
#

so the variable sync and the network event system are not aligned?

cold raft
#

yes

brazen epoch
#

okay

elfin kestrel
#

big big headache. Can't find any videos or anything on Player collision teleportation, that work for separate players. the code I copied over teleports EVERYONE in the instance. Despite some tampering, i decided to stick with what does...kinda work. It still teleports everyone, but it teleports, nonetheless. I just can't figure out how to make the trigger only teleport that singular player. This is the code currently:

grand temple
#

that's because onplayertriggerenter fires when you see anybody touch that object. It even gives you the playerapi who touched it, but you're not using that

#

just check if the playerapi it gives you islocal

sour scarab
elfin kestrel
grand temple
sour scarab
#

I don't know what I'm doing as well but it works perfectly fine.

grand temple
#

the islocal and branch is what matters

sour scarab
#

phase since you are active

#

do you know how to disable object that from the object pool or by tag/layer? that enters the trigger?

#

In udon ofc. thats the only thing i slowly starting to understand xD

grand temple
#

yeah, you just do objectpool return

#

the owner of the pool needs to be the one to do it

sour scarab
#

so something like: ontriggerenter ---- vrcobjectpool(return) with connected pool

#

api-getlocal player?

grand temple
#

a playerapi wouldn't be involved there at all

elfin kestrel
#

Kafar. you god

#

it has worked

#

My brain can now rest

#

thank you. so. so much. both of you

smoky bobcat
#

my udon graph isnot showing up

sour scarab
tough void
#

Is there a way to look up world id's on quest??

empty mantle
#

Is there a pve/AI prefab for uson?

indigo finch
# empty mantle Is there a pve/AI prefab for uson?

Perhaps a little advanced...
but Cebtauri2442 made one. here's the link: https://github.com/Centauri2442/SimpleAI
Also did a talk on it that might be helpful: https://www.youtube.com/watch?v=xVXXS7HX7Og

GitHub

Simple AI | An UdonSharp based local and synced AI package, meant for use in VRChat! - GitHub - Centauri2442/SimpleAI: Simple AI | An UdonSharp based local and synced AI package, meant for use in ...

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
scarlet lake
#

Hey idk if this is question but ima ask anyways how do i get on the list, like in among us it shows a list of like supporters and stuff how do i get on there?

#

Well how do i get on there

empty mantle
#

The fun part is your gonna have to do it yourself

#

Theres no sytem out there where you could link your patreon to vrchat

cold raft
#

If you mean the list in among us specifically, it's made by jar. You have to become a patreon and wait for jar to update the list

scarlet lake
#

Tried to make a mirror toggle but this just makes the mirror toggle disappear not the mirror.

#

Any advice?

cold raft
#

you put the wrong object in your gameobject

blazing hedge
#

How do you trigger timeline?

cold raft
#

what does that even mean?

fiery yoke
blazing hedge
#

How do you trigger timeline (Unitys Timeline feature) ?

upbeat summit
#

Is it possible to detect trigger collision between a gameobject and particles to check particles layer ?

#

Nvm I kind of did it

scarlet lake
#

Is it possible to make breakable glass with Udon? For example shooting glass with a gun would trigger an event to change the state of the object or something like that

tepid salmon
#

Hmm how about make a glass in peaces and add a ringbody and add a script that wen it collide with a particle to open the gravity so it fall down would be my idea you think that would work vrcThinking

fiery yoke
scarlet lake
#

Thanks guys

stray junco
#

is it possible to convert
C# to U# ?

cold raft
#

well not really

#

and sort of

#

U# is written in C#, so a lot of things from c# (not all) work in U#.

#

but U# also contains all the objects and overloads for working with the Udon Api and Unity

upbeat summit
#

Is it possible to send a network event to everyone but not the owner ?

cold raft
#

no but you can send it to everyone, and have the code that handles the event not run on owner

upbeat summit
#

How do you do that ?

#

I'm doing some drinks that changes materials when pickupusedown

#

But the material changes where just for the local player so people didn't see

#

now I added networking to everything and it's fine for others but the local player gets about 1sec of delay

cold raft
#

so need an udon graph or sharp behavioor on it

#

have a public int, like TextureId
on pickupusedown change the TextureId and run RequestSerialization

#

then in OnDeserialization() change the texture

#

and the the bahavoir to manual sync

upbeat summit
#

Do I need to put a VRCObject sync component on all items ?

cold raft
#

vrc object sync only syncs the position & rotation and some kinetic settings it wont sync anything else

#

it will also use cuntinues sync so it will now allow you to manual sync at the same level in hierarchy

upbeat summit
#

Okay I'm gonna try to see if I can do so thank you man !

upbeat summit
#

Or do I need to split it into two ?

cold raft
#

you mean continues and manual?

#

you cant mix them on the same level of hierarchy, but you can have a VRC object synch on like an a game object, and have a child game object use manual sync

willow dove
#

Is Resources.Load available in udon?

grand temple
#

no

willow dove
#

Any alternative?

#

or workaround?

candid ember
#

Can I use UDON to cull a unity layer from the player's vision?

#

Or just an object

willow dove
#

Yes

#

just disable render

candid ember
#

I can't

#

I still want it to show up in mirrors

#

well, in a mirror

willow dove
#

I see