#udon-general
59 messages · Page 16 of 1
Because the fewer times you establish a variable that never changes, the fewer times Udon has to do unnecessary thinking.
It costs more
I may have the reason it does it, I will try confirm it and let you know
Also, there is not instance linked to your vector and position
If you reference it, it doesn’t have to look it up again because it already know
Instance is self
Okay, I don't use graph, this is why
@cunning mist II hope you dont mind the tag, but here it is doing it again. It did it without me making the change I thought it was.. (I had an idea that it broke when I rotated the teleport location)
Ah,
Can you move?
Yea I can move / constrained to where the model is
so in this case I can move forward to the model and to the right down the hall
I couldn't find one that references this exactly, so you should make a bug report on this and have an uploaded version of your world as a reference that they can visit.
VRChat teleport system is weird, sometimes I see other players between their place and where they should teleport during 1 frame
would the world need to be public?
No, you just need to give them the link to the "Launch" page on the website.
I think, your camera is teleported in this temporary position where your avatar was instead of being teleported at end
it is a bug from the devs
It may be due to player position interpolation
When player gets teleported or move, his avatar moves in temp positions between their destination and where they were.
This is used to make people moving with fluidity in a multiplayer game.
The bug is that instead of moving to the destination, the local script will teleport camera position to these interpolations instead of destination.
when working with UI butttons, is it easier to just give them a collider and do Interact() ? Or is there some weird way you're supposed to hook them up?
current setup doesn't seem to work too too well
Welp, udon just decided to delete ALL behaviors on this item betweeen builds
Multiple Behaviours on a single GameObject is not recommended anyway
By whom?
It can lead to Networking issues...which currently literally doesnt matter, but yeah it should be avoided unless you know exactly what youre doing.
Networking issues? Howso? If I shouldn't be doing it i'd like to know why
multiple monobehaviors is a common unity design method, so i'm not sure why udonbehaviors should be different
The only issue I've found is in Unity's UI you can only pick one udon behavior from a linked object, which only matters if you're liking objects like that. But any other caveats i'd love to know!
PhotonViews are attached to GameObjects. If you tell it to send some message to a UdonBehaviour it wont know which. Which in return means that it will just target the first one it finds, meaning that all CustomNetworEvents and variable syncs might get forwarded to the wrong behaviour. Thats from what I know about Networking, might be wrong.
Doesn't look related at all to my issue though, and as long as you properly source your scripts and don't just seek udonbehaviors it shouldn't be an issue then
plus it also happened to this one with just one behavior
Reimport script and restart unity
So regarding the teleporting issue I have, it seems to be solved or atleast the issue is greatly reduced through being in VR.
@flint urchin reimport all scripts?
Giving it a shot
Just don’t edit anything
Yea, it only fixed a few of them 😦
but whenever I create a program again and re-add the script at least the values are all still there
Oh... sometimes I guess... well this sucks
HI all, I just got a occuls rift today, but i cant find a way to test my world in vr. Im still a new user so i cant publish for testing anyone know what i might be missing
When hitting Build and Test, make sure you dont tick Force Non-VR. If you have Steam VR and Oculus App on your PC those should automatically open which should push the game to your rift
why does this keep going back from 4 to like 30 items?
Does anyone have definitions of what the colors on the Udon nodes represent? (Green = event, blue = action to take, etc?)
Right now, green is event, blue is everything else. Major color update coming soon though!
Thanks!
👍
@cunning mist One other question (I'm making a set of flash cards for myself). Do we have a word for the types of nodes that stand alone? That is, they aren't connected by noodles to anything?
Hmm? You mean the variables?
Outside of variables I don't believe there are any nodes that don't connect to anything. Those are just used to establish a variable that can be accessed with Get Variable. With the upcoming UI update, those nodes won't exist anymore, and will instead be variables within a UI box you can move around and rescale
Okay, thank you! Yep, the variables-- I didn't know those were the only ones that stood alone.
No problem!
@paper hemlock thanks i will check the path i use on the app for builds cause it just stays on the loading screen in a desktop window when i used a path to my oculus directory
@cunning mist Not sure, but I think Comment Nodes also dont connect to anything
Ah, true. They're not great, so I kinda forgot they exist XD
How do you do these things
Idk lol, unity just borks for me a lot XD
Though... reiterating an earlier question:
Presently working on that video lol
As a base though, set navigation to None.
I haven't tried using the Interact button send, perhaps see if it works in game? I typically use SendCustomEvent and just do my button code through there.
how do you send a custom event? Is that in the list somewhere or am I blind
@plush wadi Yep, it's pretty close to the bottom, you may have to scroll.
WHYYYYYY do sync'd vars just never update sometimes???
this is just a log in update() after the owner of an item (who never changes ownership) sets their own sync'd var to 1
it never updates on the other client
Like am I doing something drastically wrong or is there some secret I don't understand? 😦 I can't seem to get any of these things to work but they seem like they should
the one case i've had where synced vars stop updating is if you have too many of them on the UdonBehaviour or too many in the scene, though in either case you should get the obvious serialization errors or "death run detected"
I've seen some death run stuff... let me see if it's in here between when i change the vars
oh, if you have, you probably have too many udonbehaviours in your scene. the "death run detected" stuff will just drop the packets with your synced variables
I tested a max of ~10 udonbehaviours before death runs occured and all variable syncing stopped, in https://ask.vrchat.com/t/how-to-sync-with-udon/449/6 . Though that was with a slightly pathological case of the max 185-byte-per-behaviour synced variables changing every 200ms. Practically you can fit a few more less-frequently-updated objects in the world, though I still think the limit before you hit 'death run detected' is in the low 10s of behaviours
like, 32
10 in a scene? that's it
yes
omg udon is useless
networking is not great for sure
so it's pointless to even try to create a hud system or anything like that
because after 10 players it will break?
it's worth testing for the data updates you expect; I think my 10 behaviour limit is really pathological, but still, 16, maybe 24 players max
that's unbelievably useless
like I'm honestly having trouble fathoming that they put this out even in alpha
my lightly-battle-tested hack around the limitations is to instead treat synced variables as a dumb broadcast medium of 185-byte packets and pack any information I want synced into those
the strategy is lightly documented in https://github.com/hiinaspace/just-mahjong/blob/master/Assets/UdonMultipleAccessBroadcast/Bus.cs
it works considerably more reliably than udon's "sync position" , but costs a lot of effort to do all the byte packing
I barely understand networking at all, i honestly think i should give up with vrchat at this point
i don't know what else to do really.
rewriting their own game for them sounds too frustrating when they're focusing all their effort on making a dumb GUI system to replace c#
You may be best off just trying to reduce the scope of whatever you're building to <8 udonbehaviours, at which the prescribed way of syncing data at least mostly works
I honestly can't believe we're expected to make our own sync busses for a documentation less content creation platform with what the VRChat's team's ticket log looks like rn
I honestly may be best off trying NeosVR
but until then, yeah, we're waiting warmly on the vrchat devs to give us better primitives
on the bright side, if you do get into game networking, you're pretty far down the road to just implementing your game on vanilla unity
yea that's an option at this point too
I mean from everything i've learned about VRchat... It sounds like they don't write documentation on purpose because it would show that their platform is useless.
and they're hoping to draw people in with "pretty easy looking programming gui"
would just be nice to have people be able to interact in a game that's sole purpose is... people interacting...
I'm just upset at how much time I wasted of my life because the Devs refuse to document anything.
Like one line of documentation would've saved me about 3 weeks of work on this. It's lunacy imho.
Can someone send me the code for UdonBehavior. For some reason it deleted and messed everything up.
nvm
is there an parkour in vrchat?
Does anyone know where to get the demogorgen skin on quest
Hello.
I am now thinking of creating a shopping system for my world.
However, I don't know how to connect to the network or open a web browser.
Can anyone tell me?
Okay, I feel completely lost. I havent made a world in over a year, come back, and we have udon. cool, i'll just try using that for a world now. i throw a cylinder on the ground, add a chair and skybox, then hit build and test. spawn in, and im like 100ft tall. Im so lost.
is there a way to set the player gravity actually to zero? I set it to 0 and it seems players still fall downwards and get pulled down
Udon doesn't support lists at the moment right?
maybe you can use a gameobject array instaid?
Indeed I just wanted to check to make sure
i am not sure. but i did read that behavior array was not working and that gameobject array was a fallback
but uhm. i dont even know how i can read out a property of an object in udon 😦
if anyone knows feel free to tell me
This udon behavior turns the object it's applied to into a button that toggles "target1" as enabled/disabled. My question is, how can i input multiple game objects? I can't connect multiple noodles to a single node
from my understanding the graph doesnt interpret multiple flow noodles to the same node so you would have to either chain multiple set active nodes or use block to separate ones
an alternative is to use an array then loop through it
hmm.. thanks for the suggestions, i think i know how to do those writing code but not so much with udon blocks 😄
turns out the 'Interact' node does let you connect noodles to multiple nodes
it just seems "ugly" to me to duplicate all the rest of the code, looping thru array would be much prettier
is there any example of how to do this in udon?
if you look for what object variable you want and pick the one with [] for array
so "game object[]"
Is that all there is to it? I don't need to set the other nodes up to repeat the behavior on each object in the array?
well you'll have to setup the proper for loop for it
i dont have one on hand, just a while loop
https://ask.vrchat.com/t/how-to-loop-over-an-array-and-access-array-elements/192/2 think i found one here
yeah i was about to link it
can any one tell me how to use unity hub to add characters in vrchat
@rapid frigate do you want to create a custom avatar?
@valid basin no i already downloaded an avatar from internet i want to add that avatar to vr chat
that's not really a Udon question, you also need to use SDK2 for that and not SDK3
but in short the things i would do now if i were you:
- make sure the model is properly rigged and bone hierarchy is good
- look up official VRchat documentation on how to prepare a project (once prepped you can create worlds & avatars with it)
- look up one of the many YT tuts that explains the steps to set your character up in unity and publish it to VRC
those sources will explain better than anyone can summarize it in text
hello, hope u are well, I am looking to do a custom seat animation
has teh approach changed for uDon?
i made a Sit controller with a sit animation in there... but I dont see the old file with the OverRide, please guide me on how to change the sitting animation, im jus trying to get them to sit in a simple cross legged pose on the floor
Is it possible to replace the "use" text when hovering over an interaction with something else?
So I got asked this about three times a week since my first video either on Twitter, discord, or what have you, so I made a "Tips" video instead of a "Tutorial" since it's hardly over a minute long.
If you have any questions or requests, don't hesitate to ask them! If you see ...
tfw try to google udon stuff but results are just full of soup recipes?
You can do a lot just with Brackey's tutorials for normal Unity stuff, I've been trying to make a few tutorials but it's far from fully comprehensive. I need to do a music one soon...
i have 40$ for whoever can make me the chair prefab and a little more ($100) for to help with an animation the user triggers, so a state machine for the player to trigger, when he is in the seat
uSharp
lmk
@scarlet lake Don't see why not.
Though if you mean a state machine for the player's avatar, unfortunately Avatar Animation Overrides aren't a feature of SDK3 yet.
you know what, I am going to have to use SDK2, this is for client work, and udon is jus too unstable, im deciding this because all of my references were cleared for the 10th time... after configuration... this is no good. 3 days or work lost... i understand its still early dev, thanks for the help! back to SDK2.. the projects im working on are paid work, and need to work reliably.
is there anything like hangout video player for SDK3/udon ?
No video players are allowed in sdk3 currently unfortunately
They're remaking them from scratch to better integrate with Udon, but that unfortunately takes a bit of time.
does anyone know if the way vrchat determines if you're grounded can cause it to behave weirdly with colliders on a layer that's not meant to interact with them?
Probably, but not certainly.
ive still been trying to figure out that issue. I have a hit box on a custom layer set to only interact with itself, and have it fallow the player (its basically the hit box). It interferes with flying and makes small avatars spin outta control XD
I guess it depends on their ground detection method. In case its a simple CapsuleCast it should still use the right LayerMasks
And @scarlet lake whatever youre doing, something is going horribly wrong. What exactly are you trying to network there?
I have no clue all im networking is strings floats and events
@scarlet lake You might be trying to complete an array with a negative index
hmmm.... theres somthing checked called Queries Hit Triggers which lets raycasts, sphere casts, spheretest, etc. to interact with triggers, and that individual raycasts can override it
wonder if this might indicate somthing....
That would only make it interact with triggers, that doesnt overrule the layer mask
ah right, its not saying the override is for the layer mask, just for that behavior
maybe its because im using a capsule collider?
@shadow tundra Hes not trying to access an array.
That exception is caused by the Networking layer. And its something out of our hands, that is an exception caused by VRChats native code.
I have no idea whats going wrong tho. Some offset is negative. No idea what offset, or how you managed to get it to be negative tho. Maybe the string youre trying to sync is too long?
I have a string that is 59 characters long?
That might be too long
what is the max length/
Well there is no definite answer to that
It probably depends on how much each packet can handle
its getting sync correctly
Thats super weird.
do my synced variables need to be initialized/
If youre using UdonSharp then yes
otherwise they will be initialized to null which will break Networking
at least for reference types that is
ok that might be the issue then
However that should also give you a ArgumentNullException and not ArgumentOutOfRange
hmmm
It might have something to do with it, but its definitely still weird
also im syncing a float for a timer is it better to just sync an int?
I hear you guys talking about UdonSharp do you know if it supports scriptable obj
from my testing, you can sync a string up to 126 ascii chars long, or 42 arbitrary 16-bit codepoints. it'll depend on the other synced variables on the same behavior however: https://ask.vrchat.com/t/how-to-sync-with-udon/449/6
how would i make it to when a player collides with an object that object is destroyed and a sound plays? i have it to where you can interact with it and it would dissapear and play the sound
Does Udon eliminate the ability to create toggles that give labels like "Mirror" or "Sit Now!"? if not how would I? (How would I create these labels, not the toggles themselves)
@vale forum https://www.youtube.com/watch?v=okt50lEBbtw
So I got asked this about three times a week since my first video either on Twitter, discord, or what have you, so I made a "Tips" video instead of a "Tutorial" since it's hardly over a minute long.
If you have any questions or requests, don't hesitate to ask them! If you see ...
Thanks!
How do I interact with Text Mesh/Text Mesh Pro in Udon?
@lusty glade You can't, use UI Text and Canvas instead
Text Mesh Pro is an extra package from Unity
Hello everyone! I hope you all are doing well! 😄
Does anyone know of a good starting point to make a variation of the grapple/item system seen in Hook Junkers? I'm not looking for the actual grapple mechanics, rather the system that enables the grapples upon gripping the colliders behind players' heads.
My apologies if this is a duplicate question, I just haven't seen anything that's on par with the climbing prefab in Udon.
@weak sapphire You can get position of player shoulder with Networking.LocalPlayer.GetBonePosition(HumanBodyBones.LeftShoulder) (for the right replace left by right)
Create a pickup and put a script on it to make it change its position on this place when it is not picked up
🤔 Ah! So the pickup is attached to the shoulders when not in use, right?
I see - figured update was a necessity. Thanks for your help! 😃
No worries, I'll do some digging
Riddle me this.
I have a minimap. The minimap is a single client side object that is set to follow the client player. The item set to follow the player is the parent item of the minimap.
The minimap properly follows each client player, but a child item of the minimap only follows the owner it seems, despite no custom scripts or anything on it 😕
did you synchronize its position?
ah... yup!
that's probably it
the torch ignition's flamability script has it enabled, so that explains why it only follows one player, thanks!
yea, no instantiation is happening. just activating/deactivating.
@shadow tundra hey thanks for the code snippet i have been playing around with picks up and i have been struggling since im use to having the player game object in the editor, I hope once i really get going i can help out in here
I have a game object Udon Behaviour with Synchronize Position set to false. How can I set this variable to True through C#? I tried the following code but got errors: this.gameObject.GetComponent<UdonBehaviour>().SynchronizePosition = true;
are you using UdonSharp by merlin?
Yes
you have to use the typof way to get component
(UdonBehaviour)GetComponent(typeof(UdonBehaviour))
like that
i dont know if you had there link to the github but has some info about things that converted from c#
Question. i want to add a audio track as world audio. Now with adding the .mp3 file to the world in Unity. will that add to the world file size? Not sure how Udon works with it now.
I got something like this, but still got errors.
UdonBehaviour tempVar =
(UdonBehaviour)this.GetComponent(typeof(UdonBehaviour));
tempVar.SynchronizePosition = true;
@proven vessel Ofcourse it will add to your world file size. The audio has to be included in the download. And making the track synchronized is not an easy task, unless you dont care about that.
@chilly aspen What youre doing is redundant. Just do (UdonBehaviour)this
That wont fix the error tho.
gotcha. normally it would be a URL but that is not in SDK3 + Udon yet.
Ye
@chilly aspen https://github.com/Merlin-san/UdonSharp/wiki/examples
i use the bottom example when interacting with scripts
tempVar.SetProgramVariable("SynchronizePosition", true);
have you tried it like that
Ahh I actually see what hes doing now
i think he is trying to get udonSharp scripts to interact with each other
No. Hes trying to modiify the Synchronize Position field on an UdonBehaviour
That doesnt work
you cant change that at runtime
Hmm, so once the instance is launched, that field is permanent?
Yeah
Another question about sycn position.
If a parent has it on, and a child has it on, does anyone notice a bit of lag between the parent and child's movements?
I have sticks with sync position on, and "ignition areas" with sync position on that you can use to light them on fire, but I notice if you aren't the owner, the "ignition area" lags behind the stick location. I'm wondering if turning off the ignition area's sync will fix it.
so just make the parent sync and the children should too? Or do you mean something else?
Sorry I can be thick when it comes to context lol
A child moves with the parent
if the parent is synced, the child will be "synced" as well
@dark raft so will creating another udon behaivour and splitting my string into 2 variables solve my issue?
If anyone is interested you should watch Genie boy on twitch and YouTube
yeah, you might try a separate udonbehavior with just your strings on it
just watch the console for the weird serialization errors, on both the sender and the receiver
since it's possible to not get any errors on the sending/setting side for some values, but the receiver chokes on it
are there any udon compatible pens?
@dark raft yeah I noticed it only shows up on the reciever and also can 2 udon behaviours be on the same gameobject?
yes 2 can
I made a global gameobject and put 3 behaviors on it
Worked untill the sdk made it easier to set
ok thx
Still dont want to make my own pens if I can afford not to X3
Can you reference non udon scripts in udon?
Nope, well, non VRChat components
But you can only use what is provided
Any third party script isn't allowed
there are some third party scripts allowed, you can't reference the white listed ones?
If it’s not in Udon then no, you’ll have to use other methods to interact with it.
i want to take a texture from a camera and print it on a pawn that get spawned. is that possible with udon?
you have the pawn use the render texture from the camera in its material. however, you can't access the raw pixel data in udon if you wanted to do any additional manipulation outside the shader.
Hi, how can I reorder my public variables so they show up in number order?
I think they are ordered by the time of creation right?
Ah yep you are right. Thanks!
I think they are not actively ordered. Its just a side effect of adding them one after another. It would make more sense if they were alphanumerically ordered. but thats such a minor detail, that it probably wont happen anytime soon
¯_(ツ)_/¯
One more question for now... Here, the variable BoxColliders is an array. This current setup doesn't work because Box Collider Set Enabled and Box Collider Get Enabled are only meant for single variables, not array variables. But there isn't a Box Collider[].Set Enabled or Box Collider[].Get Enabled option... how would turn multiple colliders on and off at once this way?
You have to loop through them using a For loop
look up C# For Loops. That might help you out
Thanks!!
can anyone look at my noodles?
i think something should instantiate when i start the world or when an event is fired?
Quick question; is it normal for a custom event to be able to fire off on a disabled object? Basically, I have a button that sends a custom event to like say, cube B. Cube B controls whether or not a sphere will appear or not. But, the problem is that regardless if Cube B is enabled or disabled, pressing this button somehow still fires off the custom event on Cube B regardless if it's enabled or not.
Im still not sure on this, but afaik disabling a GameObject/Component will just tell Unity not to run the normal Update loop on it. Meaning that its still functional, it just wont do anything on its own.
That's unfortunate then. x_x Guess I'll have to do what I wanted to do, differently.
@glossy sky If you dont want to completely restructure it you can just have an if (gameObject.activeSelf == true) check
Worked like a charm with what I was trying to accomplish! Thank you very much~
Just be aware that activeSelf and activeInHierarchy can be different, depending on whether it has been disabled directly, or it is "disabled" by some parent. So choose whichever one you need
Understood. Thank you thank you!
Does anyone know how to setup udon to show on the wall a list of people that's in the world? I just want to make it easy for people that join my world to see if there friend is in the world.
use the OnPlayerJoined(VRCPlayerApi player) event with VRCPlayerApi.displayName to get the name of whoever joined the world, then you can append it to a UIText.text or an array and somehow remove them when they leave.
@oblique sand how do i put them together to the ui text? do i just add them and leave them unconnected?
i don't know what I'm doing wrong i can't get to show names on the wall using ui text. i sized it to the wall.
What do I need to do to set up playing an audio source for On Pickup Use Down? I would've thought I need to designate a specific audio source, but I can't find a means to do so.
You plug in the Audio Source on that Audio Source instance slot?
There's no tether point on the audio source though.
That is a variable. You have to use the node "Get Variable"
Ahh, duh. Thanks
Followup question; What do I need to do so only the local player hears the sound?
That should be the default...
Ahh, okay.
Do I need to designate anything else aside from this to play an audio clip on a held object when it's used?
Theoretically no. But you might want to consider using other means of playing audio. Depending on what you need/want you might want to look into AudioSource.PlayOneShot
What's the difference?
If thats what you want, then yes
Sorry to hassle you again, but I've designated values as public but they don't want to appear in the Udon Behaviour.
Ahh, thanks
How would I go about making an on/off button for world material emissions? I'm attempting to replicate a blacklight effect as much as possible using a light trigger and a possible emission trigger
How do I interact with an animator using Udon? (eg; sending a trigger to it on interact)
Ive just been enabling/disabling bools that trigger transferrals
Gonna need it dumbed down a step or two. No idea how to point it to say to an animator "set transition bool == true"
Nevermind, found what I was missing!
Just a dumb question, but OnTriggerEnter() is supposed to to trigger when another trigger or colliders enters it, right? For some odd reason on my side, OnTriggerEnter() works like a OnTriggerExit().
Also, teleporting while moving isn't supposed to fling you in whatever direction you're walking, right?
You sure you got the correct trigger then?
Also, when you teleport, you retain the same momentum as you had before the teleport.
Yeah
Yup
It's layer 23 (or any unused, really) for all colliders that only detect local players
And then set the physics matrix to ignore everything but PlayerLocal
I think that's it?
Yeah, so double check that the graph is actually compiling with the proper info (or even so, make a new one)
Hm, that seems to be it.
Udon's compiling nonsense even though the program's right.
Greetings! I've just gotten into messing with udon and already hit a snag. I created an elevator script that uses an 'int' variable for the floors. then a script attached to an object that changes the variable onDisable...testing in vrc, the object disables but doesn't trigger the elevator. works in unty though
Can i adjust bloom with a slider? If so, would someone have a script for it? 🙂
Anyone know if it's possible to create websocket connections to random ip addresses in VRC?
Nope
dang. I kept on hearing people talking about websokets over the past few months though. I wonder what that was about then :/
I'm not a vrc world creator atm, but I occasionally tinker with websockets so I thought it'd be cool if I could hook up data from inside vrc into a website. I guess that won't be possible then. rip
thanks for the info though @flint urchin 🙂
There are websockets yes, but not that we can access in game via Udon
oh, so that must of been it. Thanks!
Hypothetical question. Is there a way to communicate the following logic statement to all players? Only the local player has tempVector3 and tempQuaternion defined.
cubeGameObject.transform.SetPositionAndRotation(tempVector3, tempQuaternion)
You can sync a Vector3 afaik. Not sure about Quats.
Alternatively maybe there is a way to deduce the information independant of the client
Morning/afternoon everyone 🙂 So, I've gotten Udon toggles figured out for the most part. I can toggle gameobjects, arrays, colliders, music without a problem. So now I'm interested in toggling....a Post Processing Volume profile. I'd like to swap profiles between "default" and "night mode". I don't see an easy way to do this. Is there something I'm missing?
@vale forum There currently is no interface for PostProcessing in Udon. I heard that is planned tho. You can still do it, using animators. Have two profiles that blend. Then set the blend value using an animator, and normalized time. Then you can just use Udon to set the float on the Animator. The setup is relatively advanced and requires quite some knowledge of Animators/PP Profiles. Maybe someone makes a prefab, I dont have time* for it right now sorry 😅
Thank you for letting me know!!! I wouldn't be at all surprised if there's a prefab for this. I'll talk to the folks in the prefab discord. Thanks for letting me know it's not in udon yet so I didn't go on a wild goose chase! EDIT: For anyone else who had this problem, I ended up doing an Udon GameObject toggle between Post Processing Volume (with night mode) active and inactive. It's not ideal, but it worked for me since my 'default' profile just had a little bloom I was willing to sacrifice.
@fiery yoke I'm attempting to implement your Player Handling system in my world. Ownership of objects seems to be working, but each object's owner is being set to a single player.
[Some Context] - I have a cube that continuously teleports to the owner's position, and all of the cubes are teleporting to the one player.
Is this just an effect of there only being one player in an instance, or have I missed something in properly setting up the items?
By default the master owns all objects
meaning that they will all be teleported to the master
My system can distinguish wheter a handler is actually used or not.
Make an if (isActive) around the teleportation
Thanks. There is still a few things that I havent quite figured out about the system.
Its not 100% tested yet.
Fair enough - it's nearly black magic for comparatively inexperienced users like myself 😂
Yeah...I have to work with the black box that is Networking...so black magic describes it quite well xD
anyone know if it required to set a camera reference in the vrc scene descriptor before uploading a world to vrchat?
no. that is only if you want to change the values of the default camera.
My rank is visitor how can play? I cant join any world!? If i need help where should i go?
There is problem with vrchat but idk how to fix it
Is there a way to set custom interact dialogue like you could with Triggers?
Also how do you manage Udon scripts that deal with the same object? I have a mirror frame with two mirrors in it (an HD and "SD" one), and a button for each. Each button should toggle their respective mirror and force the other off, but it seems like the OTHER udon script is trying to force their mirror to stay enabled.
Are they different names? Maybe you've accidentally set a reference variable to the same mirror?
Most likely it's the latter, because I have two scripts able to deal with the same object.
What would be the node setup for an on and off trigger for material emissions in a world?
question: when syncing variables, does Udon only sync variables which have changed? or does it....like....try and constantly sync all of them even if there's nothing to sync.... 🤢
because it seems like it may be doing the latter and syncing a bunch of useless data that remains the same most of the time, given that adding a bunch of objects which hardly EVER change seems to have added SIGNIFICANT latency to my world
Also curious about that question.
Is there a way to sync an animator-controlled object with Udon?
@hushed gazelle Animation sync is comming soon, but if you have access to each bone in unity, there may be a workaround
What's the workaround?
Also is there a way to add custom interaction text to a button like you could with Triggers? (Eg; replacing the generic "Use" with something more relevant like "Mirror".
I don't know if this is possible to a synchronize position to each bone
@hushed gazelle
hi, is there any way to convert assembly back to udon graph? *fixed the question for clarification
new to this and would like to learn on examples except not many people share graphs with what i want to learn about
I'm not aware of any disassemblers; compiling to assembly is usually a one-way trip because it's hard to tell what a graph (or U# script) would have looked like before being assembled
Re synced variables, there's an OnDeserialize() event that fires when udon has new values, for some definition of "new". I'm pretty sure it doesn't fire constantly, if you have expensive logic in Update() that acts on synced variables, you could move potentially that to OnDeserialize() for better performance
Is anyone else getting a bug in udon where when someone changes their avatar the entire world lags?
ok so it's not just me
Is anybody having problems with a friend list not loading and server lag?
probably the master is lagging possibly
Oh I didn't know the master of the world had anything to do with it o3o
he keeps track of all objects
afaik
don't know
could just be the game hitching on certain avatars loading
hmmm odd, I will keep working on optimizations and hope it is something on vrchats side, though it is annoying when I invite like 12 people to the world
Question about big worlds and distances.
I noticed in the world I am working on, and big worlds in vrchat (distance wise)
The further I get from spawn or 0,0 the more I see myself and other people vibrate a ton.
Is there a way to reduce this? Or is there a way to "hide" open area's from each other so you can place them close together without seeing them
Not sure if this "bug" is udon related or just a general thing but that's what I use
I did bake in the zones, didn't use occlusion yet
well there are design ways around having too much rendered at once
I only noticed the shaking with physics objects when they are using vrcpickup
So, does Udon not support Unity video player component at all?
I see VRC_SyncVideoPlayer is there in the API, but i can't add it.
And the VideoPlayer addon doesn't seem to do anything when I test.
Someone on a forum thread said you can add videos with direct links to mp4 files, say, on your server or whatever, but I can't get it to work. Is it just not possible in SDKV3 yet?
Ah, my apologies.
Thanks Jade, I'll look into having too much rendered stuff
thats fine, they will release an update on when they support it
@silver mountain Do look into occlusion culling and open world zone design.
Gosh, guess that means for now I gotta choose between SDK2 and SDK3 for this world... or wait a while. X3
kinda udon related but not directly - now that there is much more networking involved are there any plans to spread the servers around the world? am i just unlucky being in 250ms lobbies?
yaaa
I will, thanks!
is there a way to detect if a child collider was hit without adding a script to that child object?
sounds like a dubug thing with scripting tbh
debug thing?
@silver mountain In continuation to the (0,0), it has been noted many times when building large worlds. I believe it was either CyanLaser or phasedragon -- I may be wrong on this-- who built a world to show off this situation. The further you are away from the center, the world will vibrate and it goes to hell :D.
ya i think the limit is 5000 from the center isnt it?
Before things starts vibrating horribly to the point of unplayable? I am unsure as I forgot the increment amount. However, I am curious as to how large a world he is building.
Because currently, my udon world size is (-100,100), (-10, 30), (-90, 100). It is not vibrating at all.
Not sure if its on a small size either.
ya this sounds like a distance from origin issue
I was about 1000 units from center when I noticed it
I am giving him information on how to occlude other rooms without having to move so far away
Also, just to make sure. Instantiated objects are "all local" currently and there isn't a way to sync them to "all"?
I haven't gotten to instantiated objects though it might require you to sync the new object spawned in the script itself to make sure it is set to public and synced its position
in the udon graph I have sync position checked to allow for public syncing
not sure how you would do that to a temporary instance tho
I made a fruits ninja styled world in udon, but it works only on Master and is locally only seen by the master. It has a major problem. Sync is off everywhere even though I have those two check marks on the udon behavior. The world is using only instantiating spawners (no Object Pooling). So, I gave up on it.
Object pooling seems to be the way to go currently.
did you try the force recompile method?
I got a question... how would I create a teleporter that works with ontriggerenter?
Maybe some kind of layer check to see if the object is on PlayerLocal, then get local player api and teleport?
Like, what's the proper way to do that in Udon?
@sonic ermine I would use a gameObject, like an hitbox which always get the position of your player, and then when this hitbox hit something, you can use the layer of the box
@sonic ermine I found two solutions to that problem, the "easier" way I documented here: https://ask.vrchat.com/t/player-collision-in-udon/428
I get this error when trying to upload my first sdk3 world (sdk2 worked fine): "the signed in account does not have access" "please sign in with the correct account" https://cdn.discordapp.com/attachments/700884915566149635/714618556586786846/error.PNG
Is there a app for people who play on mobile to vr chat?
I'm assuming this has been reported already, but if I change too many variables in a short amount of time, my Master starts lagging mega hardcore while spamming this in the logs:
2020.05.25 20:46:02 Error - [FlatBufferNetworkSerializer] Caught ArgumentException: Value does not fall within the expected range.
The peers do not receive any further syncs
I've now tried slowing this down to 5 objects syncing every 3 seconds, and by the time I've synced about 20 of them, the console spam I mentioned above is so bad the game looks like a powerpoint presentation
this isn't data that changes very often. it changes once, syncing 6 strings on 30 objects
this is 7.5 kb of data being set ONCE. like, it's really not that much.
@silk marsh from some quick math, you have 256 synced bytes per object, that is larger than the current per object limit for udon.
Additionally, I think there is a bug with strings that start more that 128 bytes into the resulting synced data, which is something to be aware of
Yeah, that's an absolutely useless amount of data...
How would I create an udon event that is set to occur every 30 minutes (or every 10 mins, or every hour, etc?)
That depends on how important it is that it is always 30 minutes after the instance has been created
Not at all important
Well if you do it locally from the master then something that might happen is that two events happen right after each other
like a few seconds after each other
When the old master leaves and the new master joined 29 minutes after the first master joined
I was thinking just locally per player, it's very unimportant/cosmetic
just keep track of a timer variable and add Time.deltaTime in Update
Literally just an air conditioning sound haha
Ohh yeah should that happen for all players at the same ttime
then perform action once the variable exceeds your time threshold in seconds and reset it
or does it not matter if its synced?
doesn't matter at all, it's suuuuuper subtle
you could sync the variable to keep all players in sync, or just let all players handle it on their own. up to you
Alright so instead of adding anything
just a quiet vrrrrrr for ten minutes every thirty minutes or so
literally just a matter of the sync flag and, if synced, not updating locally if you're not the owner. but sounds like you don't need it synced in the first place
Its easier to set a float (endTime) to Time.timeSinceLevelLoad + delay and then check in Update if Time.timeSinceLevelLoad > endTime
thank you!!!!!
I usually have a timeToWhatever variable and decrease it by Time.deltaTime every Update, then perform an action when <= 0
but that's personal preference
I'll play around with btoh. I'm not experienced at using the time class so it will take some finagling
Time.timeSinceLevelLoad is the time that has passed since you loaded the scene/instance in seconds
its literally just a clock that ticks up
deltaTime is the time that passed since the last tick
and then id set endTime to like 30 mins?
30 * 60 because time is in seconds
ahh ok
float endTime;
float delay = 30f;
void Update() {
if (Time.timeSinceLevelLoad > endTime) {
endTime = Time.timeSinceLevelLoad + delay;
}
}
thats what I would do
30f = 30 seconds there correct?
this looks great, thank you both
(can also make "delay" a const; not sure if that really matters in the context of Udon or not)
lol np more important that i get the concept!!
And no Arcanox it doesnt really matter since Udon has to keep all values as variables even constants
have gone from knowing 0 udon and C# to being able to make my own simple triggers in a week thanks to this discord ❤️
So wait, how come its a float not an integer? Is it calculating milliseconds as well as a decimal?
Time.timeSinceLevelLoad is not calculating anything, but rather just counting up. But yeah it also gives fractions of seconds
Ah ok figured as much. So i got a couple of questions as well. Where in U# can i add it to where once a spawned item is collided with a collider, it will be removed? Couldnt find it anywhere
OnEnterCollision() > Destroy(gameObject)
Perfect. Thank you. And then my next question is setting a delay. So that the collider is removed after a second or half a second.
refer to what I wrote chailatte before
how does Udon serialize strings to be synced? is it UTF-8 or UTF-16?
Ok so it is similar. Nice
it seems like it's using UTF-16....all my strings are well under 256 characters long but some are over 128 characters. if it's 256 bytes per object, all these strings would be short enough with UTF-8
but some are failing
(meaning my workaround for the 256-byte limit won't even work....this is utter garbage)
I feel like I set this up right, but it's not working. Where'd I go wrong? 🤔 (set at 5 seconds, to check)
The thing you do in Start needs to be after the branch in Update
OH okay
And you dont really need it in Start since it will just do it in Update. So unless you care about it happening in the first frame as well you can remove that.
But you can ofcourse just leave it in, if you dont want the audio source to play at start
yeah, i want it to wait (delay) at first and not play at start
Then just copy paste it to also do it in Update
that time load + delay math was confusing me, thank you
also I think you want the lower operator in the Greater Than block to be endTime, not delay
Ohh yeah didnt spot that @vale forum
ty LOL ive been sitting here the last 30 seconds like "then what do i use endtime for"
(still unsure why the devs at VRC decided a visual graph was appropriate for a programming language...it's so hard to read)
Because its "beginner friendlier" Kappa
Lua.
Tabletop Simulator uses Lua and it's so much nicer
granted I love C#, but it's such a bastardized version of C# that it's almost frustrating
Got it working!!!
For anyone who is looking for a "do X after X seconds/minutes/hours and repeat every x seconds/minutes/hours" Udon program. Here is your graph
The graph is easier to understand for most people who have never done programming before but for people who have done programming before, its harder to understand compared to actually writing it out
yeah, I find myself severely struggling to read Udon graphs. I end up reading from right-to-left trying to figure out where stuff comes from
we have 1600 lines of U# code in our world and it's not even a quarter of the way done, it would be LITERALLY impossible to do this with a graph lol
^ agree , as someone who has no programming experience it made it easier for me to understand programming concepts/ be able to read C# easier
Lol thats the beauty of using U#. And thanks to the devs for expanding it
yeah, I'm so happy U# is possible, and that someone already went to the effort of creating it. my world project would not exist if U# didn't exist
I would still be using vrcsdk2 if U# didnt exist. The upside of the graph is its user friendly but it is, unfortunately, limited
I wish they had provided a high-level language instead of a graph. I feel something like Lua would be pretty easy for beginners to pick up, much moreso than C#
but it is what it is
and I have my U# so I'm happy 😂
so many possibilities with udon and here i am using it to create working vents and blinking smoke detectors LMAO
Blinking smoke detectors? Why not use an Animator for that?
Mostly for the sake of getting practice. But that idea is actually better ^
Currently just using udon to update a world i already had so i can get used to it. Afterwards, ill be working on a bigger project that will work a lot better using udon.
I wish I could talk more about my project because it's REALLY cool and exciting, but we're keeping it very quiet until it's ready to be released
Hm, about to run an experiment. I'm already predicting that I won't get the outcome I want...
trying to experiment around with disabling GameObjects or UdonBehaviors to stop strings from syncing all the time in order to reduce the latency of other sync'd objects
Disabling networked GameObjects/UdonBehaviour is...dangerous
well, it worked!!!
it legitimately got me exactly what I wanted
I ended up needing a separate object for each string synced, so I have 30 objects to sync, and 120 "sync delegates" that actually have the variable. The syncing works; all 120 strings sync up to 128 characters as expected
the problem was that having them syncing MASSIVELY increased the latency of other synced variables to the point of the world being unplayable
if I toggle off the root object all the sync delegates are under, they stop syncing and the latency drops to barely a second. Re-activating the root object resumes syncing correctly.
Once all players in the world have the initial text sync, the variables don't need to be synced. It's a once-off sync. Unless a player drops out or a new one joins, it's pointless to keep syncing those strings....so this solution will be my best course of action until the Udon sync throughput issues are resolved
Hello everyone. Has anyone tried changing id avatar pedestal using code? I can’t do anything
I am trying to make a seamless portal effect but i cannot figure it out, has anyone done this and willing to share some tips?
Are you willing to learn about VR Stereoscopic Rendering in Unity and Vector/Matrix math?
well my main issue is my lack of shader knowledge
I have no clue how to make a cutout shader that works with vr
I'm more than willing to learn anything
[Unrelated question, sorry]
What would be the most efficient way to only allow an object's owner to pick up said object? My brain's a bit fried and I can't think of the solution 😂
the problem was that having them syncing MASSIVELY increased the latency of other synced variables to the point of the world being unplayable
@silk marsh huh, latency as in time before the variable would actually show up as updated on another client?
is the combat system still not ready? I can get everything to work, but it seems the damaged graphic wont go away
Interesting that it worked though, that's potentially a good strategy, only having a few udon behaviors with synced variables active at a time
@silk marsh huh, latency as in time before the variable would actually show up as updated on another client?
@dark raft exactly. Takes several seconds (sometimes close to 10) with those string sync objects enabled, and sometimes under a second when they're disabled
my laptop's wifi is very spotty, so two peers who are hardwired would probably be under a second consistently
Did you look at the logs? I remember getting the "death run detected" whenever I had too many behaviors
didn't see any errors or anything once I started trimming the strings down to 128 chars or below
only my own personal Debug.Log calls
Even when you had a bunch of udonbehaviors with synced variables active?
I've actually never seen the "Death Run Detected" message. it's usually the ArrayIndexOutOfBoundsException or ArgumentException bugs due to strings that are too long
and yeah, even with those 120 behaviors with one synced string each, never got that message
only got latency on my test peer (my laptop)
That's good to know, thanks
also, CustomNetworkEvents are very low latency. I use that to play a sound on peers, which corresponds with a variable changing. usually the sound plays on the peer ~200ms later but it can take over a second for the variable to change on the peer
so I'm hoping that once we get parameterized events, I can use those to sync the one-time data and then I don't need those 120 sync objects at all
I guess they have the synced behaviors on a queue now, so each network update syncs some subset of the behaviors. I think before when I was testing, every single behavior tried to sync, and the death run detector just dropped all the updates all the time
honestly a lot of my code will probably change with those because I don't need stuff in "sync" really if I can just broadcast an event when something changes. I don't have a lot of realtime updates; just triggered events
I guess they have the synced behaviors on a queue now, so each network update syncs some subset of the behaviors. I think before when I was testing, every single behavior tried to sync, and the death run detector just dropped all the updates all the time
@dark raft yeah that seems to be exactly the case
ive actually been getting death runs when people load in, due to having way too many udon behaviors going on
On the latest SDK from two weeks ago?
i had 2 per rock in my map with a ton of rocks, it seems when an object has an udon behavior it transfers ownership for each behavior for each person who loads in
[Unrelated question, sorry]
What would be the most efficient way to only allow an object's owner to pick up said object? My brain's a bit fried and I can't think of the solution 😂
@weak sapphire in Start() VRC_Pickup.pickuppable to false, then OnOwnershipChange, set pickuppable = Networking.isOwner(gameObject)
that doesn't seem right. all my objects retain their ownership until I explicitly transfer it using SetOwner
if this happens too much too fast, it can start causing a chain reaction. I still dont understand it yet, but i had instances where the death runs dont stop
I'm using the 2020.05.12.10.33 version of SDK3 and have never seen the death run message on either the master or a peer
just tons of latency and the thrown exceptions due to string length
Hello everyone. Has anyone tried changing id avatar pedestal using code? I can’t do anything
up. Help please
I'll give that a go - thanks @dark raft ^-^
Hello, I've got what is probably a very simple question that I haven't found the answer to by googling. I'm using Udon with the graph functionality. I have an object, and I want to check if it has entered a specific trigger (There are multiple different triggers on the scene which do different things). My default idea coming from a unity background was to check for a tag, but I couldn't find and get-tag methods inside my udon searches. So, my workaround has been the below code. Is there a...better way to do this inside of Udon graphs? Or is this about as good as it gets when it comes to branching based on trigger enters?
Wait before I ask my question, is using VRCInstantiate() synced globally or is it local only?
there's no get tag in udon
which is super annoying
Maybe try a "string.StartsWith("ObjectsName")
So you can have the objects called
Bucket 1, 2, 3 etc
@errant pilot Instantiation is not networked in Udon currently. It is planned. So right now its just local
Ok well I just spent 2 hours of coding for something that didnt need to be done. Thank you for that!
Thanks Emma. It just feels a little wrong to add so many levels just to check which thing got entered, but that would work fine enough.
I tried using layers but somehow it changed the layers in game compared to what it is in the editor
Layers are integers
however they are interpreted as bit-masks
meaning that if you say "if (someLayer == 10)"
then thats 0000_1010 in binary
would would be layer 2 and 4
So thats not how that works.
it worked in editor somehow
used layer 19
pretty sure gameObject.layer gets you the layerIndex
Wait before I ask my question, is using VRCInstantiate() synced globally or is it local only?
@errant pilot only locally as far as I'm aware
Hi, I'm having an issue with object pickups not respawning when they fall off world
I have respawn height set and everything
Is this a known Udon issue?
I'm using SDK3 2020.04.17.11.34
@silk marsh VRCInstantiate is not yet networked.
Do the Udon Unity gameobject component connections actually work when in the client? This code works inside of Editor, but fails when I test inside the client. Rigidbody is inside of whitelisted components, so I would think this type of component parameter alteration would work fine in the client - https://docs.vrchat.com/docs/whitelisted-world-components
The following is the complete list of scripts usable within worlds. Components that are not in this list will not work. Unity Components WindZoneVideoPlayerTilemapTilemapRendererTerrainTreeSpriteMaskParticleEmitterEllipsoidParticleEmitterMeshParticleEmitterParticleAnimatorPar...
Yeah that should work. There is other problems surrounding the graph that can lead to it not working.
Thanks, I'll try some more testing around the issue then
This code works inside of Editor, but fails when I test inside the client. Rigidbody is inside of whitelisted components
Not sure if this qualifies as a bug or if it's the intended behavior: When there's a VRC_pickup component on the object, the iskinematic property cannot be altered inside of my udon code, but the starting state inside the editor determines its permanent state, kinematic or not. Taking the VRC_Pickup off the object works to get control back to update that inside of the script. Don't know if there's a workaround to that.
Ohh yeah that is known. Its just how Pickups work
Probably a stupid question, but does the position/rotation sync of an object also sync scale?
How to use Button UI with UdonBehaviour(UdonSharp)
When you press that button, Function not called
I'm trying to make a bottle that pops the cap on use. I think I have the right elements, but it's not working. It should play a one-time particle of the cap coming off, an audio source, and disable the mesh for the bottlecap.
@hushed gazelle If its a pickup you would probably want to use the OnPickupUseDown event instead of interact
Oh duh, that'd certainly help. It's not like I haven't done half a dozen other scripts like that in the past few days either.. 😑
is it possible to make those masks like the vrchat lobby near the mirror. when you let go of them they are attached to your head
Yes that is possible.
can i attach it to any standart bone? i asume it attaches to a headbone if dropped in certain range
so on drop
i need to know who dropped it.
then find the correct bone on that person and set that as parent.
and when dropped outside of a range it should set the transform back to the world?
is that correct
Not quite. Its a little more complicated than that
ok what parts did i miss
Knowing who dropped an object isnt very easy.
Then you cant parent something to a bone
you have to make it track the bone
i can't parent it to the bone because of scripting restrictions?
Kind of, yes.
so after i know who dropped it. and it should attach. then i need to find the transform of the bone in an updatefunction and copy the local transform to a globaltronsform and apply on the objectg
There is multiple ways to make an "equipable". But I guess that is one way
@lapis sable - you need to put the name of the custom event you want to send where you have '--'. Right now, when the Button is Clicked, it sends a custom event called '--'. If you take a look at the 'SyncUI' scene in the VRChat Examples folder, you can see this pattern implemented in a few scripts. Take a look at the script on ButtonSyncMaster, for example - that sends a Custom Event called 'OnClick'. The graph then listens for a Custom Event 'OnClick'.
what would you see is the best performant aproach
@floral dove the - on that inspector just means that they have multiple Buttons selected, that have different "strings" as the input.
yes i selected multiple buttons
i solved this problem
OnClick() -> Interect() -> EventInterface -> customEvemt
oh haha! I forgot about that. Sounds like you went the long way around @lapis sable but I'm glad you figured it out.
I hate when I look for udon tutorials many are about the actual food
lol
can i write stuff in the console when debugging?
@teal shale - yes, Debug.Log messages should show up in the console when using Build & Test.
I'm quite new to both world creation and UDON as a whole and I have a few questions as to how I'd implement certain things such as a mirror toggle or a video player, any help is greatly appreciated!
There's a lot of examples and guides on: https://ask.vrchat.com/c/udon/5
However I'm pretty sure that video players are not available in SDK3 yet
Alright, thanks Scionzenos!
@tiny spire - there's a Mirror Toggle example included in the "VRChat Examples" folder. I recommend you read through the Readme in that folder and try out the examples to learn more!
Thanks for the help! I’ll go check that out.
how do you make friends in this thing? everyone ignores me because I'm "the wrong color", what does that mean?!?
So I saw in the udon tag world and the laserdome that the tagger/shooter has the advantage. What they see and tag/shoot on their screen will be touched/shot on their side. The other players will be tagged/shot even if for them the tagger/shooter is further away. Is this a script of some sort that can only be done in udon's script language or is it easier than that? Im just starting Udon, but this has been bouncing in my head for 12 hours at work and thought id ask as im very interested in it.
Surely you'd rather just kick them
This sounds like GMod moderation which was never a good thing lol
as a side note, we can only compare names iirc so if someone did make this system and put a player on the list, the player only needs to change their name and the system fails additionally someone might use the now free name of the 'banned' player and they they're banned
but at the end of the day, you have to add each name to a big list individually and update it with changed name that you'll have to find, ect
it'd be annoying on the world dev's end and just bad for users of the world
no one should ever be banned from an instance of a world they created
Why is my teleport script not working? It looks correct.
I have the target object set properly in the inspect panel.
I can interact with it (I see the interact text). But nothing happens when I click the object
@cunning mist I followed your teleportation video on Youtube, and for some reason it's not working :/ Then again, the variant above isn't working either, so maybe something's up with the SDK?
Does anyone know if putting a vrc oninteract trigger inside another vrc trigger volume is fixed in SDK3? I'm about to report a bug regarding why OnInteract no longer works in vr when it is inside another vrc trigger volume and want to know if this is an issue with sdk3 or not. This bug is also one of the reasons why the photo/stream camera becomes impossible to interact with the buttons while you are inside a vrc trigger volume
Is there anything I can do for an if/else clause? More specifically; If value A matches value B do something, else do another thing.
Nevermind, found branches!
I'm trying to make a button that toggles between two skyboxes. Best I can understand (and may well be overthinking), I've set it up with two cubes that have the materials as references (the game objects). Essentially if the material of the cube with the initial skybox matches the current active skybox material, apply the other one.
@hushed gazelle Can't you just see which game object is active and decide from there? That should be easier
This is a simple toggle of mine (for music, but you should get the idea)
I've cleaned it up into something better using a boolean. But for some reason it'll toggle true->false fine but never toggle false->true.
please help me please friends, but I couldn't do pretty How can I do the character please help me write from dm
Is it possible to rotate a skybox with udon?
@hushed gazelle if the skybox shader supports rotation then yes.
It can indeed.
When i go into vrchat hub or any world the screen being black for some time then it back me to the lobby ( im reduced the graphics to the lowest thing EVER and still not working )
I have a cube GameObject with the following inspector components. The cube is set to layer "Nothing" which shares no collisions in the layer collision matrix. When I create this cube in my scene, my VRChat avatar is still able to collide with this cube. What could be causing this collision?
Do you need a collider for a trigger? If not id just remove the collider component all together and set the layer back to default
The cube won't have a trigger, but it will be colliding with other game objects. I believe the box collider component is required, only that collision with the player should be disabled.
Ah ok then it will be required. Try setting it to a layer that will collide with the game objects, but not the player. I think PickupNoEnviroment is one
That worked, thanks. Seems custom layers aren't rendered correctly.
Is there any way to get a kind of "long term" storage of data?
I don't need long term storage when leaving the map. Just a kind of short term storage when you're there
What exactly are you trying to do @digital orbit
I'm making a keypad. I figure I can make each button send a custom event to an object with a "central" script, once the code matches a certain code, it can execute a certain steps (code was right)
This is pretty easy to do, the only thing I don't know how to do is figure out all the numbers pressed before
So if I could save the data somewhere, I could easily check against it
(A custom event would keep running the script from scratch, in a fresh state, so I can only get 1 number at most currently)
Are you doing it in Udon graphs or UdonSharp?
Udon Graphs
@acoustic delta I came across your prefab actually, I'm looking at the code right now
Hope it helps. There seems to be a mysterious bug right now where you need to press CLR before entering the code or the door will not open, even though it prints GRANTED, and this did not happen back in April...

Lol U# is a bit more reliable atm compared to the Graph since the Graph can do some funky stuff sometimes
Yeah..
@acoustic delta The reason that dataBuffer keeps its data is because it's attached to a perpetual game object?
Yes
Man, that's convenient
I'm going to try to convert your graph into UdonSharp
Does UDON break animators? I have been trying to toggle one all day and it seems to just not want to work
What's the Branch node mean? Is that an if statement?
yes
wrong channel ,sry
nope
Strict rules for content on their hardware. Doesn't allow for content outside of the game/service to be used
Console companies aren't big fans of games with user generated content
User generated content is fine, as long as it's made within the app.
So weird thing just happened to me. I am using VRCInstantiate() on a pickup prefab I made. It works fine but when spawning in but for some reason, the object wont pickup. Works fine when I Test it using "Build & Test" but once I publish the world, it breaks for some reason. Anyone have any thoughts?
But this isn't Udon, so #vrchat-general-2
Instantiate is a bit buggy atm. You need to have the object in the scene or in the scene_descriptor
Damn Instantiate. Will throw it in the Scene Descriptor and see if it helps
Thank you
So I dont think Instantiate works with pickup objects for some strange reason, unless I am missing something
Both objects are both in the scene descriptor and also in the scene itself but it just want to be picked up
@errant pilot I have definitely instantiated pickups before. You must be doing something wrong.
Yeah its strange. Ill show you my code and my pickup object
So I have it setup as a "Button" for the script and the bottom one is the prefab.
As before, if I test the world, it works fine, but as soon as the world is published, the object will spawn, but will not be able to be picked up
am trying my first hand at udon and with importing the sdk3+Udon i get this
the sdk build panel doesnt show up either so i imported the sdk2 as well to see what happens. the build panel shows up but then i get that "can only be one vrc_scenedescriptor error
and yes before this i completely wiped the project of all the vrchat files and the metas
@acoustic delta I rewrote your whole Udon Graph code into UdonSharp
@cold tiger Are you trying to make an avatar with SDK 3?
Nope
World
Stripped my old test world down to basically just a mirror and button with a few object. Cleaned all the missing scripts from old sdk stuff off, imported the sdk3 udon. Replaced the mirror prefab with the one that came in sdk3 and replaced the vrcworld prefab with the sdk3 one. Have done multiple reimports and unity restarts.
I think the thing its missing is from the sdk package
Are you on the right Unity version?
Yes
What happens if you import VRC SDK3 into a bare project?
Ima try that next since wanted that to be last resort
Was your world originally SDK2?
SDK3 stated that it's not compatible with SDK2 worlds, so if your world previously SDK2, it'd be no surprise
Here's instructions
Will try that troubleshoot once i get back to my laptop
ty, clearing the scripting defines got it working again
Is there a list of SDK2 components that are not compatible and (if exists) their SDK3 counterparts?
I have a scene with conflicting components, but can't seem to find them..
@zinc thicket I know station, world and avatar descriptor, ui shape, and video sync are all still in but most of them have been removed like playermods, trigger, ect.
Looks like I missed the World Descriptor and Audio Sources from V2 to V3. I already found all of those, so I was confused when there were still quite a few incompatible things left..
Is adding force to a rigidbody not supported by Udon yet or am I missing something? Trying to use AddForce with Forcemode on Impulse but it doesn't seem to be doing anything
any here who got oculus full body ?
AddForce worked for me in editor. Didn't check in game
@errant pilot to sync position with the pickup script you need to add an udonbehaviour with the empty udonAsset and turn on object sync
So object sync is now a udon script. Good to know
I woul expect a teleport when i interact with this door.
but it seems its not triggered.
any ideas?
You have a gameobject, but you don't extract the transform as a vector3 for the teleport. You can either extract the transform from the door variable or just replace the game object variable with a transform variable
You need to get the transform position and rotation, then plug those into the node instead
Yeah, transform is location, rotation, scale
Is there a way to disable an object from being interactable EVEN after interaction was already setup on it?
From what I saw, once you set it as interactable, you can't set it as not interactable
Disable the collider
it still don't teleport
@teal shale I couldn't get teleporting to work when I used the graph. The moment I used UdonSharp, it worked wonderfully. The graph is buggy basically. You can have it be right in the graph, and at times it won't work, something that will be ironed out in future releases no doubt. But if something doesn't work, it should work in UdonSharp
The graph is currently being reworked and should probably have most of the major bugs get fixed
Yeah those new images look really nice
Disable the collider
That worked, but it seems I have other issues. I need OnMouseDown() to work, but it doesn't work after I set Interactable(), even if I disable the collider
I guess, presumably OnMouseDown() probably uses the collider too 😮
If you have an Interact() you have to have a collider. Recommended to do a collider and check "is trigger".
If your doing a mesh collider you have to make it convex as well
My goal is to only use Interact() when in VR. When on desktop, use OnMouseDown()
But Interact() overshadows OnMouseDown() even if you disable the collider
But why?
I have a keypad, and it doesn't look very good with the interact tooltip showing up on every button, so I want to get rid of the tooltip if possible. I don't think that's possible except if it's not interactable
Hmm welp you could have two sets, one for VR one for Desktop
Hmm
Then that means you could enable or disable each object based on whether the user was in VR
Right?
You're right, that would seem to be the best option here
I'm trying to do a fix for object respawn using Udon
Something like "On update, if [GameObject] is below [Respawn Height], move it to [Start Position]"
Do you think this would work? And how could I do it
It has to check only for Y postion and ignore X and Z to work
You'd be much better off just doing OnTriggerEnter and get any pickups and then move them back to their position
Have a huge trigger collider where the respawn is
This will work, but doesn't exactly scale if there's hundreds of objects. Also preserves velocity, so respawn kinda shoots the object around.
Thanks, I'll test and see what works best
I have a question. There are two GameObjects called cubeA and cubeB in my scene. cubeA has an UdonBehaviour called udonCubeA, while cubeB has an UdonBehaviour called udonCubeB. Both scripts have a function called "CustomEvent".
In another udon script, I have a GameObject variable called cubeUnknown, which may be either set to cubeA or cubeB. The question is how do I call "CustomEvent" on the cubeUnknown variable without hitting an error?
cubeUnknown.GetComponent<udonCubeA>().SendCustomEvent("CustomEvent"); gives an error if it is cubeB.
cubeUnknown.GetComponent<udonCubeB>().SendCustomEvent("CustomEvent"); gives an error if it is cubeA.
Because the player doesnt exist in the editor
So basically it'll be fine when I enter the game?
Should be
@chilly aspen You said your cubeUnknown is a GameObject which can be cubeA or cubeB. Then tell me why you are using GetComponent on it when it is already the GameObject?
Would it not rather be , cubeUnknown.SendCustomEvent("CustomEvent"); ?
But actually, what you should be doing is getting the UdonBehavior of it
Then use SendCustomEvent on the UdonBehaviour
Then it'll work
So rather, maybe something like..
cubeUnknown.GetComponent<UdonBehaviour>().SendCustomEvent("CustomEvent");
Note : Due to an implementation detail, GetComponent<UdonBehaviour>() needs to be (UdonBehaviour)GetComponent(typeof(UdonBehaviour))
You are misunderstanding how classes work. Especially since hes writing that in U#
cubeA can be a type of UdonSharpBehaviour
public class cubeA : UdonSharpBehaviour, would be its own type that inherits from UdonSharpBehaviour
I'm trying to do a collider trigger for pickups like @flint urchin said
this is the collider
this is the pickup
Make sure you check with "Collider Equals" and Null
or else it will break if a player hits it
yeah
like this?
No, instance on Collider Equals has to be the other on the On Trigger Enter
Hey, y'all! I'm currently looking to have a chair with an animation to it when the player both sits and exits. How would I go about achieving this rather than making a button that will enclose the player inside of the chair animation?
This is what I'm working with. I've watched @cunning mist's door video to try and re-apply it to this chair but I'm struggling because everything is set up exactly the same with just 4 other petal animations added so it should work but doesn't. I've spent the last 3 hours on this lol
chair broke somehow..
the chair works fine
its the pistil in the middle, i can sit and exit but i'm wanting to add the animations i made already to the petals to close on sit and open on exit
@urban cape One possible issue is that animators like to think "Oh there's a script on me, that's gonna do all the movement controls instead." Try having the script on a different gameobject with the animator being a public variable instead.
I will try that, the main controller is the triggerButton with the master script on it.
On the pedal object you have a disabled UdonBehaviour, but if you look at the animator Apply Root Motion says Handled By Script. It seems that UdonBehaviour and likely thinks "welp time to do nothing"
Correct, I removed that now and it's still just saying in the idle position. I tried making the triggerButton separately to act as the controller to toggle it on and off and it's still stuck
Ideally, I'd like to have when the 'station entered/exit' it'll trigger close/open respectively
And changing the bool manually during play mode still works?
It does work, but just doesn't switch back, or the idle will go directly to the open state
Or change bool state for the variable, rather
I think I'm going to scrap the button idea for the petals closing. What would I need in order for an event to trigger and animation from the station for the chair to be used?
This is currently how I have it routed, I am still able to sit, just no animation happening
@digital orbit @fiery yoke Found a solution that works.
UdonBehaviour temp = (UdonBehaviour)cubeUnknown.GetComponent("UdonBehaviour");
temp.SendCustomEvent("CustomEvent");
@flint urchin this is what it looks like now, still doesn't work
I can see the object hit the collider but nothing happens
The object script is the same but I changed "GameObject" to a "Transform" variable
You need to get the UdonBehaviour component from the other field and pass that into the instance field on the Send Custom Event
No, you need to look for a Collider Get GameObject
Yes, after the fact I realized I didn't have one but I feel like it may be the sloppiest workaround that I came up with
Oh wait, my bad! Lol @cunning mist & @tropic canyon What I ended up doing was on the VRChair, adding a block that fires both the 'use station' along with a custom event that plays the closing animation. Then on the Seat, using a box collider that was in part with the playerCollider layer I added way earlier in this project the used an 'onExit' to play the opening animation
Again, if there is a more efficient/cleaner way of achieving the same thing, I am so down to use that! Thank you guys for your help! 🙂
i want to make climbing system with Udon.
how to make it? Any idea?
Hey, so I'm trying to make a script that switches out the Animator Controller in a station, but whenever I try it out ingame it seems to be crashing the script. I've got a public RuntimeAnimatorController Variable and a VRCStation Variable aswell, I could potentially send pictures if necessary but it seems to work just fine in Unity.
Anyone know if there's a way to set it up some other way or maybe help me figure out if I'm doing something wrong?
Are Pickup Objects synced by default?
No
you have to add an UdonBehaviour with an empty graph, then check "Syncrhonize Position"
thanks
How do you put your own Unity UI along with the in-game UI menu (the one you get with pressing Esc)?
How would one get player inputs from the VR device? Something like "Input.GetMouseButtonDown(0)" for VR.
What event is called by a player using a vrcpickup item
is it interact?
or is it OnPickupUseDown?
hmm that doesn't seem to work
/// <summary>
/// When the player uses it, also add it to their inventory.
/// </summary>
public override void OnPickupUseDown() {
if (getLocalPlayerInventory() != null) {
playerLocalInventory.addToInventory(type, ammount);
pickUp();
}
}```
I don't get the put away text either
OnPickup -> when the user picks up an object
OnPickupUseDown -> When the user is holding a pickup and presses the trigger/mouse button
OnPickupUseUp -> When the user is holding a pickup and releases the trigger/mouse button
OnDrop -> when a user drops a pickup
yea i'm trying to use OnPickupUseDown but I think someone said I need to have AutoHold set to yes
yea, then that was my oops hehe
@dusk lance Is there something like OnPickupUseDown for non-pickup cases? Like just UseDown.
You mean Interact?!
I'd like it so that when a user presses the trigger in VR, an event fires.
Without interact or pickup, just general case.
Ohh I see. Well no, not afaik
Would be neat tho, you could make a canny for that if you want
Hmm, I'll probably have to search around for a solution. If not, I might just need to bind a pick-up object to the player just to get those trigger events.
You can detect the Inputs with GetAxis and using "Oculus_CrossPlatfom_PrimaryIndexTrigger" or something like that:
https://docs.google.com/spreadsheets/d/1_iF0NjJniTnQn-knCjb5nLh6rlLfW_QKM19wtSW_S9w/edit#gid=1150012376
I'm getting a bug where VRCPlayerAPI.Immobilize(bool) is throwing an error:
2020.05.31 00:54:42 Log - MEEPLOG:: MeepTest
2020.05.31 00:54:42 Log - MEEPLOG:: is imobilizing player:
2020.05.31 00:54:42 Log - MEEPLOG:: PileOfMeeps
2020.05.31 00:54:42 Log - MEEPLOG:: in their hand:
2020.05.31 00:54:42 Log - MEEPLOG:: RightHand
2020.05.31 00:54:42 Error - [UdonBehaviour] An exception occurred during Udon execution, this UdonBehaviour will be halted.
VRC.Udon.VM.UdonVMException: An exception occurred in an UdonVM, execution will be halted. ---> VRC.Udon.VM.UdonVMException: An exception occurred during EXTERN to 'VRCSDKBaseVRCPlayerApi.__Immobilize__SystemBoolean__SystemVoid'. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at VrcSdk2Interface.DžDžDŽDŽDŽDžDŽDžDžDžDŽDžDŽDžDŽDŽDŽDžDžDŽDŽDžDŽDŽDŽDžDŽDžDžDžDŽDžDžDŽDžDžDŽDŽDžDžDŽDŽDŽDžDŽDžDž (VRC.SDKBase.VRCPlayerApi DžDŽDžDžDžDŽDžDžDŽDŽDžDŽDžDŽDžDžDžDžDžDŽDŽDžDžDžDžDžDžDžDžDžDŽDŽDžDŽDžDŽDžDžDŽDŽDžDŽDžDŽDŽDžDž, System.Boolean DŽDžDžDŽDŽDžDžDžDžDžDŽDŽDžDžDŽDŽDžDŽDžDžDžDŽDžDŽDŽDžDžDžDžDŽDŽDžDŽDžDŽDžDžDžDžDžDŽDžDŽDžDžDŽDž) [0x00000] in <00000000000000000000000000000000>:0
debug(getEquippedPlayer().displayName);
debug($"is imobilizing player:");
debug(playerToPickup.displayName);
debug($"in their hand:");
debug(handDoingTheLifting.ToString());
playerToPickup.Immobilize(true);```
I know it's U# but im not seein what i'd be missing if it was in the graph either
playerToPickup.displayName shows the right value, then two lines later it claims playerToPickup is a null and throws an exception, this seems like it may be an SDK Bug
Even the assembly seems fine, this looks like an Udon assembly bug
What the fuck even is udon?
@tall hawk
I don't even know what half those things mean or even are but ok 😄
In short:
People can do cool stuff with it in Worlds.
Basically programming
Hello everyone! I'm slowly getting to grips with Udon, I was wondering if anyone could advise how I might do this - I'm looking to make a kind of walkthrough world, and I'd like to have some sounds that someone can trigger, it plays, but then there's a cooldown for when you can trigger the sound and have it play again
Just not quite sure how to set up that "cooldown timer" in Udon!
Is there a DateTime.Now alternative for udonsharp/udon
Why need an alternative?
Method SystemTimeSpan.__get_TotalHours__SystemDouble is not exposed in Udon
oh
actually I meant TimeSpan
TimeOfDay
TimeSpan time = DateTime.Now.TimeOfDay;
actually i can just use DateTime.Now directly nevermind
not sure why i was working in such a roundabout way
Yeah xD
hmm
this actually gives me a problem, with DateTime.Now.TimeOfDay.TotalMinutes I could do
minutesHand.transform.localRotation = Quaternion.Euler(0f, 0f, (float)DateTime.Now.TimeOfDay.TotalMinutes * 6f);```
to get a smooth rotating arm.
with ``DateTime.Now.Minute`` I would have to do something like
minutesHand.transform.localRotation = Quaternion.Euler(0f, 0f, (DateTime.Now.Minute / 60f) * 360);
but that would snap every minute rather than rotating smoothly
I guess i don't understand the difference between Now.Minute and Now.TimeOfDay.TotalMinutes
i mean they are obviously different setups aswell buts thats because i used both to have the seconds arm snap and the rest rotate smoothly
I dont know if this is the channel I ask this in but what do i need to do to get to sit in a chair
I guess this is a udon question
Ok thank
do inactive objects not get netIDs either?
I thought it was only instantiated objects, but i'm having bugs where chairs that were inactive throw missing netID errors
VRC.Udon.VM.UdonVMException: An exception occurred in an UdonVM, execution will be halted. ---> VRC.Udon.VM.UdonVMException: An exception occurred during EXTERN to 'VRCSDK3ComponentsVRCStation.__UseStation__VRCSDKBaseVRCPlayerApi__SystemVoid'. ---> System.ApplicationException: Cannot create a path for an invalid NetID on Left Hand Chair
at DžDŽDŽDŽDžDžDŽDŽDžDŽDžDžDžDžDŽDŽDžDŽDžDŽDŽDžDŽDŽDŽDžDŽDŽDŽDžDŽDŽDžDžDŽDŽDŽDžDŽDžDžDžDžDŽDžDŽDŽ.DžDŽDŽDŽDžDŽDŽDžDŽDŽDžDŽDŽDžDžDžDŽDžDžDŽDžDžDŽDžDŽDžDŽDžDžDŽDžDŽDžDŽDžDžDžDžDžDŽDžDŽDžDžDžDžDŽ ```
Wut
@plush wadi if the GameObject is disabled at scene load, it wont get a netID until it is enabled
Hello. I was wondering if anyone knew how to make buttons world. I just made a toggle button for mirrors locally and i was working on making a contextual button to work for private rooms for a map im helping make. The only contextual button ive done is through a tutorial and it seems to be local only. Is there a easy way to make it a world button?
PS: im very new to this so i dont quite know all the terminology.
@frozen plover Instead of using "SendCustomEvent" you would use "SendCustomNetworkEvent" with a target set to All.
That will potentially lead to desync for late joiners tho. There is a way to synchronize bools efficiently and correctly, without it being a synced var.
I don't try to get too fancy with syncing with Udon's present state when it comes to networked things, so until that's fixed I just do "what works" and worry about anything else later.
@cunning mist Thank you so very much!
👍
does a vrc pick up work with a collider with isTrigger set?
Yeah iirc
Yep! Just make sure it has children with actual colliders, or you set it to kinematic.
Don't need your pickups falling infinitely
im trying ot make an attachment that makes players able to be picked up in my world.
can you get muted for morse code?
I dont think thats how that works buddy
.... .. / -- -.-- / -. .- -- . / .. ... / . ...- . .-. / .- -. -.. / .. -- / .---- --...
read thet
that
not thet4
You can get banned for any kind of harassment. In any language. Including morse code.
.... .. / -- -.-- / -. .- -- . / .. ... / . ...- . .-. / .- -. -.. / .. -- / .---- --...
then read
it
Just stop.
read it its not harassment
I know, but it can be seen as spam and this is definitely not the right channel for that...
There's a rule not to post the same thing across channels
There. Happy?
ok
this isnt a specific udon question but im curious about what would happen if i put copyrighted music in my vrchat world
not sure on the rules if its allowed or not
https://vrchat.com/legal
Read carefully.
I assumed it was ok if it was a custom world that wasnt published
"For clarity, VRChat does not permit copyright-infringing activities on the Service."
As well as:
" 9. Prohibited Conduct. BY USING THE SERVICE YOU AGREE NOT TO:
violate, or encourage others to violate, any right of a third party, including by infringing or misappropriating any third party intellectual property right;"
Ah, okay
thank you
if two players join the instance at the exact same time is the OnPlayerJoined event consistent between everyone?
Im not sure, but I think that the time at which the OnPlayerJoined event arrives, is depening on the player that is joining you.
At least for some reason the order of players joining was not always consistent
I’m a panda. Hi! Can layered cameras be used? I’m not certain if the culling mask of player’s cameras can be modified. This would be very helpful in creating a world where the players are on a starship with the illusion that it can be steered by remote controlling background cameras for each player. Thanks! Edit: I searched the chat and found a suggestion to use the world reference camera. This appears to work, but are scripts carried over to the player’s cameras from it and does depth work?
I am trying to make a door that rotates but clamps to 90 and perhaps swings back to original position after a bit.. is RotateCubeMaster the right program source or should I just attempt to make something on my own?
Hey guys, i just started to make a huge beach world and i made animated fishes...in unity everything works fine but ingame they just stuck on one position....does anyone have a clue whats going on?
@shrewd mural I am slowly, painfully navigating my way through to what I need lol
Westworld mini
looking good :)
it's coming... i feel like I am dragging a corpse across the finish line
Feeling pretty defeated here trying to get a camera to render under another with the depth value. Any thoughts?
Regular play vs VRC
VRChat is a bit "special" when it comes to rendering
I have a pretty solid understanding of overriding VRChats rendering
however that comes with costly workarounds
and difficulties
Helpful! This would be the main point of the world so anything that could work would be an amazing help
Well you need a really solid understanding of how Rendering works in VR in Unity, what things effect the Camera Rendering Order and how to deal with things such as IPD
If it isnt absolutely necessary, I would advise against it. Especially since it could break at any point
There wouldn’t be any other reason to try this world other than that, so it’s an experiment anyways. What classes would I use to do this with Udon?
None
This is all Unity trickery
The problem with it is that youre rendering the entire scene, and then rendering it all again. So the GPU cost there is roughly doubled
And the Handheld Camera/Stream Camera will not view it correctly
and/or break the entire system
I see. I figured since it runs well with SteamVR there might be a way that isn’t completely out of the ordinary. Better than physics wonkery and jitteriness
What exactly are you even attempting to do?
You can walk around the spaceship, sit down and pilot it, with multiple people.
Because the ship is stationary and the background is just coming from a miniature camera at a lower depth
Using depths does not work in VRChat
you have to use another trick to force them to render in the order you want
But why do you want this kind of setup specifically?
Interesting, is it alright to link a YouTube clip of it in action?
Yeah I think so
I can remove it after too.
So that spaceship is not moving in a "phyiscal" space or what?
Like what is the problem
Yeah the ship is stationary, a set.
So multiple people can walk around in VRChat and still jump, chat etc even as it “moves”
Yes
Well first of all transferring the data there would be difficult
Like making everyone see the same
Yeah even if depth worked there would need to be an independent camera on their instance rotated on the direction of their head
Well no what I mean is
On the miniature ship with physics
if one person controlls the ship
they have to send the data to the other people somehow
Yeah, but with a large slow moving ship, even if it isn’t perfectly synced i think it’s worth the effect
Well in this special case you can achieve that relatively easy I think
Ooh, any helpful links/references in Unity’s documentation?