#udon-general
59 messages · Page 66 of 1
how do i fix this?
Does anyone know how to transfer the build number info over for a VRC world? I had jump impulse speed and strafe values missing and not showing under the VRC World prefab in the inspector. I loaded a new vrc world prefab, the values show up again in the inspector but the build number and info is not showing when publishing because its like I started from scratch. Is there a way to copy paste something so I dont have to try and load this entire thing in 2019 and fix the problems in the world again?
when you install. you need to del all udon and udonshaper. install sdk, than install udon shaper, than install all that run off from udonshaper
thanks Tiger
your welcome.
pick android support when installing unity
i think you can bring up that menu again in unity hub without having to reinstall
oh
the UdonExampleScene included with the SDK has a program for this: https://docs.vrchat.com/docs/udon-example-scene#choosercontainer-1
I'd want to create a "synced" object (probably instantiated) that everybody can see, not just the localplayer
it IS, however, a nice start to look at
obligatory U#, but the concept is the same just gotta translate/adapt it
:D
how do i learn
sure - if you did that same thing and added an ObjectSync component, then the owner would move the object for everyone else
you can start here: https://docs.vrchat.com/docs/getting-started-with-udon
then I'd recommend going through the UdonExampleScene along with the guide: https://docs.vrchat.com/docs/udon-example-scene
okay thx bro
posted an issue I still cant solve. I had to reimport the vrc world prefab. However when I publish it does not have my world ID applied. Is there a quick fix???
no id but I have it in the content manager.
I pasted it in the [pipeline manager and it did not take it
nope ....lol ok that was silly of me wasnt it? FIXED!!!! thanks so much @scarlet lake !
Upgrading my project from 2018 to 2019, one of my scripts threw an error because 'ColorBlock.defaultColorBlock' is no longer exposed to Udon. I'm working on a fix on my end. But I feel like I'm missing some info here because this seems like it would be a breaking change for people who use 'ColorBlock.defaultColorBlock' in multiple places, be it Udon Graph or U#.
that doesn't sound like a unity or vrchat function, is it?
oh I see, it's a part of unity UI
Hm, yeah I'm having trouble even finding it in the 2019.4 docs, maybe they moved it to a Package reference?
ah yeah, it's here now: https://docs.unity3d.com/Packages/com.unity.ugui@1.0/api/UnityEngine.UI.ColorBlock.html
Yeah I was kinda confused about that part too.
will you file a Canny so we can take a look and follow up?
Sure.
I wasn't able to provide a screenshot of an Udon graph error so I provided one of a U# error instead.
thank you!
i have an object toggle setup and everything, but how will i know its local to the player, like a toggle for a mirror
the interact event only happens for the player that clicked it. Nobody else receives that
Running into an issue where some objects I have to remove the UdonBehavior component and re-add it. For instance a toggle door object was throwing an 'object reference not set to an instance of an object' error. Happened for some doors and not others
ran into some stubborn ones that readding didn't fix. Clearing the SerializedUdonPrograms folder and recompiling fixed it though so alls well.
Udon and SDK 3.0 seem more complicated then 2.0
Hey, does anyone know a Youtube video to show me how to make "Good" looking stairs?
It is more complicated, but it also allows for more complex behaviour. Its still relatively easy to make easy things though.
But SDK 4.0 will be even better
Just wait until we do 100% unity C# script in vrchat
but thats to much power, people will make things happen that arent ment to be
Isn't udon sharp basically full c#
no there are many moments where udon sharp will disapoint you,
and well that mostly due to what udon itzelf is capeable of, and what it limits us to do
So can someone walk me through my udon errors? Because i really have a worlds to create
dont make errors!
?
I dont understand it says im missing scripts for udon. And for the life of me can't figure it out.
Screenshot what you see
Lol all I really want is an easy/simpler way to have local buttons
they arent that hard, you just need to put an udon behaviour on it with and interact event
anyone who know how to make a lock door system?
Easiest way, IMO, is to make the door check a bool before playing the open/close animation. On the branch, if true, door is locked and don't do anything (or play a locked sound, whatever), if false, door opens as normal.
Have your lock/unlock button just flip that bool when you press it. Done!
Thanks 😄
is there a block that turns 3floats into a vector 3 and the other way arround
i think the constructor of vector3 receives 3 floats
the other way around i dont think so]
Does anyone know how to disable players use of emm?
you cant
neet
why does this block excist
it takes in a game object and gives a game object
yeah its a bit of a wierd one, i think its more of how things work internally as you can request the gameobject of a components like
is this delayed event set up correctly? I'm never getting the event triggered
i think you can leave the instance of the sendcustom event empty if its on the same udon behaviour
i would suggest to add Debug.Log before sendenvent so you know it is actually getting reached
Thanks. It seems the eventname dropdown never works? does it always need a string attached
i think its seposed to work but i never used it myzelf so cant say for sure 😄
I feel like this should be pinned. https://feedback.vrchat.com/bug-reports/p/1121-unity-2019-trees-causing-extreme-fps-drops-on-quest-2
Turns out to be major issue and any world that has Unity trees in it = Crash world for Quest 2. Turning off the headset can sometimes be the only way to leave.
Maybe it should be pinned but prob not in this channel
Maybe yea #user-support-old
can these be used mid gameply
becase im trying to make a button change your player stats
Yes
odd why isnt that working then
up todate SDK and useing then recomended Unity build
maby Cyan emu doesnt suport on the spot stat changes
It does
Make sure the nodes are actually getting executed? Changing the float values that feed into them won’t necessarily execute the nodes again
They’d need to have an event cause them to execute a second time
It should work. Do you have custom events that do things? You may have to click compile and/or refresh to get them to show up in the dropdown
The event gets called but if I disconnect the string noodle the dropdown is greyed out with dashes
Oh that's because you're doing the getcomponent thing. The dropdown don't support that, and it's unnecessary anyway
Ah ok so it’s me over specifying again
They support events on the local udonbehaviour and events on other udonbehaviours that are referenced by a public udonbehaviour variable
Curious that the event does get called tho with this setup
So with no instance connected, shouldn’t it populate with the current custom event names in the same graph?
Yes
Leaving an instance blank will self reference in the case of udonbehaviours, gameobjects, and transforms
Trying to set up a very basic toggle to turn off a bunch of objects in the world through a UI button, but whenever I press the button, instead of disabling the target, it disables the button and leaves the objects still visible.
Followed this guide so not exactly what might be up on the Udon side 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...
Calling Interact from a UI button isn't preferred, and might cause issues. Interact is for an object that has a collider that you want a highlight around. For UI buttons do "Send Custom Event" and instead of having Event Interact, have a Custom Event node and name it something, then put that name in the slot for the UI button.
And that'd all be done in one udon graph?
do anyone know what this all about. it just weird texts
here my error. maybe someone can clear thing up on what i am looking at...
Can you show the graph/U# that causes this
The only part you need to look at is the top of the error which is saying there's an error when doing get display name
well, i can but i not clear on that too
it only show up 1 time when some random kid was in my world
Yep 👍
Just swap "Interact" to a "Event Custom" node
Tiger it looks like the Player that you're trying to get access to is Null. What are you trying to access?
i going have to find it to fix it or pull it from my server but as far what i can see. it show no error
Gotcha, will try that in a bit o7
i was not try to access anyone. that the weird part. i join on player in my world when this error pop up
well. i going look into this when i get home. i got go to work
Is “target” a public variable? If so have you put the gameobject that you want to be target in the inspector of the udon conponent? If left empty it will default to being itself
It is a public variable with a selection made of the object I want totbe disabled
I have to do like 40 objects on one toggle so I'll figure out how to do more than one when I get there
Friend is getting this error when converting their world to 2019. They properly imported it over and have tried multiple different things to get rid of the errors but nothing has worked. Anyone have any ideas of how to fix these errors?
I'm wondering how to handle switching between two music tracks of equal length while keeping them in sync. Currently I start both of them at the same time, one with a volume of 0 and one with a volume of 1 and upon entering a trigger fade one in and the other out
But I'm wondering if there's a better way
And if I wanted to handle other audio sources with the same script. Currently I have music and rain, music fades in and out completely while rain fades out to a lower volume
How do I cut holes in walls/floor/ceiling/ect for doors/windows/trapdoors/ect?
I'd recommend doing that on the Blender side and using knife tool in edit mode, you shouldn't need UDON for that unless it's dynamic.
Alright, have the set up to now disable and enable through the button with an event all working, thing is I have about 30 or so individual objects to turn off, is there any easier way besides doing this 30 times?
Could also use probuilder if that's your thing
I was looking for probuilder, but couldn't find the download link.
it's in the unity package manager, there is no download link
Go to window > package manager and find it in that list
Then you can also install progrids from there, but you have to check the show preview packages option
What about the probuilder grid?
I don't know how well it works, i've seen progrids recommended so i just used that
Where do I get the progrid?
Not the right channel for modeling questions you should ask in #world-development or #3d-modeling
so i was following a tutorial and they use "Get Variable" but I only have "Get Program Variable" like this, are they the same thing by any chance?
get variable is not something you search for. You get it by clicking on one of your variables and dragging it into the graph
getprogramvariable will do the same thing though, yes. It's just slightly less convenient and slightly more expensive
but getprogramvariable is what you would use if you wanted to get a variable from a different udonbehaviour
thank you @grand temple
hey can anyone help me? i want to make a Udon graph for a Player Respawn when the Player run in a Specific TriggerCollider
how i can make this
this triggercollider is for Rooms thats Only for one or two persons
this was my way but i don't know what is wrong
when i test this this give this error back
the complete error expand
Not sure why your using any of this as none of these nodes will do a respawn
the node combatsetrespawn will do this. it becomes a on death when the user received the 1000 hitpoint
or not?
The 1000 number is max HP
For the player to die and respawn that number would need to be set to 0
Do you need to use combat system or do you just want to respawn the player?
actually i just want the player to respawn when he steps into the trigger
Then you can remove all the nodes except for the first 3
that was the possibility that I had thought of from the non-udon area
You can use PlayerApi TeleportTo
And just directly set the player location with a teleport
but how i set the correct position from the VRCWorld-spawn?
You need to update your SDK
Not sure what you mean?
but now i have set this up but it do the same error and will not work
Based on your previous graph setup you likely aren't assigning the local player into the instance input
you need networking > local player
or plug the VRCPlayerAPI from the EnterTrigger into it
is there a way to scroll textures?
why does the vertical layout group look fine in the editor with cyanemu but so weird in the vrchat client? It disappears if I get too close and it changes depending on what angle I look at it. It works fine with pre-made menu panels but when I'm instantiating new ones and then set them to the parent with the vertical layout group component it looks so weird
for (int i = 0; i < songs.Length; i++)
{
int song = songs[i];
GameObject songListed = VRCInstantiate(songButton);
songListed.GetComponent<RectTransform>().SetParent(parent);
Sprite thumbnail = imagesList.GetComponent<Transform>().Find(images[song]).GetComponent<SpriteRenderer>().sprite;
Sprite game = imagesList.GetComponent<Transform>().Find(games[song]).GetComponent<SpriteRenderer>().sprite;
songListed.GetComponent<RectTransform>().Find("Thumbnail").GetComponent<Image>().sprite = thumbnail;
songListed.GetComponent<RectTransform>().Find("Game").GetComponent<Image>().sprite = game;
songListed.GetComponent<RectTransform>().Find("Name").GetComponent<Text>().text = names[song];
songListed.GetComponent<RectTransform>().Find("Artist").GetComponent<Text>().text = artists[song];
songListed.GetComponent<RectTransform>().Find("Duration").GetComponent<Text>().text = durations[song];
}
So i got a random question - So i made Door system with animations - Is possible to sync it?
wdym by that?
yeah, it's working fine if it's pre-set as the parent and not being instantiated, but that defeats the entire purpose of the system I made where it instantiates the amount of songs queried and then displays their name and thumbnail
and it works fine in the unity editor
with cyanemu
just not in the vrchat client
this shows the issue better, the first one is pre-set and the other ones are initiated
when running from the unity editor with cyanemu it looks normal
figured it out, for some reason using VRCInstantiate resets the transform of the clone, but not in the editor
songListedTransform.position = prefabTransform.position;
songListedTransform.right = prefabTransform.right;
songListedTransform.up = prefabTransform.up;
songListedTransform.rotation = prefabTransform.rotation;
songListedTransform.SetParent(parent);
``` solution is setting the correct transform values on the clone again
Is it possible to create a pickup that boosts the voice of whoever holds it? I want to try making an announcement system where you have to hold a mic for it to work.
possible to make a "trash can" that can delete stuff? like cans and such?
Yes and yes
may i ask how 😄 ?
Add a trigger to the trashcan and add a script that checks if an object entered the trigger and then destroy the object @warm blade
@manic yarrow Could you describe your solution to this? it isnt clear to me and I'm having a similar issue
There was a variable that was synced, and it shouldn't have been
Check in your variables for anything that shouldn't be synced
Looks like for our issue it was a 2019 update oddity. Just opening and closing the udon graphs and re-publishing fixed it. Thanks anyways!
hey just wanted to know where the collider walk through command went to in udon
so that I can have a collider active but able to have players walk through it
Is it possible to set a player as the source for an aim constraint? I want a large eyeball to constantly face the player.
My udon is having an issue and not giving me an output log (see attached). need help diagnosing the crash on interact.
click on the log, the lower section will tell you the error
it's like it's crasihng on getbool?
is the animator a public variable and you have it plugged into the udonbehaviour in the inspector?
and the inspector?
I think we found the issue, the animator in the prefab wasn't inherited in the instanced scene prefab
is this being instantiated at runtime?
no, it looks like a prefab with UB on it with a filled animatior, but when put into the scene the animator wasn't carrying over
is the animator outside the prefab?
hmm looks like the animator being polled is inside the prefab, wierd. placing the animator back into the UB in the scene is working
thanks, they're going to make a fresh prefab with this one from the scene one
new prefab worked, thanks for the tip
prior one carried from 2018
@grand temple thank you for the help!
This is a real weird issue I have been having with udonsharp, and I am wondering if I am missing something. I have a loop that iterates through a Jagged array - ARRAY[A][B] = X, where it first increments B to the max, then resets B to 0 and Increments A, restarting from there. Each step of this 2 part loop, I set the ARRAY equal to the element X inputted in. However, I keep having the issue where the inputted value X, while it stays in the correct index along B, gets inputted for all domains of A
so like if I had the array equal to
[0,0]
[0,0]
[0,0]
setting array[1][2] = 3
I get
[0,3]
[0,3]
[0,3]
could you share the code that is trying to do this?
Its a part of a really large script, I'll try to clip the context. Ignore the debug.logs since I was debugging
ill just post the txt
the variable "currentFramei " does increment in a loop as well
and its accessing variable SharedVars.bothHandDataSet which is a float[][]
that looks like it would do exactly what you're saying it does. You don't have a for loop inside a for loop, you have two separate for loops
well, this function is within a for loop in another script thats calling this. The 2 for loops here are essentially responsible for aligning the input, hence why the second loop is essentially the first one but with the index marked as (a - 11)
and starts at 11 instead
unfortunately the script is pretty massive, so its hard to trim exactly this part without making it confusing. I think I am hitting some odd thing about C#, wouldn't be the first time
heres a better overview of the code if this helps
reading a bit deeper in c# documentation, I think what is happening is since I never explicitly defined each member array of the jagged array, each member of the jagged array could be referencing the same array, thus causing this bizarre behavior, cause i am expecting it to behave like a multidimensional array, which jagged arrays are not
im going to have the rewrite this data processing portion of my script, fun. Hopefully one day udon will support multidimensional arrays, but till then~
actually, I can just create a bunch of normal independent arrays and just stitch them into the jagged array on program start, so each member of the jagged array is defined as a separate independent array. Not perfect, but since I know the max size of these arrays, it is possible
Anyone know how to Sync animated doors?
no noone has figured that out yet
damnn xD
So if "When OnParticleCollision is invoked from a script attached to a ParticleSystem, the GameObject parameter represents a GameObject with an attached Collider struck by the ParticleSystem." does anyone know what node, or series of nodes, I would need to change a variable on an object with an udon behavior on particle collision?
I know I could make an udon behavior variable and plug an object into it, but there are a bunch of objects, so that gets out of hand pretty fast.
so set program veriable is for udon variables it wont let you change like the color of a particle system like that
if that is what you want then the instance has to be the udonbehaviour
if you however want to manipulate the particle system you need to aprouch it differently
i dont know what you desired behaviour is
my shader isn't working on Unity, it's just not appearing
I'm trying to make a world for myself and my friends, and I'm trying to make the floor into clouds
But it's just not appearing
I've made the shader, it's just invisible
I'm not trying to change the particle system. I'm trying to change the thing the particle is hitting. Maybe I am misunderstanding how that works tho.
so what aspect of the thing the particle system is hitting are you trying to change?
A variableon the object. In this case a color variable.
one in order to have a variable there you need to have udon behaviour on that object that hits it
I'm aware, as an example, this works just fine. but there are many objects and I was hoping to have a way to pull the instance off the collision event data instead of daisy chaining them all together. Sorry if I'm not explaining myself well enough.
what did you use to make the shader?
hdrp
I've been trying to find out how to make automatic doors (door that open when you step on a certain area) but haven't found any tutorials on how to make them. Does anyone know how to do this, or where I can find a tutorial for it?
trying to setup a music toggle, and for whatever reason adding the audio source into the udon behavior makes it break, won't compile. Should I be toggling the entire object the audio source is on? Or just the audio source property in that object ?
https://www.youtube.com/watch?v=95jRByYHE4Y
https://www.youtube.com/watch?v=Bw4uvjrvdbU
https://www.youtube.com/watch?v=D9bNwCMfueM
Here's a few options of tutorials for you
These features are currently available only on our Open Beta version - check our Discord for more information.
Learn how to make doors that automatically open and close to let players through. This tutorial will use the Udon Graph to work with Player Triggers, Haptics (aka controller vibration) and controlling Animators with Udon.
Music i...
Accessing and controlling an objects animator is incredibly easy through Udon. Here's a short tutorial on how to go about about utilizing it through the example of a basic door. Assets for this and future videos will be available for download over on my Patreon, so if you'd like to work through the assets yourself of simply want to support me an...
Looking for a download link? Check out my Patreon.
Patreon: https://www.patreon.com/vrcakira
Part 3 of my video series for basic VRCHAT world building with the VRCSDK3 Udon kit. This series will be designed for beginners. I will try to cover every step from start to finish of each vrchat world creation tutorial. The goal of the videos is to all...
You can work with AudioSources, have you tried adding an AudioSource variable and making it public instead of pulling the component in directly?
Was just testing it and I ran into the same issue, but now I'm unable to recreate it, strange...
I can't drag in the audio without another inspector tab since it's greyed out
What now?
forgot to send the picture sorry
You cant assign a reference to a field on the udon graph asset itself, you have to put it in an UdonBehaviour to assign the reference
oH
took me a bit to understand the meaning of that
let me try that
You've got it now? ^^
gonna check here in a minute, no errors yet
Am I using the correct options here, using enable?
Ah, figured it out. you're not supposed to toggle the audiosource, but the game object the audio source is in
Does Start fire off once whenever a new player joins?
Okay this is what I want. I want it to fire off when the initial instance is made then never again for late joiners
So essentially only for the initial master
sure, just on start check if you're the master
Got it
the only way to be master that early is if it's a brand new instance
Having some weird issues and thought this may be it. I already have it this way
Ya
I think it just hit me. I think I’m sending a network event that has a network Event within it. So that would mean the network event is being sent to everyone from everyone right?
And it’s a looped system so it keeps doing it on top of each other. Being multiplied by every new user
how would i set only the x pos of an object using a ui slider?
get current position and override only x
get vector3 from transform -> getx, gety, getz -> set x with slider -> new Vector3 with x, y, z -> set transform
anybody know where to get the climbing script everyone been using to climb walls and stuff
Im trying to find a join and leave prefab for worlds, i tried using the moonvrc prefab on github but it doesnt seem to work unless im missing something
hi
i'm not able to find on_pickup_disable_component
is there a way to do it
thanks in advance
I dont know where you searched for on_ pickup_disable_component, but its certainly something you can script with udon
i invented it
cause i need it
Well you put an udon behaviour on the pickup, there you have an event on pickup I think is called and from there you can get a different gsmeobject or component and disable it
@cold raft
i will try it
i hope it works
thank you
tost? Could you give us some context?
Tost has no meaning to my knowledge
here this is what i mean
so weird
i guess dev's like's tosted udon to eat 🤣
i dont know what a hell that means 😦
anyway i only want to find component disable
but i can't find it in udon graph
i guess i need to use U# to make that script
whih i dont know how and i never will
cause i didn't go to coding school and i dont know anything about coding
plus i have eye health issues so yeah.
it will be nice that udon graph search contain component_disable
how would i make a station for a character to lay down just like in MeRoom?
that's not tosted, that's "tostring" or "to string"
it means to convert the value into a string
@grand temple
ah it's so small texts 😦 i only can see as tosting
but thanks for explanation
btw do you know how to set bigger text font in udon so i can see it properly?
ok will do
ah yeah about that...
it only magnifye's nodes not internal text in piping window
it magnifies everything equally
idk, maybe windows scaling would help or something
or just get a bigger monitor
right
i will try to see what i can do
👍
Anyone able to help me with a lock system for doors?
Im confused how do you make local trigger object.
I wonfer how
Cause it activates for everyone
Okay
it's called a branch in graphs
Ohhh okay im gonna try this now
LMAO
also I don't think you want to just toggle it every time the player enters. Are you sure you don't want to turn it on when they enter and then off when they exit?
Im trying to make it work if a players is already open the door others wont be able to re open it
how to do face expression in pc?
This channel is for questions about Udon, try #user-support-old or visit #faq to learn where to find information in the many channels of this server.
oki
What would be the best method to obtain the position or rotation of a humanoid bone relative to local space? I can just poll it’s position but it outputs in relation to world origin, not like the bone transform itself
that's what transform.inversetransformpoint is for
Perfect thanks, I was scared I would have to read it relative to another bone transform or something, I’ll look into that
that function does require a transform though, so you would have to move a transform around for the sole purpose of using it to do math. If you want, you could do the math without the help of a transform but it is a little bit more complicated
My use case is udon reading a humanoid bone and detecting rotation or position change of the bone
I can get a transform and read its change after X time so I have some value
So I set a neutral position and check if modified and to what degree the transform is modified, I think
I need help, Im trying to figure out how to teleport people in one of my worlds, I know nothing really about Udon besides toggling a mirror or buttons
So, I have been working on my Avatar world for a bit and its finally uploaded, but, it wont let me load into my world, as it shoots me back into my home world.
Can I get help for this issue?
I have fixed it, it had multiple pipeline managers and wouldnt let me in because of it.
used this guys information, thank you ^^
The node is called TeleportTo
Keep in mind it can only teleport the local player - if you try to teleport anyone else, they'll only move for you - and instantly pop right back as their client says where they are.
with the 2019 update, my visual studios no long recognizes the namespace for udon, does anyone know a way to fix this?
XD yeah but I dont know what you need to do to get to that point
How do I decrease gravity so players don't fall like a bullet?
Default gravity should be 9.8 mps without doing anything
Might seem stronger than earth if you are very small
I'm a tall character and I hit the ground as soon as I get in the air
Where do I find gravity?
its SetGravityStrengt on vrcplayer api
1.0 is default so you an use lower values like 0.7 or something
Define where that is? I've been looking at the api and udon graph
Or you could press tab for a full search
You search for VRCPlayerAPI in the place you searched for SetGravityStrength
yes seeems alright
So here is my teleport..What did I get wrong?
I don't understand what I'm messing up I placed it like the rest and it doesn't work I can't fix falling like a rock.
im using that physical interaction prefab for buttons to be touch. for some reason the first world load is always toggle but every other one is touch. is that something someone here uses and knows about?
looks good, what is wrong? you go to the wrong position? or are you not teleported at al? or cant interact with button
you put gravity strength at 0 that might be an invallid value but 0.1 might work
Messaged you-
“Target” is the wrong type. It is an Object, it should be a Transform.
You can tell as it’s noodles are fading from one color to another (which represents typecasting and usually isn’t going to work except in special cases)
Do you mean that when you're testing in an offline world that buttons are toggled with a laser interaction, but reloading the world they can be physically pressed?
not even just local/offline. after i upload it same thing. dont know if i have an option selected or something missing. its weird to me bc the button is working 100% but weirdly
If it was local/offline only I would expect it to be this bug, but I'm not sure if it's happening online too: https://vrchat.canny.io/vrchat-udon-closed-alpha-bugs/p/vrcplayerapiisuserinvr-for-the-local-player-is-not-returned-correctly-when-calle
Fixed that but now Im having issues with it not teleporting to were I am wanting it to go
Teleport expects a global position, but you are giving it a local position which would be relative to that object's parent
Just do get position instead of get local position
Did that, just trying to get to a place. Its just not teleporting me to were I'd like to go
That should work, have you tried again after connecting everything?
Yeah and its not teleporting me to were I want to go.
Can you take another picture after connecting it to the teleport?
Did, still doesnt teleport me were I want to go
Do you have the right object plugged into the inspector?
Got it to work!
Is there a way to sync a local variable through SendCustomNetworkEvent (U#)?
I am spawning a cube at the location of a pickup but if I use the local players pickup location I have a huge offset sometimes so I want to use the object owners pickup position instead is that possible?
If the object is synced, then the position will be correct locally - when you say "the object owners pickup position" - do you mean the position where they originally picked it up, or the position of a pickup they're currently holding?
It has an object a bit further out as a child, whose position gets rounded so it snaps to a grid (thats where it spawns a cube), if I move slowly and place its accurate for both players, if I move the pickup quickly and place one, its offset by sometimes a whole meter
If you want to sync a variable, the best approach is to use a Synced Variable. Events cannot currently have parameters, and are best used for temporary effects. If you're instantiating objects, you may have better luck using an Object Pool so you can each sync each object as you 'spawn' it from the pool.
As id spawn potentially thousands, a pool sadly is not an option for me as it actually kills unity trying to make a pool that size, but I guess I can sync the position in a seperate script as a vector3
hm - I don't think thousands of objects will be able to sync anything
Its just to initially spawn them, theyre cubes without scripts and such
I am building a tool to spawn cubes and such as I did in sdk2
Maybe it would help if you could explain the larger vision you have for what you want to do. If you spawn thousands of local cubes, only the local player will see them.
Theyre not local, this screenshot should be a good example
Instantiated objects are local-only.
Yeah thats why its a networked event
I only have issues with the position being offset slightly
The objects themselves will be local-only, and will not sync for late joiners. Events are not sent to late joiners: https://docs.vrchat.com/docs/udon-networking#events
I was planning to put them into an array and then sync that array with new players to sync it
Which would only be a vector3 and an int for a material index per cube, which id then space out over a few seconds to relieve lag
You may want to start with some stress tests to see how large a vector3[] and int[] array you can sync so you know your upper limits.
Yeah I should, have not done much networking yet, mostly overcomplicated local things
you're working pretty far outside the bounds of how our networking is designed. You're welcome to do so, but I'd recommend you read through the networking doc I posted above to get an idea of what's possible and how things work best before you go pushing the bounds too far.
Alright, ty
Bit of an odd question, when exactly does the Player Respawn event fire? does it happen before the player is teleported to the spawn point or after?
it fires after the player has been teleported and after AlignTrackingToPlayer has been called - it's the last thing to happen in the Respawn call stack.
Awesome, that's exactly what I was hoping for. Thank you.
So,I am writing my own guide (to at least group all of the information about unity and vrchat into one place rather than 5+ tabs). So I am wondering if anyone uses UdonPie or is everyone using udonsharp/graph nodes
I don't think so. Has it even been updated in 6 months?
yeah I doubt it still works with the latest SDK
ok,ill just drop it from the guide
Hi there, it’s been a while since I’ve pushed a new build and I just updated to ‘19. Does clicking “last build” in “online publishing” after a test just push your last build or the VRC servers or do you have to click “Build & and Publish” and go through the full process?
Will SendCustomNetworkEvent also trigger it for yourself?
yes, if you target all
perfect
if you target the owner then it will only happen for the owner
So this will work for me and everyone?
yes
Hihi question, why am I not seeing the interaction text for highlighting items in my world?
because you left the text empty?
Unfortunately no I did try changing it
since your talking about items do you mean vrc pickups ?
and can you pick them up or not all ?
beccause in the latter case you are probly missing a collider on pickup
Nah I can pick up and interact with stuff just fine, but both the Interact Text and Use Text variables don't do anything
It's not necessary to see but it'd be nice
hmm nothing that pops up in my mind of whats wrong than
omg ☠️ thank you for trying to helpl.... i just realized i had show tool tips turned off LOL
oh i didnt even know that was a setting 😄
Ikr I completely forgot, I guess I turned it off forever ago
hey i got a question
oh sorry i should have just told you
I'm trying to play with the default AvPro video player, but the stock version doesn't seem to sync. It'll play for the person uploading the URL, but never passes the URL on to the other players in the world (testing with Build and Test, at least)
As far as I can tell, urlChange is only local, but everything in the udon script seems to be coded like it fires across the network, so I'm wondering if I've broken something or missing something?
Can you show the relevant part of the graph? Im curious now
Sure!
So it starts here with the URL entered, and it's pretty clearly setting up as master and then telling the others to sync up.
There is no OnDeserialization though, it's a manual call. The URL bit, is this (Ignore the slider on the end, that's me trying things and doesn't touch anything functionality-wise). It's the only place the URL MIGHT be called by other players, because nothing else touches the URL string (Which is a synched value)
Resync fires like this.
I think what happens is it's meant to all line up when the video starts, and from there assume synchronicity across all players.
Ahh, and I've just worked out what I've beaten my head scratching my head about; url Change is one of those fancy new on variable-change graphs.
You might have tooltips turned off in settings
Correct! Full explanation of that graph is here: https://docs.vrchat.com/docs/udon-video-sync-player
I have gotten my custom video player working now. And of course I find the documentation after functionally reverse-engineering it myself, lol.
Does object sync require a rigid body? Will object sync work to sync the position of an object that is animating root position via animator?
And does having an empty udon behavior automatcially act as an object sync still?
Does anyone have a reference of the udon graph area for a basic trash can that can delete multiple different spawned pickups? I get the general idea for it but I'm very new to udon and I dont fully understand all the nodes yet.
What can i do?
Actual Delete? NEver again to be used?
https://puu.sh/I2X6h/9104eb5856.png
Trigger collider inside the trashcan to drop the item in. Make sure the items you instantiate/whatever have [Trash] inside the name. Otherwise ANYTHING you drop into the trashcan will get deleted.
Thank you so much I'll figure this out if its the last thing i do
It works thank you so much :)
hello O.o there its a way to read an avatar armature and place and object to a preselected bone? i have the scrip that adds spherecoliders to the humanbody but if my bone its not in the default humanbody like a hair or a breast bone its not podible to add those??
i tried to read the avatar as gameobject and search the bone i wanted but wont work when i test in vrchat just when i add the model in the scene
There is some way to read the layout of an avatar's bone structure. But I've only just today purchased a script that does operations like that so I need to read and understand how it works before I could start to answer that question.
so anyone already create something like that, its possible for you to share me the link to check if i can purchase it?O.o @opal dew
I'd need to see if this does kind of what you're after. It's the avali flight script. It does... Something, to scan an avatar and see if it matches the profile of avali rig. If it does, it enables that player to use flight in the world. So I assume it must have logic for reading the bone structure of a rig.
ohh makes sense thx 😄
how do you a spawn item on front of you
udon does not support directly instantiating objects. Instead, you need to use an object pool to have a collection of objects that already existed in the world. When you try to spawn an object, it just pulls from that pool instead of creating a brand new object.
The "vrc object pool" component will manage these objects for you
is there a tutorial where i can learn how to use vrc object pool?
the SDK example scene has it set up, you can see how it is used there
Hello, everyone! I'm Space.Dot.Man. On vrc 'JforceG'.
I have a few questions I'd like to ask in regards to how to implement two things in udon that I can't seem to find tutorials or much information on.
The first one is how I could have an object trigger an event when it touches the trigger.
I have a basketball and a net, and I want a 'swish' sound to go off when the ball enters the object trigger.
I believe I understand how the logic works, I'm just having trouble initiating such logic in Udon.
This is what I have so far. This udon behavior is on the basketball and the 'swish trigger' is a cube with trigger checked on the collision box.
Thanks so much for any information.
Oh, and the 'SetActive' is for the audio source that simply makes a 'swish' noise. 😛
Oh wait. I think I got it working. 🙂 Forgot to connect the two nodes. Silly me.
Now I'm trying to figure out how to have it enable and disable with a branch if statement.
what do you want to enable / disable?
btw if you're just getting started, the UdonExampleScene has lots of example programs, and this docs page explains them all: https://docs.vrchat.com/docs/udon-example-scene
Hello, momo. Thanks for your response.
I had actually got it working, but then realized that what I wanted to disable was the audio source...Which cuts off the sound.
So, now I'm trying to figure out how to just get the audio clip.
Thank you. I'm looking through it.
Hm - perhaps you can change the volume on the audio source after some time? Why do you want to disable the audio source?
You might use PlayOneShot if you want a play-once clip: https://docs.unity3d.com/2019.4/Documentation/ScriptReference/AudioSource.PlayOneShot.html
If you're always playing the same audio clip though, you could probably just set it to play, it should stop as soon as the clip has finished playing unless you have 'loop' on.
I initially wanted to disable the sound source as a means to enable and disable the sound. But now I realize why thats a bit silly and newbish of me. 😛
I will try the 'play' function. Should work okay.
The second thing I wanted to know, is whether or not integer variables could be used with branch.
As a test I'm trying to I'm trying to enable or disable a cube if the int variable is greater than one. Having trouble figuring out how to establish this or if its even possible.
I'm not much of a programmer, but I am aware that changes to different values can launch all sorts of different behaviors if set up certain ways.
a branch is not necessary because the "greater than" node outputs a bool. A bool can be true or false. A branch accepts a bool, but so does "gameobject set active", so you can just plug the greaterthan straight into it, and only have one
Oh my god. As if I didn't think of that.
Thank you so much!
The reason why I used branch was because I figured I'd have to define what happens if its not greater than the number.
Also, you currently have this running in update. update runs every frame so you would be doing this calculation as much as 90 or 144 times a second. That's a lot of pointless calculation if the variable never changes. That's why the OnVariableChanged event exists. You can add it by holding alt while dragging the variable into the graph. Then it will only run when the variable changes
Ah thanks. I'll give that a shot.
many of the Synced Variable examples do that, you can check them out for reference: https://docs.vrchat.com/docs/udon-example-scene#slidersync
Alright. I'll read through it and try to do it carefully. I have some sort of learning disability. Bit of a pain.
Sorry for my ignorance. I'm coming from something as simple as the Construct 2 engine.
What is the right way to send a "PlayURL" command to a UdonSyncPlayer (Unity) and have it update for everyone?
currently only the person initiating that command sees the video play
Is it possible to play a humanoid animation on a player with Udon?
It occurs to me that chairs used to be able to do it, so if there is not a means to do so directly, then perhaps one could force them into a chair that then plays the animation? I don't know if Udon chairs can even force animations on players though.
If I'm not mistaken though there is an Udon skateboarding world, which I assume is playing an animation to stick characters to the boards? But that might be done with chairs.
I think it's possible with chairs, but it's definitely not possible without them
Anyone know of a good Udon video player that works with this update?
my old one broke completely
merlin's usharp player
Asked this question in the world channel, but I thought asking in here might help out. Getting these errors after converting to unity 2019 for the world. The SDK control panel also doesn't show up even though I followed the migration guide step by step. Any ideas on what's going on and how to fix these errors?
i dont know what kind of assets Udon Stuff is, but it seems those scripts arent compatible with the latest versions your installed
maybe you can do without, maybe you can fix em
The SDK is placed in Udon Stuff and those scripts are from the SDK I believe, so I can't really do without them x_x
the SKD should be in Assets/VRCSDK or Assets/Udon or Packages/VRchat SDK3 - Worlds
not in Udon Stuff
maybe you moved it yourself? in that case when you import new updates they wont properly override as the folder structure be different
That possible. I should just be able to move it into assets and be fine right?
i think those script are not compatiable with your current installation of the sdk or udonsharp (if you have the latter) so moving them around problely wont fix anything
Wait so the scripts that come with the newest sdk aren't compatible with it?
I was going to go back to the 2018 version, move the SDK to the assets folder and then do the 2019 conversion again and the files should be properly overwritten that time, correct?
I assumed this might fix the issue, but maybe not.
hmm that might work, not 100% sure
hello i have a light and i search for change the intensity and colors by button and in dont know how take the value and change it by interaction in the game if someone wants to help me you could mp me
Hello yochigamer
you can do that something like this using udon
actually no, its even simpler, you make a button and put an udon behaviour on it like this
then you just got to drag the light into the target light field of the udon behaviour, in the inspector on the button
Eyop, anyone by anychance got the pages with the user-agents the vrc videoplayer use ?
Using the Prefabs The easiest way to put a Video Player in your Udon world is by using one of the Prefabs, which you can find in Assets/VRChat Examples/Prefabs/VideoPlayers.Both of these prefabs will play a video of your choosing, synchronized for everyone in your world. They won't loop - the graph ...
Like you mean the hosts it can use? Bottom of that page
Nope ! Vrc send specific user-agents to the web hosting servers that allow the said server to know that the connection come from within vrc itself
And also allow people running the said servers to lock specific files to the said value aswell
I'll surely just wireshark it since I can't find it in the docs
that seems wrong, as OnDeserialization is only called for remote clients after a call to request serialization
https://i.gyazo.com/1cbaeeff28d2c1c1d9ed4573b208af76.png
Anyone who knows how to make it working so everyone can reset the whole deck ? Rn people can only reset the cards they used and the cards other used still stays in place
The person who resets the cards either needs to take ownership of them all or send out a networked event which just tells all users to recall all their cards
hello, just tried to upgrade the version of my world to the new Unity 2019 version. However, this udon error appears all of the sudden. Deleting that script only makes things worse. Any help?
What's a good way to make a button play a sound and then disable itself for 30 seconds?
I'm making a horn button for a boat, and it would be really annoying if people could spam it
On Play, turn something logically necessary for it off, and at the same time SendCustomEventDelayedSeconds for 30 seconds, where that delayed event re-enables the thing.
If you're using a collider with Interact, my suggestion is to disable the collider component and then re-enable it after 30 seconds
that way players also have some UX feedback, i.e. "oh the button doesn't highlight after I press it"
That's what I'm doing as-is, I'm just wondering if there's a way without network events since I was told they're not favourable
saying network events "are not favorable" is a big overgeneralization
Last time I used them and when I was told this, it was with a similar situation
I was making a jukebox
This kind of thing is what they're good for
if late joiners matter then yeah, you probably don't want network events. But making a system to tell the late joiners exactly when the jukebox started is kinda overcomplicating it and probably not necessary for just 30 seconds
For turning off a sound effect button, late join really doesn't sound like a concern
Custom Network Events have two main advantages disadvantages: (1) if they change the state of the world, then that is an unsynchronized state for late joiners, and (2) they arrive at slow-ish unpredictable-ish speed
#2 only matters if you're thinking about data races, which is kind of an advanced topic
#1 isn't applicable here because I would not define "setting a temporary cooldown active" as something that changes world state
So pretty much for anything that doesn't change world state, Custom Network Events are just great. Don't think of them as "not favorable."
What's the right way to sync a playURL command to a UdonSyncPlayer (Unity)?
Is it possible to make a VRC Pickup only pickupable by certain players? The pickupable flag on it is global, not local.
that flag is not synced so you can turn it on and off independently for each player
try a clean install
already fixed it thanks
How did you fix it?
Oh, I recognize that issue. That's from an SDK that was not made for 2019. If you just fixed it by changing the code itself, then you're probably going to have other issues. You need to get the latest SDK that was actually made for 2019
you can see the way we do it in the new Video Sync Example - making the url a synced variable, and using an OnVariableChange event to do something for everyone when it changes: https://docs.vrchat.com/docs/udon-video-sync-player#someone-loads-a-url
Ah thank you! I dont know I didnt realize there was a doc page on the player >_<
has anyone ever tried to mask out the Player/PlayerLocal layers on a raycast? currently it works and ignores the local player, but not other players, despite masking both of them out, those are the two correct layers right?
try right clicking in assets and doing "reimport all"
what's the name of the SDK you tried importing?
like the file name, should start with "VRCSDK3-WORLD-"
yep
but what's the rest?
VRCSDK3-WORLD-2021.08.04.15.07_Public
ok, that's correct. I'm not sure. Do you have any errors in the console?
nope
let me try to download a new sdk as well
this does not work
it applies it to all players
unless, onstationentered possibly gets called on all users when one sits in a station?
that's where im setting the flag
Yes OnStationEntered will fire for every player
got it. thank you
does anybody know where to get the prefab for that diskthrowing game ?
theres one in a beach in a world
i low key want to get it for my own world xd
i make this but the intensity dont change
will udon eventually be for avatars later down the road as well?
Hell no
Udon is for worlds only. Avatars will be getting the "Avatar Dynamics" system later this year.
It's nothing like Udon, but it does open up a few things that were previously only possible to do in Udon worlds.
Can you help me???
It looks like you're using execution flow incorrectly
Instead of trying to start two execution flows with one Custom Event name, you should start with one Custom Event, and use a Block node
How do I turn off 1 mirror when you turn the other on
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...
thanks
Hello people, I'm going to buy a headset for VR from Oculus, specifically quest 2, are there any users of this headset here? what advantages does it have, what games do you play mainly on it? besides price and quality, what other advantages?
this channel is for questions about our scripting language "Udon" - you can ask in #quest-general if you want to chat with people who use Quest headsets
oh sorry thank you!
Is it possible to have multiple triggers in one world?
I made a trigger earlier for a noise to be made when a basketball goes into a net.
That works fine. But, when I made a second trigger with a seperate udon behavior and a second collision object, for whatever reason, that trigger only calls the other udon behavior from the net.
Udon Behavior 1
Udon Behavior 2
They are similar, but should be using launching different sounds under different circumstances, no?
Did you make sure to actually assign the two different gameobjects in the variable slots in the inspector?
Yes.
I believe so.
I'm trying to make a modular music system where you can spawn different music blocks. Drums, chords, notes.
The basketball and the net was more of a test.
I followed this tutorial for global toggle but whenever someone new joins in resets to off always
https://www.youtube.com/watch?v=O3VeBzV9HgI&ab_channel=VowganVR it was this one
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...
How do I Toggle Multiple Objects
I can toggle singual but not multipul
yes you can
so instead of a single variable of type Gameobject, you need to make it a GameObject[]
and use a for loop to go over each object in the array 1 by 1 to toggle it
or a simpeler option can be to put all the objects under the same parent object in the hierachy, and just toggle the single parent object
thats alot simpler
Im trying to have spawnable pickups in my world and I want to make them global. The only problem im having is when the item spawns everyone can see but when they pick it up it becomes local.
I have it set up as Button>activates spawner>spawns item.
I also have an animation toggle that no longer works after setting up the SendCustomNetworkEvent :/
instantiated objects do not support being synced in udon
you need to use a pool to enable objects that exist in the world from the start
the vrc object pool component will manage that for you
Do you think i could have a reference of a pool spawner please?
the udon example scene has one
Thank you very much :)
For some reason, my code just isn't working in regards to the kick drum.
It detects the basketball but not the hammer.
And when it does detect the basketball, it doesn't play the right sound.
Is it a bug or is my code off?
The example pen in the SDK, each buttonpress uses a new linerenderer, right?
I have pickups I want only the master to be able to pick up. Currently I tried to do this, but its not working.
Sorry for the clutter. This is on Event Start, at the end of everything it checks if local player is master, and if so enables pickupable
but me in my own instance, I cant pick em up
ah!
so it should work though, on "Start" event?
I was worried it had to be something that happens on player join or something
Where are you getting the component from?
That get Component isn't connected to anything either.
It's a pickup
Oh ok
So ownership is whoever holds it.
It's a GetComponent of type node with no reference in the instance (meaning it uses self) and type set to "VRC_Pickup Type"
that seems to have worked, testing in game now, thanks!
Are there any good resources out there on how to do physical buttons like in JustB? Ironically, I don't want to recreate it, I just want to examine the logic.
VRC Physical Interaction kova 2020.04.17.11.43 Physical buttons for VRChat worlds that you can toggle with your hands.
SimpleAI Centauri 2021.05.21.12.13 SimpleAI is a set of AI prefabs that are useful to have in any project! It is meant to be used on its own, or alongside the tutorial released as part of TLX!
Remarkably dumb question, but how do I compare simple floats in Udon Graph?
Or do math in general for that matter 😅
You probably want the Mathf nodes
Though there should be some basic functions under float for comparing
Either Mathf.Equality or Float.Equality
Conversely Inequality for the NOT EQUALS comparison
how do you make like if there is no player on the trigger door closes
I think you mean something like System.Single.op_GreatherThan for example.
In .NET a simple "float" is called Single. Standing for Single-Precision Floating Point Number.
Hi, I want to disable a local player's spawn point in U#, but I have no idea how to do that.
Does anyone know about it?
uh help??? I keep getting this error preventing me from updating my world????
Did you put a "using UdonSharp;" code on your EditAvatars.cs? You probably missed it.
huh?
I had imported sharp for the old 8 ball pool prefab, i got rid of the table but i still have this error
In that case, I don't know how to solve it neither sorry😭
dang
I might just remake the world or somethin if im getting issues as much as i am rn
As a sanity check, i would re-import the latest sdk and udonsharp. Also assuming your on unity 2019 here, and would recommend updating if not
you also get that error in udonsharp fails to build because of a different error, i always recomment clicking on the clear buttons to see what errors remain
Yes I am on 2019 unity, but also I dont have the udon sharp package and when it was imported it just gave me errors
nvm found it
interesting... well, both of those errors are mentioning that it is looking for udonsharp files but cannot find them
ah, cool cool
ill try importing it but i dont see why it needs it
the 8ball pool prefab uses udonsharp aswel as many other prefabs as udon sharps makes creating udon scripts a lot more simpel and maintainable (if you have a programmer background)
kinda makes it simpler, it also gives more control to some things, but the biggest one is that it doesn't compile with every change making it wayyyyy faster for larger scripts
Is there a more elegant way of achieving a one way walkway with udon? in SDK2 I used a plane with mesh collider so you can walk through it one direction but not back.
a one way collider? you dont need udon for that, you can still use a plant with mesh collider
Yeah, I know. but it's not very clean
seeing if there was a better method with udon
when you walk through the back side of the collider, it shoots the player forward a bit :\
well there are other ways you could do in udon but it will add a lot of extra complexity
one thing is you could have a trigger collider, and when you enter it, you can enable the wall collider so you cant go back
altho i would still think the plane collider is a better option as it requires no additional code just basic unity functionlaity
Yeah, I just dont like how it pushes the player out because of the capsule colider. I think a fix I did a while back was made the plane real short, just short enough to stop the player but not shoot them forward when they walk over it
but just felt hacky and took some time to getting it just right
i see yes that do be a bit hacky
should be
System.Boolean.op_ConditionalOr
how would one set up a button to toggle objects?
Look into the vrchat examples folder and open up the scene
Are there any resources on how I could get objects to trigger unique events when colliding with box collider triggers?
I've been looking online, and I'm sure its possible with Udon, but I'm having trouble implementing it as
Triggers only seem to work once.
As an example, having to set multiple objects on different pedestals in a certain order to open a door or something.
Has anyone had any issues with VRC chairs in SDK3 since the update? I have a version of my map uploaded before the update, and chairs work perfectly fine. The transfer over to 2019 went well, except now it seems as though chairs are broken for me. I'm able to enter the station, but I can't leave. Can't respawn, either. Have to force quit the client. Disable station exit isn't ticked, and unless I'm missing something, the udon graph seems fine.
Are you trying to use a custom seat animation?
Nope, just the stock VRC chair prefab slapped down.
Hmm, I had a similar issue with chairs in one of my worlds a while ago
I fixed it by ditching the default animation controller and making my own
not sure if that would help you though
Suppose it couldn't hurt looking into a bit in the mean time. Better than what I've got, anyways. Thanks for the input!
Making a custom controller isn't hard by the way
All I did was make a new controller and drag the sitting animation into it
I'm trying to make it so that the first person to join an instance is teleported to a location when they first spawn in. This is the graph I've tried so far but it doesn't work, so what should I do?
I also realised that if it DID work, the master of the instance would be teleported when anybody joins which isn't ideal.
for the last thing do a check if joined player is localplayer
Hmm, It gets all the way to the TeleportTo but doesn't seem to work
I placed logs after both branches and at the end
and all 3 of them went off
A couple things. First, is your UdonBehaviour crashing? Check your log. I wonder if it's getting a null reference in the instance input
Second, this is how I've been taught to define "first person to join the instance"
The only way to be the owner of an object on Start is to be the first person
It's logical and reliable, even if it feels a little technical
Checking for isMaster on join should also work, as far as I know, but I dunno if master has some other weird things about it
is there some kind of teleport prevention at the beginning?
I've managed to get it working on a button without issue
No prevention, no.
Try adding a second Get LocalPlayer node and use that for your TeleportTo node, instead of re-using the one you have twice
If that makes a difference, then that's a bug
Does anything else look wrong about what I've done so far?
I'm not fully sure how start works but from my understanding it should be good for this
No, it looks alright. I'm not super sure how VRChat determines isMaster, or when
but as far as I understand, yeah that should be working
Hmm. Trying a new animation controller didn't fix anything. I'm at a complete loss on what else to try. Been having some other issues as well, so I've already gone through the usual. Re-installed the unity hub, unity itself, the SDK, etc.
It didn't
I have a flying vehicle with two vrc stations as a child so that people can ride it. However the model is on an animation loop and is jittery. A added a rigid body to the vehicle and interpolation but its still an issue. Does anyone have a solution? I checked kinematic as well and it didn't solve the issue either.
Do you have UdonSharp?
and do you care how smooth the turns are?
If by jittery you mean it's a frame behind, then you probably need to set the update mode of the animator to "animate physics"
that will cause the animator to update earlier in the frame, and will give the station a chance to get the correct position when it updates later
It turns out, you can't teleport from the start event
The reason I'm asking is because I have a script from an old project that makes an object move from checkpoint to checkpoint in a cycle
but it doesn't do smooth corners, it just snaps to face the next checkpoint
Its not so much the corners...
when its slow yes
It doesn't matter what speed you set the script to
Rigidbody and interpolation should be there though right?\
no its on an animated loop
why do you have a rigid body then?
because I read that it may solve the jitter problem 🙂
great thanks
It's not hard, just import the udonsharp package
to unity?
yeah
all you have to do is put the script onto the vehicle
@grand temple Can you see anything wrong with this graph? It's designed to teleport the first person in the instance to a different location than the rest
The context is that the map is a boat, and the first person to join will always spawn behind the wheel
sounds like start is too early. Try changing the spawn position instead
the spawn point? or starting point of the animation?
That was aimed at me
oops....lol
So there's a period where udon stuff can't happen? how long is it?
no I mean the player itself probably gets spawned some time after start
you could also try a delayed event
Someone earlier suggested to use a trigger that hides itself once the teleport has happened, but I've learned from other worlds that spawning into a trigger doesn't count as entering it
I just realised something
Is the "First" spawn order the first available spawn?
Does anyone have any examples of a slider script? Physical slider, not UI.
Touch Controls Prefabs for VRChat w/ Udon. Requires SDK3.0[Udon] (last tested w/ v2020.4.4p1) and UdonSharp[U#] (last tested w/ v0.18.8). View the README.md file in the package for more information. Models by Yodokoro (source https://booth.pm/en/items/2458051) The model is included with their
theres these
Has anyone had the issue for Quest & Udon that the Quest user crashes if they create the world?
Quest users can join already made lobbies without issues,
But as soon as they are the creator of the world it crashes for them?
I have no idea how to try to debug this either
I see no specific Udon error messages in Unity Console
Any tips?
have you tried removing udon scripts from scene until they can create instances?
I only run ProTV scripts which is the core of the world, Maybe I should try to talk to Architech and see?
are you spawing certain assets for the master of the instance?
what version are you currently using
Latest beta available
and that is it on the map?
Yes (On a test world),
With a box collider as invisible floor so you can stand on it
the demo scene?
Not the demo scene,
Blank scene with
TV
Playlist
A few different playlists
how large are said playlists?
I'm currently trying to make reduce the amount of playlists but Unity takes 30 min to build each time so I thought I'd ask in the meanwhile
I got reports of crashes at 500 items / playlists
Included on a test world with only 2 playlists x 500 items each
Currently building test worlds with 50 items, 100, 250, 500 etc to see if that is the cause of the crash
latest sdk?
Yes latest sdk
ok. i would def inform techn
I'll do that!
Sadly that seems to be broken. I can't look at the scripts to understand how they work.
they work for me. but let me find you another
※English descriptions below VRChatのワールドに配置する、高さ調整機能付きのコライダーギミックです。 スライダーをつまんで動かすことで無段階調整ができます。 「ベッドのコライダーの高さ結局どうして欲しいねん問題」の解決のために作りましたが、いわゆるロリコライダーとしても使えます。やったぜ。 サンプルワールド: https://vrchat.com/home/world/wrld_a3253073-2d3a-4c7e-ac1b-dc8f02ea385d 必ず利用規約に同意の上ご利用ください。
thats the only other one i can think of thats public
hopefully it works for you!
Sadly, it didn't, as the Udonsharp module didn't seem to work. I think I will need to do some experimenting and reading some documentation. I can't do programming so the graph mode is all I can use right now.
I couldn't find anything for my question, so I'm going to ask it here.
I'm currently making the lesson boards. One in English and one in Japanese. I want the buttons that change the language and pictures.
Like, if you press the top button, the English lesson boards will show up. Then you press the bottom button and the boards will change to the Japanese ones. I hope I'm being clear.
Now, I'm trying to figure it out how to do it in Udon. I would greatly appreciate if you can show me how.
Anyone know how I'd trigger an animation for something like a door?
Still cannot for the life of me figure this out. Issue persists on desktop and in VR, and for other players outside of myself - so it's not just a local issue. I tried some other Udon chair scripts, and those are broken in the same way. I'm completely stumped on what to try next.
I'ed suggest looking at a UI tutorial; it would be easier to follow and less time consuming than showing you here. Vowgan makes one on Youtube.
Do you have an uploaded world where this occurs?
A private one I'd used to test, yeah.
World ID?
wrld_24bc5627-a595-45fc-b325-1227884bfb46
There's a button to toggle the chairs to the left of the pool table on the wall, hard to miss.
I've noticed a few more behaviors in my tinkering. Able to jump from station to station just fine. Can interact with your menu, but not respawn. Had an issue where in desktop where if I sat in one chair and jumped to another, any time I'd open the menu, the camera would snap to the right and lock in place.
Yeah wow, this is pretty weird.
Do you have any other advanced functionality prefabs like the pool table?
And does the station have zero behavior assigned
Not that I can think of off the top of my head. The issue persists in some other projects with even less in them, as well. It does have the base VRC station graph assigned.
I have been having some bizarre issues with the SDK in general, though I've been able to circumvent that. Maybe it's related?
I'd been having this error pop up whenever I launch unity for the first time. Doesn't let me open the VRC control panel.
But if I do anything that forces a compile of udonsharp, or change the API to .net 2.0, it fixes the issue until I relaunch unity.
Might be worth noting that CyanEmu lets me use the chairs in the in-editor build, though I don't know if that would have any relevance.
Okay wow very weird behavior
The scene is technically being unloaded right after you load in
normal behavior when in a world
Your world
Are you on the correct unity version?
Yeah okay it does show the correct build before the player loads in
Just having this debug info up drops my fps by lot when it shouldn't
I would recommend reinstalling unity
Already have. And unity hub.
I am having another error pop up now that I'm looking
Is the... substance engine of any particular importance? Seems like it's causing VRC to fail to load something, I don't know if that's important.
Or tied to the whole ReflectionTypeLoadException error
Removing any other variables from your project would probably help
But typically anything that gives errors should be removed if possible
Gotcha. Well, I did back it up, so I'll just kind of rip and tear things out piece by piece and see if I can make any progress for now.
Appreciate your time, thank you.
hello! how would i go about checking to see if a player is in desktop, and then making it so if they are, they can press E to interact with something?
remove the player in desktop bit. figured it out.
how do i set a bool to true if a custom function is happening?
what do I do if this script is missing? trying to use a video player and the input doesn't have it :/
the vrc url input field is missing and I was told it's a vrchat script
tried to reimport the sdk and all
the input_url just looks like this
I have spent the last 2-3 trying to figure out why this keeps popping up. I was working on a new world perfectly fine able to upload it several times whenever I made an update. but now this is popping up I am signed in to the right account I also have the blueprint ID attached correctly. I have gone as far as delete the old upload and try to upload a new with a new blueprint ID it still pops up with this error message. if anyone can please give me some help that would be great! TY
i dont know the answer for that, all i can say is empty the blueprint id and it should generate a new fresh one, but seems you already tried that, could be an issue at the vrchat servers that are having a hickup
I honestly hope that is the issue I don't want to resurface project from scratch
Need to contact support to have that fixed #vrchat-support
ok TY
You most likely have two world descriptors in your scene or the ID you're using belongs to a different account. You can only publish IDs belonging to the account you signed into the SDK with. If you added random assets or prefabs you may have accidentally added something that already had a world descriptor on it as well, and an ID to a different account. Check your hierarchy or search your hierarchy for "MonoScript" to see all of the gameobjects with a script on it to better hunt for it.
ok thank you
How do I get the height of an avatar with udon? Specifically, can I get the height of the pillbox that represents the player collision?
Also, if anyone has advice for this in U#, that would be great
The collision is always the same Unity Capsule. (Not sure if its 2m or 1.8m tall)
Hmmmm... allow me to slightly rephrase: Y'know when you go to the menu, and hover over a player, it shows a hitbox pill thingy? I want to get that height.
When I refer to "hitbox" I mean the kind Murder 4 uses, not the one that dictates whether or not a player hits their head on a ceiling even though they are super tiny
You have to apply an animation controller to the part(s) you want to change color, then record yourself applying a new color material to it. Once you have that, it can be triggered with Animator Set Bool in udon.
The color changing part is kinda along the lines of changing an avatar's material slot, and it interacts with Udon just like a door's animation controller. Both of which are easily found on youtube
Accessing and controlling an objects animator is incredibly easy through Udon. Here's a short tutorial on how to go about about utilizing it through the example of a basic door. Assets for this and future videos will be available for download over on my Patreon, so if you'd like to work through the assets yourself of simply want to support me an...
Imagine this, but instead of "open" and "close", it would be with "turn red" "turn blue"
Yes. Although, if you want each button to change colors in sync, then there is probably a way to duplicate the animation/animation controller, but I'm not sure how
Is it possible to make a pickup undroppable with right click?
sort of, the way i would do it is attach the mesh to corresponding hand bones and disable is collider globally so its stuck on the persons hand
after “onpickupusedown”
Theft you can disable in the pickup script i'm pretty sure
Nah it is indeed undroppable, I'm just wondering how does that work
ok so, if you pick up the item, right click. it will them attach to the right hand as it is closest. so even if the user drops it. its still going to be on the hand. and with the absence of a collider to pull the object off. it is essentially — undroppable
true
i havent messed with stations a lot. but im pretty sure you can animate the hands of users via stations
anyone any advice when it comes to making water? or how to install the shaders?
so you can use that logic for “onpickupusedown”, you can set it up to “thisstation.UseStation” and have the station use an animator that looks like as if the hand is still up
look up “silents shader water” or if you need it quest, try out “noriben water”
Thanks, will look into it
ty
how would I do a basic if statement in Udon? I'm comparing username to a string and if it returns true i want it to print to a TMP in the world, but i'm having trouble finding an If
In graphs it's called a branch
Ah okay, thank you
‘For’ and ‘Block’ nodes are a mess to read, especially when nested
It’s extremely difficult to follow which node it’s going to roll back to when you reaching a endpoint
Hmmm, can someone point me in the right direction of what this could be?
...
Object reference not set to an instance of an object
Do I need to wait a few frames before accessing LocalPlayer?
Or some BS like that?
Using the "UdonSyncPlayer (Unity)", what's the right way to make it so late joiners get the proper video synced to them?
it isnt doing it out of the box in the prefab.
Also, how can I make it wait to play a new video until all viewers are synced? ...like it worked in sdk2. Currently it just starts playing when the person who loaded the URL is ready, other people sync in much later.
Dont. The prefabs provided by VRChat are very bare bones. If you want a video player that is actually decent there currently is two viable options USharpVideo by Merlin and one by NishaWolfe. Ive also been working on a video player for about 6 months now, because I want to be the top-notch standard, but Im still missing a few key pieces before release.
Well, not using udon sharp in this project so I probably check NishaWolfe's
This is a fundamental problem of Networking: How do you know that all people have loaded the video? Sure you could check how many players there are, and then collect messages from people that have lodaded it. But what if people join while some are still loading...or what if some people just takee forever to load the video? You would need a timeout system, which can work, but most of the time its easier, to just let people "load in late". Like coming late to a meeting, some people have already started seeing the video
Not looking for any UI at all though I have my own separate system for controlling what it playing
I think their video player is also U# only
Its practically impossible to build a good reliable video player in the graph, because its simply too complex
Well.. from a networking perspective, how did the SDK2 player do it?
SDK2 works entirely different networkning wise, since it used an Event Buffer. Also the SDK2 player was entirely programmed in C# by VRChat.
right but I mean on a more basic sense, did it wait for a message from all clients, with a timeout?
The SDK3 players simply give you an API, however the API does not take all work from you. So its partially up to you to decide how the video player behaves. The API simply gives you a means to instruct the player to do what you want it to do, but nothing more.
No idea, you cant look at how it was coded.
fair point
I guess I'll go ahead and get UdonSharp, just trying to keep this project as bare metal as I can
If you have experience with both of the players you mentioned, do you feel either of those is better for being able to easily control it from other objects in my scene? basically I have a VHS catalog system and the master of the room can pick up a tape and put it in the VCR
I remember the oollld days when you used to just be able to write C# for VRChat lol... that was dangerous but great
Well the whole reason why I made my own video player is because I dont particularly like how the other players have more complicated public api and are generally "different" from how I approach this problem. I havent looked at either of them in detail, because I dont want to be influenced in how I make decisions in my design.
From my point of view I would obviously suggest to try out both of the players while you wait for my player to release, and then have a look at it as well.
Im confident that my architecture is pretty robust, but video players are just simply so complex in their emerging behaviour, that its impossible to ensure smooth operation in any and all cases. So yeah...just try out the available options and decide which one you prefer I guess.
thankfully my use is pretty dang basic, so I wont need any advanced features outside of just loading a video and staying properly synced for all viewers. I'll start with Merlin's for now. Thanks for the pointers and good luck on your player!
If you want I can give you a "pre-release" version that is pretty much just the bare bones player itself. Im done with the core architecture for the most part (AVPro Player proves to be a little bit more special than I anticipated). Im currently just working on a few minor tweaks and extra features.
I'd be down to test for sure! but no obligation, I imagine just about any player good or not will be better than the included prefab and solve my issues
@scarlet lake Here's a quick example how you can cast a ray from a point towards a direction, check if you hit something and then get that object's name.
This is really bare-bones, but you could for example try to get another UdonBehaviour from that object and send it a custom event to maybe make it react to the hit somehow.
That won't execute the "set hitinfo" node
Also you need to check if the object is valid before trying to get anything from it. Otherwise the script will crags as soon as it hits a player
Yes, this is a really quick example how raycasting works. You do want to check for nulls.
Trying to keep it fairly simple
That's awesome. Had no idea raycasting was possible with the current nodes available. Then again, I'm still extremely new.
Good luck with it! 👍
I haven't used Graphs that much myself so there might be even more efficient ways of doing it.
Thanks m'friend. I intend to use that information for a project for sure if I can get advanced enough.
Did they change how syncing sound sources works?
I can't seem to get a sound to play globally
Huh? Sounds aren't synced at all
You have to handle that yourself and you can do it in any number of ways
Sendcustomnetworkevent or synced variables primarily
So I been following the Vowgan tutorial for collider toggles, but, when I search for Get IsOn, its not there. Is there a different way to doing that now or em I just missing something?
how to add delay in udon?
for example i want to add delay of 5 seconds before playing a sound once pressed.
That's sounds like a variable, not a node. So you need to make a bool and you can call it whatever you want. Vowgan called it IsOn. Once it's made, you just drag it into the graph to create a "get" node or hold shift while dragging to create a "set" node
You're looking for sendCustomEventDelayed
Guide on how to use it properly?
Make an event. Call sendCustomEventDelayed. It will make that event happen after the specified time is up
he drags the noddle out of the collider variable, and searches for it
oh that's a property of a uitoggle, not a collider
oh wait, right, I'm stupid and I was using the wrong thing
thanks xD
Yep, just ignore my stupidity >.>
Is Regular Expressions really not a thing in Udon?
Is there a way to get the position/ rotation of the players head? There is the head bone position/ rotation, but in desktop it gets overridden by the animation...
Networking => get LocalPlayer => GetTrackingData(something...Head)
Thanks!
Combat System
The following nodes are Under Review - not working, not recommended for use. We're evaluating their usefulness and they should be ignored for now:
CombatGetCurrentHitpoints
CombatGetDestructible
CombatSetCurrentHitpoints
CombatSetDamageGraphic
CombatSetMaxHitpoints
CombatSetRespawn
CombatSetup
does anyone know if these are still active and can be edited by other players?
Udon offers almost all the capabilities to make your own combat system (except for ragdolling players and the ability to have a properly sized visual damage object (the red vision thing)). So unless you specifically want those two things, you are probably better of making your own, or using one someone else made in Udon.
I am making my own combat system however I was just wondering if those were synchronised in any way to make networking damage easier
I dont think so.
But nobody has really touched those since the dawn of Udon I think...
I'm aware...
I think I've been making a combat system to replace it since near the dawn of udon
🙌 praise be to ctrl+f, was looking to see if scriptableobjects were supported
Hey is there any way to get something like a DrawLine gizmo to show up in VRC for debugging? Or do I need to instantiate a line renderer?
I'm having some trouble tracing the line from an object in hand to an object in the world
Does anyone know how to make a global lock system with udon
Did the Deserialixation event node break for the newer udon? i'm trying to figure out a sync for late joiners and for some reason it swaps the toggle every 3rd join.
Ive been meaning to make a sliding door that stays open if anyone is near it, ive come up with this solution but it doesn't work. Is there any other way or did i make a mistake?
LOUDOOR = true (open door)
LOUDOOR = flase (close door)
(this part works) please @ me
Hm - I recommend you read up on how Arrays work in C#: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/
Arrays are not meant to grow and shrink in size as you work with them. You typically set them to be as large as you could need, and then you update their member values as needed. Instead of growing / shrinking an array, you could simply have an int variable that you increase when a player enters and decrease when a player leaves. That will get you a pretty good count of players in the vicinity. However, if a player leaves the world or respawns while they are inside a trigger collider, OnPlayerTriggerExit is not called for that player so your count will be off at that point.
Also, keep in mind that Player Trigger events will fire for every player in the room whenever any other player enters or exits a trigger, but only the owner of a given object can update its synced variables, so your logic should ultimately be checking whether or not the current player is the owner to only update the synced variables then.
Hey, would anyone know why interaction text isn't showing up in my world? It is definitely not blank, and shows up perfectly fine in CyanEmu, but actually in-game, nothing shows up.
You probably have tooltips disabled in the VRChat settings
Aye, that was the problem lol, thank you!
does anyone know where i can find a similar prefab for this? not the Udon Vending Machine by Karet i found that one already
anyone know how to fix this?
Tysm it was 3 in the morning and I couldn't think clearly, I based it off python behaviours lmao 
does anyone know how to make a lock on a object like the doors in Just B Club
is there an event that triggers when you change avatar?
or any other way to detect when someone changes avatar?
How would I make a script to change the colour of a material in world, so I have these emission lights and I want to change the colour on a slider.
public Material colorChangeMaterial;
public void changeColor() {
colorChangeMaterial.SetColor("_EmissionColor", color);
}
you could use a gradient for getting the color from the slider
public Gradient gradient; https://docs.unity3d.com/ScriptReference/Gradient.html
You can detect when bone distances change. Sometimes people use the same base for different avatars, at which point that method will fail however.
how would I do that in U#?
Well you get the position of two relative bones and then use Vector3.Distance
hey guys i need help.
i was making a avataw, when unity just suddenly crahsed, and I, moron as i am, had not saved the project once. so i lost everything.
but i uploaded the avatar for testing. is it maybe possible to get the project back from VRchat?
because one of my friedns was able to do that
ok, nevermind, it actually saved the full thing. i just had to reopen the scene
Huh
aperarently i had all in one hyrarchy tree, so when i just reopened the scene preset of the avatar, the other things i added were back hhere
Prefabs are assets, and assets dont need to be saved, since they are written to directly. However this is the wrong channel for that kind of question/discussion. @lilac scaffold next time ask stuff about avatars in #avatar-general or #avatar-help and not in udon-questions
yes, i thought that, but this Diescord sevrer is so confusing, where to ask things and stuff, i am sorry
Nah I agree lol.