#udon-general
59 messages · Page 85 of 1
And a noddle is..
noooodles
😵💫
let me see the blow up event
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
then you can test the setup by triggering the blow up event instead of a decrease health event
just change the string name to whatever your blow up is
this works
oki
it's not working
@mossy crane can i do two udon behaviors
on the same gameobject?
yea....
never tried it, dont see why not, but also dont see why you cant put it on a child if needed
this should work right
what does your cube have on it in the inspector
and whats bullet got
@mossy crane do i need to set it to is trigger
R there any videos on vrchat game world making
Like combat system and stuff
The only thing I can find a like Dev streams
Wym sry
How do I set a Directional light that only affect the users that join the world?
shees, what surfaces get affect by what light is kinda a shader thing i think. some shader are set to unaffected by light
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
can u change ur username in vrchat?
how do i do the avatars, if anyone has a screen shot or anything please help
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..
a question about udon, in udon questions, isnt the right place to ask a udon question? please make it make sense.
I’m having a stroke reading that but like; the question is: how do I import downloaded models into vrchat?
i know how to import models into vrchat otherwise why would i need to attach then to udon in a world
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
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...
How to make player sit on chair and exit automatically
ropes i guess
Damn! that was so funny dude u should defo have a Netflix special
Look through the player or station API, there is a method to forcefully seat people.
i'm having trouble with unable to move after leaving the Laying Down position
Are there any udon videos on combat system
Just get back up >:3
i did
after standing up, i can't move
i'm doing it for my world that has beach towls to lay down on
Does anyone know how to make a flight system where you can just continually jump forever?
oh heyo Davilos
Thanks ❤️
So does anyone know how to make a program that allows the player to jump indefinitely, even if not grounded?
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
Can you get the parameter from a different udon script and write that value to this script?
which parameter? the position in the set position block?
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
trying to change the chosen public gameobject from one udon script via another
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
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
oh wait
ok there has been a major misunderstanding
your wording made me think you were trying to help me with my problem
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...
To set it, just do set program variable
ah thanks
should i look into this "object pool" thing instead of instantiation
any chance this has an udon sharp equivalent? started catching my stride with some U# programs
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...
thankya much
^^
does anyone have insight into Audiolinks?
im having an issue with these pngs/set to FADE
Probably, especially if you want it's position to be synced
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
Is it possible to get the analogue trigger value of a controller in VR?
I looked in the API docs, but it only gives a float value for the control stick inputs, not the triggers
https://github.com/MerlinVR/UdonSharp/wiki/vrchat-api#udoninputeventargs
I just want to detect how hard someone is pulling the trigger
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?
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
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
debug lines only work in editor
ahhhh thank you, is that testable OnPickupUseDown with cyanemu?
gizmos work in both scene and game view
Ah thank you now it works, can you help me tune my direction the raycast is firing?
Global direction
Local
what is the ray doing currently?
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
get rid of the inversetransform. plug the forward directly into the raycast
spawnloc position and spawnloc forward should work, make sure it's compiling
Whats the best way to scale a custom capsule collider to a players avatar? For a basic hitbox
it already can track their location
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
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
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.
On the slider component itself, you can remap the max and min values as well as determine its direction (left to right, right to left, up to down, down to up). You don't even need udon for that, unless your making it change mid game
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
Oh, then it's just a simple math problem:
Slider max value - current value
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
Slider max value - current value + 1
Now the opposite the inbetween numbers are wrong but the 1 and 10 are good
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);
10 - 10 + 1 = 1
10 - 9 + 1 = 2
10 - 8 +1 = 3
10 - 7 +1 = 4
Etc...
Hmmm... I'll have to remember that one. Thanks for sharing
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
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
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
Are there any known issues with video players currently?
Pokeballer_1 is the audio source where should it fit in?
how would i make a PVP system in udon? (toly's combat system is broken)
Does network event flow to the next thing instantly, or does it wait till the network event is fired on all clients
Instantly
ty
still wondering
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
thanks
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
sure, provided it's related to udon/ vrchat sdk3.0's world logic
ah no i need help with something else
kk
how do you make a off mirror in the ui sharp
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.
variables are per object but you can reference other objects
global scoped variables are often not a good idea as they are hard to debug
So If I set a variable on one object I can pull that variable to another
you can access it, yes
is there a way to see World Size While in unity i hope there's a Udon Scripts for this
this extension can help you with filesize, you still need to build though
https://github.com/oneVR/VRWorldToolkit/
the sizes shown are uncompressed howevern
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
i don't know if this is correct
Is it possible to force players gravity into a sphere so people can stand like this on a round object?
Not easily, but possible through stations
well, my method didn't work, i want the sound to rewind again and play the sound again each 6 seconds
somehow i figured it out! i can use the animation for it
I'd like to do something similar but have the players be able to stand on the inside of a round object
how do you make a off mirror in the ui sharp
Can someone help me and teach me how to turn off a mirror with udon sharp
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..."
No. By design (I suppose, which simply means that Im not speaking for VRChat, but Im very certain that it is by design)
Sad, IG that means I'm gunna have to deal with it being linked to avatar pedistols then
Huh, how?
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
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
Are you able to acsess the skeleton like that?
If so I can just add flag bones
You can only access Unitys "Humanoid Bones"
Thaught all you got was hand and head pos
You could run ml algos to detect how players move and create gaze profiles, not overengineered or creepy at all 😄
Ooooh
That's bad, cus each of the girls are basically the same skeleton
If you want specific users, then you can use the displayName property of Player APIs...if you should is a different question.
If you uploaded the avatars yourself you can slightly change the bone distances just enough for them to be different. If you didnt...well youre out of luck.
IG, may just scrap the hole per avatar talk
Interesting, so you could add a hidden bone to avatars and those would be detected
No
Needs to be humanoid
Oh, right
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.
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 😄
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
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 😌
Can someone help me and teach me how to turn off a mirror with udon sharp
i want to use the "player.getBonePosition" thing... there is any chance of ppl use a avatar taht dotn have a head bone?
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...
If an avatar doesn't have a bone, then getboneposition will return 0,0,0. However the head is a required bone by the unity humanoid definition, so the only avatars that don't have a head are full-generic with no IK whatsoever
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
get trackingdata, not bone position
hmm
bone position can be slightly different from the camera. Tracking data is the camera directly, whether the avatar has that bone or not
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
i see
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?
How do I do an on respawn event in U#
Does anyone know how to get the instance master?
Something like Networking.GetInstanceMaster()
does U# support me calling the "OnPlayerRespawn" void on start
i mean testiong works
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?
Pretty sure there is not
thought so, but i figured id ask. thanks 🙂
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
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
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
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
You can take the local player and check for the IsPlayerGrounded variable. If it changes from false to true, it means the player landed.
How you do the "velocity" depends on what effect you are looking for. If you mean like a "bounce" or impulse, then you can call SetVelocity on the player to control it Which means you need to calculate the vector each frame yourself.
Basically do the same as in my previous post: You have to manipulate the player velocity using SetVelocity each frame to simulate the floating yourself.
Maybe there are assets that can make your life easier though.
so i use protv music player and i wanna make the playlist bigger with more rows of music have 3 columns
how to fix these?
and what are they?
i want it to kinda launch them forward with more speed
maybe screenshot it instead of taking a picture of the screen that cuts half of the shit off
ok
Yep, SetVelocity is your friend.
a screenshot of my problem, what do i do?
now how would i go about the autojump
Same thing. As long as you hold down a button, just do the velocity change.
Is there a Udon equivalent of sending a raycast but only return true on 1 layer and ignore/pass through the other 30?
Yeah, you can pass a layermask into a raycast.
This might work, not tested though:
If you want to calculate it yourself, I like to use this thread as reference:
https://answers.unity.com/questions/8715/how-do-i-use-layermasks.html
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
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
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
What effect are you going for? You could make a game object follow a player that has a shader on it.
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
I’ve got a grid on the floor of my world, but I only want to render it around the player’s feet. Come to think of it if I just use a disk that follows the players like Jarno said that’d prolly work, but if I could keep it with the curvature of the ground that’d be even better
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
ah, i’m using usharp 0.3.0
Would it be possible with udon to detect when a player is calibrating and spawn a mirror in front of them?
Would anyone know how to link AudioLink to USharpVideo by Merlin?
how do i bring up the code window
Ingame?
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.
no in unity how do i make code blocks
Someone with more shader experience might know more though.
The udon graph? There is a button on the script
where
Intersection would be genius actually yeah, I'll look into that. Thank you!
Sounds interesting. There is no official way to detect it. I feel like you could calculate the bone positions though, whether they are T-posing. Not sure how well that works though.
so in there i just drag blocks into it and link them together and boom?
Well yeah. I'd recommend watching some tutorials. VRChat has some, if you want to start out from scratch.
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
if anyone knows how i can add animations to the cars or has links to a tutorial let me know please!
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.
- Visit https://vrchat.com/home/download.
- Create a VRChat Account if you don't have one yet.
- Download SDK.
- 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...
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...
No, loading remote images is not officially supported. Pretty sure the video player is the only thing capable of accessing the web.
so using SendCustomEventDelayedSeconds, what's the best way to interupt the event?
How do I set the Mirror to 0 in a world so it isn't automatically on when someone Joins?
You can't interrupt it. You'd need to test for something whether you actually execute the event or not once it's actually called. Like a bool isInterruptEvent which you can set to true somewhere else.
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?
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
You could also check if it's being held for the respawn event. So even if you execute the event, it will just return before it actually respawns when someone picked it up again.
Best would probably be a 5 second loop where you check if a cached time is < the current time and respawn if so. The custom event would continually call itself resulting in an "Update-like" loop, but one that only executes X number of seconds.
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
Sounds like something you might want to bring up with Cyan regarding the emulator.
Did you double check in B&T?
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
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.
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
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.
right since the programming would follow the owner
Why doesnt this work?
when a late player joins it doesnt see the Swing function at all
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
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?
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
only the world master can access the button
still doesnt work, it updates only locally
Your animator instance is empty on the "speed" parameter. So your script probably crashes for "not set to an instance of an object"
hmmmm let me test that
Nope, still only happens locally
@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
I had another gameobject set to continues.....
FML been looking why it doesnt work for soo long
Manual only matters on things you call Request serial on
hmmm it works now, so thanks I guess xD
Lol perfect
anyone has a music player that works with local music in your pc but comes with ui to switch music
How do I enable legecy locomotion, aka Stutterstep
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?
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
So this took me longer than it should have.
Time to toggle objects again, but this time, for everyone! You'll see that syncing is a little bit more complicated than it was in SDK2, so to set everything up we have to tell every player to toggle that object, but also catch up anyone who joins in after the button was pressed!
All assets are availab...
that is what i used
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
i used his newest video to do the button then just added the sync parts
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
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
You want to swap the controller itself, or sync animation parameters to drive states
So I'm very new but I have to start somewhere. Do I need to know UDON to play with shaders and texturing effects?
I want my button to change which animator controller is active I guess then ya
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
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
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 ?
I havent made a new one yet because I didnt know how to continue one sec lemme boot it
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
It searches the parent game objects then children, index 0 is first found, 1 is second found etc
ive just been following tutorials i barely know what i am doing lol
ive figured out everything but this part
Ah I can’t graph until this evening but what I described may help someone show you in the mean time
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
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
hah ya i barely understand that ive followed a tutorial to even setup the graph i do have
Active animation or the animator controller themselves ? If it’s just animation swap that’s an easier thing
i want ot change the animation which approach is best?
can i do a bunch of animations under one controller and change between those?
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
ok well lmk if you can help later through discord video or somethign i learn really quickly
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
ya like i said that's mostly foreign to me if someone can just show me i understand better by seeing it actually work
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
so make different controllers or make more animations under each controller?
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
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?
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
But it may be harder to add more lights done the line, ok if they’re the same then animate off the light itself
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
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.
Is there something preventing you from just putting both sequences in one animation or just playing both in a row using the animator? Maybe you don't really need Udon for that.
So I just got started with Unity in general. My understanding is that the Animators are associated with a specific Game Object, so each moving object would have its own animator and I can't really control/inherit states from other animators. Is that not the case?
Kinda. You can also affect every child from the parent animator.
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.
When you say "make them a child of the animator"... I thought the animator was a component of the model being manipulated. Should I be making an empty object to contain everything I want to move and apply the animator to that empty object instead?
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
The animator component doesn't have to be attached to a model, if that's what you are saying. It can be attached to anything. However, the animations themselves need to reference the correct path of the objects they are affecting.
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?
Yes, try creating an animation and then when recording, modify a child. It will be saved in the animation.
For example, in the animation, this will be the path saved:
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.
Yeah, that's it. So if you have an object called parent with an animator and two ball meshes called ball1 and ball2, then the animator records the movements with the name ball1 and ball2 individually. You can then press F2 on the animation to edit the path like you see in my screenshot, if you happen to change the hierarchy.
I'll check back in here later when I have a chance to work on the animation timing in my scene. Thanks again 🙂
A prefab Udon that allows you to freeze the player if he presses a button?
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;```
When you create a new Class/Type, you have to let it compile and reload the assemblies, before writing any code using the type.
Otherwise it gets confused.
how do i do that?
By default Unity does it automatically when you re-focus the window
The little "loading circle"
how do you force stop a udon graph script?
It probably means you don't have a type called "Cheese". If you haven't created a script with that name, then it can't exist in your scripts.
Force stop when? Usually you don't want to do that.
i'm pretty sure i called it that since vs auto completes the variable names but i can check again
there's a split path on a story, where one path auto teleports you if you wait, and the other one overrides it when you press a button.
Problem is, the auto teleport kicks in no matter which one you do
What even is Cheese in your context? Can you post a screenshot of that class?
It vastly depends on how you call that script for the auto teleport.
Just wanted to let you know that your instruction on setting parents for animation worked like a charm! Thank you again for all the help!
i was thinking on setting up a branch to check for a boolean. It triggers true if they're in a specific room already
Yeah, stuff like that should be handled in code and not forcing scripts to stop. Setting a boolean is how you usually would do this case specifically. You could also just replace the TeleportPoint if a button is pressed.
how would you replace it? Oh? you mean replace the udon script being used?
No, I mean changing the variable TeleportPoint. It currently holds whatever transform you give it. In your button, you could hold a different spawn Transform which you Set to the TeleportPoint once the button is pressed.
ok, so if the button is pressed, i change whatever the teleportpoint variable is bound in the behavior to the "credits" room?
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);
}
}
}
You could also do public RatController manager_script btw.
I don't know why it wouldn't work then. You say VSCode does the autocomplete as a valid type for you?
yup
compile
Can you try compiling manually? Does CTRL+R work for you?
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
Yeah, the only thing I can think of is that Unity didn't import the new script properly. That's what CTRL+R does.
doesn't appear to do anything (unless i'm doing something wrong)
How can we create Bounds Control in VRC?
i figured it out it was because the Prefab called Cheese was capitalized the same as the class name
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
Transforms, GameObjects and UdonBehaviours self-reference if left blank. As those can be "guaranteed" to exist.
K i have this, and it no longer is crashing, the graph plays all the way, but my animation transitions arent firing
I've never needed to call custom function from U#
this how I do it?
made void public and it is working
prefix it with _, publics can be force-executed via the network, the _ prevents this
It's not valuable
All it does is disable the info board from a UI button
yea, but that's the wrong perspective, it does not require networking so why have it enabled? there are people who will just spam all public events for everyone, messing this up
If people want to stop others from knowing matel own monster high oh-well
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
It's possible
Probably too much work for most devs
Possible yes, but there are some fuzzyness as to how you would translate a super restrictive movement game to vr. You would most likey just make it play exactly the same, just with people being able to walk around the board while there character stands in place. What would be cool would be all the mini games. That's where you could truly get the benifit of vr
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
There's what you can do and what you should do. Most people hate it when you mess with their camera in vr. Honestly, I think the biggest problem is just that vr wouldn't add much. Nintendo is really good at optimising an experience, and translating that usually leads to a lesser experience. Might still be worthwhile though
Idk just throwing out thoughts here anyway
I’d have to do some serious learning before I attempted something like that
No worries. Its certainly fun to experiment with ideas. Hope I did come off to condicending
I think there would be a lot of networking problems anyway
Nah not at all
^^
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
Having a slight bug where my volume slider gets activated when strafing left and right
Any way to remedy this?
Remove navigation on the slider
with an EXTREME amount of complexity and months of work probably
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.
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.
Anyone know how to make subtitles?
That's a rather loaded question that sounds like a pain to troubleshoot, but if I was to throw out my 2 cents worth, I would check that all your udonscript components on your gameobjects have a script in them. seen it a couple of times where unity just kinda 'forgets' them. worth a look anyways
Anyone know if there is there a way to get the position of the cursor on a UI canvas?
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
Thank you, I’ll make sure to take a look.
Is there a way to remove a picked-up item from someone's hand with an event?
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?
Does anyone know how to teleport multiple people to an area without them clipping into each other?
make multiple teleport point and make sure every player teleports to a separate point
well yea, but how do i do such a thing? is there a way to set a specific person to a specific teleport spot?
Here are the nodes relating to Players' positions. For nodes that deal with forces relating to Players, see Player Forces GetPosition returns Vector3 in World SpaceGets the position of the Player. GetRotation returns Vector3 in World SpaceGets the rotation of the Player. GetBonePosition returns Vect...
TeleportTo
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
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
Equals?
for either a float or integer, it'll match it with the type of the same underneath, and return a true or false if both numbers equal.
For instance
[Equals]
Instance = 1
int = 2
Output Bool = False
you can input what the instance and integer (or float) are.
yep
thx
sure!
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
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?
on collision with what? the player?
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 🥲
You need to have the ball be on its own Layer, and then you can OnTriggerEnter > Collider other Get game object > Gameobject GetLayer, and get a Int value which corresponds to the layer visible in the layer drop down, then a Int compare node to see if it is == the layer you want to test for, and on true execute it’s been hit
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.
Oh im remembering SDK2 times. Do we have access to use Unity’s tag system with Udon?
yes you can set tags and layers in the inspector
custom tags are not uploaded with worlds
but i can't find "get layer" in the graphh
@slim cedar it comes from Gameobject
I wonder, can you assign tags at runtime for vrc worlds? I feel like that should be possible.
@mossy crane this is what i managed to do but it's obviously missing something...
Instead of int.compareTo, you want in int.equals
does anyone know how to spread out teleportation between multiple points for multiplayer?
not spawns, but teleports.
like this? it still doesnt work. what am i missing?
how to make a game object toggle when two Objects collide?
well what SIR just posted above but then without the equals on layer
Is OnPlayerParticleCollision reliable enough for hit detection for a shooter game? Using particles would really simplify setting up bullet drop and shotguns.
the target
I think that should work... though I believe you want collider.get gameObject instead of collision.get gameobject
wait.. that might just be for ontrigger enter...
i think it shows up as collision by default when i pull the noodle out... but I'll check tomorrow again thank you
whenever i export it just shows the camera instead of the menu
ive reinstalled the sdk and unity
can anyone help?
Are vr chat servers ok?
Do you have multiple cameras in your scene? If you do, the menu is probably in the view of one of the other cameras.
nope i dont
worked like a charm guys thank you!
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...
There is no magic prefab that can do that. At best you can have a prefab that gives you an API to do that. Which you then have to use with all your Debug messages. You cant do it "after the fact". Meaning that you would have to change all your current scripts to use the prefab/system.
oh ok that's fine, is there a prefab that has such an api already or do I have to make it myself?
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.
Anyone knows how I can reset the props positions to the ones they had at startup ?
weird U# question, anyone know how to fix the assembly reference issue between the SDKBase.utilities and the one shadergraph uses?
You'd need an array of your fish Transforms that you want to move, then iterate over them using a for loop, raycast for each one and then move them. It can be that simple if there is nothing else involved with the fishes.
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.
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.
If you are using the vrc object sync component, it has a Respawn method I think.
Are you trying to improve the performance?
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
Yeah, I'm curious which part of the fishes takes the performance.
This depends entirely on the implementation.
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
Sure, I'd take a look in a bit if you send it to me.
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.
I won't promise I can help, but I'll try, maybe I'll learn something myself.
Honestly even if you can't, if I learn something then that is more than helpful for me haha.
Can I use it with a button ?
Sure, you just have to get the VRCObjectSync type in a variable and then call Respawn on it.
Correct me if I'm wrong, but I don't think shader graph supports the built-in render pipeline, so it's not usable for VRChat.
Does anyone know how to make subtitles for a vrchat world?
You use a canvas and put text on it. How you want to display that canvas depends entirely on what you want to do.
i'm looking for it to appear on the bottom of a player's view, so that wherever they go, when a voiceover is being played, the subtitles are visible
In VR? You need to set the canvas to world space and then make it follow the head yourself.
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.
ok, how would I upldate it in realtime to follow the head movement?
I think this project had a canvas that followed the head, if you want to see an example.
You can download it there.
Why is this not working.... m I doin it wrong?
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.
yeah i quickly found that out, i ended up just getting amplify lol
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?
can this be fixed
is vrchat working?
yeah
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
@sullen jacinth https://github.com/Guribo/BetterAudio/wiki/ hope this can help
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?
Are there any examples or prefabs of team management for players, to split a number of players into 2 or more teams?
I dont think this is the place for that Milo
<@&397642795457970181> advertisement
How do i make the movie player work on quest??
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
what are you trying to do?
There should be a Type ParticleSystem node
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
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 ?
so i wonder work for namespace on udon?
navmeshes do work but i dont know of any specific tools for it'
i mean i can recommend this video if you havent seen it https://www.youtube.com/watch?v=xVXXS7HX7Og
oooh that looks interesting
Any udon event that trigger when game object gets picked up ?
onpickup
I'm guessing the opposite is ondrop ?
yep
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
I'm gonna check this out thanks again 😄
Is there a way to make a mute all audio button?
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
if it's instantiated or it doesn't have any synced variables that would happen
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
only other thing I can think of is if you're extremely clogged
hmm, whats a good way to check that?
Networking.isclogged
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?
syncing works when it's clogged, it just prioritizes pretty much everything else above manual sync so it takes longer
hmm...well im not sure if its clogged, because if it was the first instruction wouldn't of even fired
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
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
i mean if im the only person in the world, cant really not be the owner
wait
none of this stuff happens if you're the only one in the instance
onpreserialization, onpostserialization, ondeserialization
none of it
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
how can i get VoiceOverrideTriggerZone to work (its not working)
Anyone know where to get a pool/hockey table, mini golf prefabs for udon or anything like thoughs?? 
Thaank you 
vrchat build and test randomly stop working
Sounds like you got the real vrchat sdk installed than
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.
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
I forget how to get a bool value from the property "isHeld" in U#, does anyone have an answer for this?
that should just be a bool property right?
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?
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
yeah i get that, do you remember the discord world thing that could send messages to discord servers, any idea how that worked?
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
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?
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
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
yeah
well ty for your time ill have a think of some idea that could work
This is what I mean. Like how some werewolf maps can decide who is the game host. But they aren't the world host at all. The same person can also give up there game host role as well.
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
If need be, would that support more than one owner?
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
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.
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?
is it possible to get a world camera to save a picture to the users computer, ie a photobooth style things
are udon vrcurlinput fields and normal inputfields officially disabled on quest or is something up on my end?
I've made a prefab for this, though it is very much a temporary solution until the persistance update comes out, and it is in fact the one used in Project Aincrad
are you able to send this to me? a group of us are working on something that could really use any form of networked data saving to like google forms or something etc
The data is stored in a local avatar json which contains the avatar parameters, so there's no networking going on. But if you're still interested then you can check my github page which you can find through my profile.
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
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.
gotcha okay ty
Loving Udon but that documentation for it deff needs some love
I'm slowly writing documentation in working with Udon and Unity in general, but I am a C# dev, so it's focusing on working with UdonSharp and not the graphs.
Although I'd want to have a dev give the greenlight on it before passing it around, as to not pass around incorrect information.
is there some udon command I could use to make myself the admin of my own world?
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)
just make a vrcplayerapi.displayname equals your_name and if that condition is true do something you want
Does anyone know how to force drop an item? I have this code but it's not working.
It will pretty much get out there, but it might not be what everyone looks for because it's tailored towards writing in C#(UdonSharp) and also at an MVC approach. I'm willing to release it early to individuals who would like to gut it out and tailor it towards the node graph which many people are more comfortable with.
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
I wanted it to check to see if anyone is holding it, and drop it.
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
It still doesn't seem to be working.
how does your code look now?
it looks identical to this.
other than the deac stuff that would occur after.
It should work. Are you getting any errors when you playtest?
yea it says it doesn't work and halts the script
screenshots pls (windows + shift + s for part of screen)
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
glad it helped ^^
that's useful thanks, but is there a way to change the room owner from udon? so I can steal it from others in my own world
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.
I actually figured out what I was trying to do without having to use a script, so never mind!
maybe post your solution for future reference
for this one, I found out about the Networking node which has setowner
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.
That looks... Painful, but glad it works ^^
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...
ngl i'm more interested in knowing how to write proper C# / U# scripts than in using UdonGraph anyway, last time i tried using that node editor i spent 3 hours trying to do some stuff that i then did in 2 minutes in U# x)
Sweet I'll check it out and see what I can get going!
This was exactly what I needed. Thank you so much!
question about this. Using cycle offset does not work for me, but using motion time does, however I'm having an issue where, when I toggle bloom or exposure off entirely, when they are toggled back on it resets their value instead of being where they were when toggled off.
Is there a way i can have them save their value and reload that when toggled back on?
never tried doing using motion time... might have to play around with it
Ah, yeah it just doesn't work for me when using Cycle Offset
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
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!
^^
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?
what does it mean when it says "playersettings" does not contain definition? and how do i fix it
'On particle trigger enter'. Particles may need collision enabled. Can't quite remember
Would be the object being hit that gets the event
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 ?
you could put player into a local station that is set to immobilize and switch it off when done
or, you can set walk and run to 0
i can’t remember the exact thing but i believe its “SetPlayerWalkSpeed”
Is it possible to have a station trigger an interact event udon behavior script at the same time?
um, i think there is an event that is called when the player has entered the station, but icr
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
And how do I sit the player in the station on udon graph ?
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
I'm gonna check this out thanks
men
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.
just slurp irl
I'll slurp irl to make the sound effects if it's an easy feature to add
are you a guy i only suck off guys i mean play with guys
you can't and that's againts shadow rules, i.e. to do moderation via udon is not recommended, and setowner is for objects with udonbehaviour, to take control of it's network functions and syncing
on pickupuseup or something like this you need to call .Play() of public AudioSource and your pickup should be checked as auto holding to have clicking feature
Thanks, that gives me a rough idea.
If you could give me me a detailed step-by-step (as if I know nothing about Unity) that would save me some trial-and-error. :)
Is it possible to force nametags off
yes
Is there anything that can reset a gameobject and its content to how it was on startup ?
To reset a canvas more specifically
@indigo finch you mean this one?
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"
Main reason im looking for that is because im planning a shooting world and it will ruin the experience for people who are being stealth related people like snipers
On the topic of shooting world, is anyone familiar with any scripts that the world "ShootingBattleVRC" uses?
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
@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.
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 ^^
It's a UI toggle button that would be using an animation in an animator to change a bool "RainIsOn" from false to true in order to play an animation that swaps the window material from clear glass to a rainy material. And then it would function in reverse to play an animation that swaps it back to the normal glass material when toggled off on the UI.
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
So, currently this script grabs the animator's bool value, and sets the animators bool value to be that value... Essentially doing nothing.
You want to create another variable 'ui toggle' (public) and create a toggle.value node, and plug that into the set bool
Basically, but we can grab the ui toggles value instead of a bool, which is usually better (at least locally)
So going off of the first graph I sent, then I need to create a bool variable that is labeled ui toggle and then create the node you said and put that in between getbool and setbool?
Ehhh, not quite. Your lastest one is the most correct, but instead of using a bool, we want to grab the current state of the ui toggle.
We can create a uiToggle variable (its called that or something similar) and use that instead. Then we just grab that variable, put it into a 'uiToggle. Get value' (or called something similar) node, and then we get a bool of the ui toggle
I found a variable labeled toggle, not sure if that one is it or not.
there is also uint
Think it's that. Udon sometime abbreviates things and sometimes doesn't...
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?
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
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
For reference what was the node called?
for reference if anyone wants to know the graph
Is on...
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.
There's a reason coding is called a language. As you do more, you'll see the patterns
Keep it up! ^^
That it is! thank you!
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.)
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?
Nevermind, problem solved!
what is udon...
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
Log out and log in maybe ヽ(◕﹏◕)ノ
On unity xD
Very global question how do I do something with udon if a bool is true and not if it's not true ?
Thanks
That's gonna make my life way easier xD
I love you dude now everything is working
Is it possible to launch, for instance, a discord invite link by clicking on an button in VRC
And if so how ?
No. For a reason.
Well actually, it is possible that that can happen, but only in worlds made by either VRChat themselves or their Business Partners who have a written contractual agreement, which allows them to use more features than normal users.
gamers
is there any way i can get in-level cameras to show up on the desktop
like a streamer camera
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.
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.
Ah, I figured it out I think~ ¦3
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?
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)
I actually just made a script for the planets spinning, their orbiting around the world, and objects that orbit around the planets themselves (see networking to see my graph atm).
My only problem at the moment is getting the sync to be smooth between the host and anyone who joins.
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
'Ui' or 'player ui' maybe?
I don't see a player ui, but I'll try UI and see what that looks like
There are two ui layers. Couldn't remember what the other one was called so I guessed
there also been changes to the layer names, where one reserved layer is now being used, updating sdk will reveal the name
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
I mean... I don't think I've ever seen objects not show up desktop screenshots. Have you seen this in another world?
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
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
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.
They do, your probably just missing something. If your using udon# remember its:
public override void OnPlayerJoined() (or close to it(phone typing) )
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);
}
This part of the code I see no problems with
Unless obj is the same object as this script
No, it's not
The script is active, or at least starting, but it may be throwing an exception elsewhere
I would play test it with cyanemu, so you can see if scripts are been toggled off or whatnot
Can I use two clients with Cyanemu?
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
I guess I didn't think that OnPlayerJoined would fire for the one player itself joining
Nether. Kinda just stumbled across it myself making a player join sound
My problem ended up being that I was calling isInstanceOwner, which is always false in Build & Test mode
Thanks for your help though!
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?
Is there a way to see at the behest of which user a method is being called?
well some events have a VrcPlayerApi on them as a parameter. but other than that no
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?
I don't think you can rely on that unless you use manual sync and call the network event from OnDeserialization, or OnVariableChanged.
no
Fair enough. That's what I thought I'd have to do
synched values are updates 4 times per second, it does not look at your changes
so the variable sync and the network event system are not aligned?
yes
okay
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:
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
Graph that I'm using on my map for teleport through portals. It teleports only the person that enters the trigger. Is that what you are looking for?
Gunna mess with stuff so I can learn using what you said, like... understand what every line actually means. So thank you
I'll give this a whirl now!
it's not necessary to set the owner unless you have synced variables
I don't know what I'm doing as well but it works perfectly fine.
the islocal and branch is what matters
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
yeah, you just do objectpool return
the owner of the pool needs to be the one to do it
so something like: ontriggerenter ---- vrcobjectpool(return) with connected pool
api-getlocal player?
a playerapi wouldn't be involved there at all
Kafar. you god
it has worked
My brain can now rest
thank you. so. so much. both of you
my udon graph isnot showing up

Is there a way to look up world id's on quest??
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
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 ...
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...
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
The fun part is your gonna have to do it yourself
Theres no sytem out there where you could link your patreon to vrchat
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
Tried to make a mirror toggle but this just makes the mirror toggle disappear not the mirror.
Any advice?
you put the wrong object in your gameobject
How do you trigger timeline?
what does that even mean?
I think they mean Unitys Timeline feature.
yeah
How do you trigger timeline (Unitys Timeline feature) ?
Is it possible to detect trigger collision between a gameobject and particles to check particles layer ?
Nvm I kind of did it
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
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 
Udon can do a lot of things you can do with Unity, as its mostly a wrapper. Breakable objects have already been done a long time ago see: https://twitter.com/ville672/status/1253827679842971649?s=20
So i made breakable mirrors for mirror haters xD #VRChat #MadeWithUdon https://t.co/MnwzErordW
261
1111
Thanks guys
is it possible to convert
C# to U# ?
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
Is it possible to send a network event to everyone but not the owner ?
no but you can send it to everyone, and have the code that handles the event not run on owner
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
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
Do I need to put a VRCObject sync component on all items ?
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
Okay I'm gonna try to see if I can do so thank you man !
Can I have two different serializations in one script ?
Or do I need to split it into two ?
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
Is Resources.Load available in udon?
no
I see