#udon-general
59 messages · Page 90 of 1
Sorry, I'm kinda dumb, just curious if it was in the works, didnt mean to bother you
It's more useful in backend for vrchat. It's just not really necessary for world creators
loading worlds and avatars is based on your networks speed. if youre talking about storing it. that would be the cache which already exists
I just like everything to load quickly, just seeing if there was any updates, thanks guys, sorry if I'm dumb on this, still don't really understand but I hope you have a good day
direct storage is a new (upcoming?) feature of directx 12 to load files directly to the gpu from ssd. it'd have to be a unity feature and i strongly doubt we're getting support for it for a little while in up to date unity, not to mention skipping the CPU RAM trip isn't really an option for avatars due to safety settings
thay sounds like vram would get exploded almost instantly with the vram trends in this game already
so is this like instructionless support then?
instructionless?
or skipping cpu instructions i mean
Yeah. It just makes loading faster by skipping the CPU step of it essentially
that sounds pretty nice but ram wise - sounds scary right now
Anyone have an greeter AI, similar to just B club?
Attach an object to the players head and tell the character to rotate toward it, and have a box trigger it to activate in front of said character.
^^^
I need some help from someone who creates worlds
Every time I text my world it put me into this type of Spawn loop
And I can't get out of it I can't walk out of it either and the only way I can close the application is when I click the windows button and then The X on VR chat
Please help me cuz I do not know what to do
add collider under spawn
Ok I'm kind of an idiot please explain how and what is that
I haven't even published One World or Avatar please explain to me what is a Collider I only been making this world for three days
is there a vrcworld prefab in your scene?
And the other two days was just a problem filled with moving from SDK 1 then a problem with SDK 2 and now I came 3 thinking that it would help but in all honesty I am stuck now
Give me a second let me sec
Do you mean the spwan
yes their is
if you have meshes. go to them in the inspector and add component “mesh collider”
if you continue falling, put spawn higher
no
OK that's fine but thanks for the help I'll try to figure it out on my own but I will come back if there's a problem
But thank you again for the help
remember to use the right unity version and sdk 3. I don’t know how you had sdk 1
I just had unity and the first SDK for everything on my PC for about a couple of months and then I realised that there was an update and that's why my SDK was not working
make sure unity is 2019.4.31f1
Yes it is I only realised you needed a certain version of Unity when I came to sdk
Yeah it's not working
try uploading the vrc demo scene
Can you just pop onto a screen share call real quick cuz I think it's making my game just go quantum
It fucking crushed
Sorry my language
It just kept dropping me after putting spawn higher to the ground and then going back to spawn again and just keep going faster and faster and faster
no
I did put plain under me by the way
delete spawn and readd vrcworld and try again. what does the scene look like
Basically a box with sci-fi textures on the walls and one of the walls has a gap in it to move on to the next room
And the only thing is in the other room is the TV, TV stand, 4 book block,a tree plant, a shelf and a sofa
i did 4 times
try just uploading the vrcdemo scene and see if that has collider
what is the correct way to deactivate post processing? I've tried two ways so far; deactivating the post processing volume component and deactivating the object that the component is on. both work in terms off turning of the post processing effects, but they don't improve frames. i thought to try deactivating the post processing layer on the camera instead, but i don't know how to reference the player camera or if this will give me the desired result.
Both work equally, so your frame issue is likely something else.
well i uploaded the world without post processing to check, and i get much better frames without it
There should be no difference between having the post processing disabled and having no post processing, so you're likely running into something unrelated.
is there a way to turn off the post processing layer on the camera, rather than turning off the post processing volume?
No, the camera VRChat uses for that is protected and you are unable to make changes to it.
ok i'll look into other causes/solutions; thanks
after further testing, it really seems like it's the post processing layer that is causing the frame drops for me; i uploaded the world again without the post processing layer on the camera and i get better frames. really annoying that i can't access this myself since it's private; you would think VRChat could add the option to toggle the post processing layer on and off in the settings, since they are protecting it. if that option already exists i'm unaware of it.
why would you need to specifically toggle it on the camera as opposed to disabling the components or gameobjects that contain the postprocess volume?
because disabling the post processing volume doesn't improve the frames; only removing the post processing layer will improve the frames. in essence i might as well not even have the toggle, since it doesn't improve performance.
If it doesn't fix itself after loading the DemoScene, go to the menu at the top of Unity and choose VRChat SDK > Reload Plugins
When i toggle on my Collider Toggle it will toggle the colliders off, but once i click it again it will never turn on. Thats when the script looks like this first screenshot. But when I have the "Get IsOn" bool into the "Set enabled" value bool the whole script breaks and im left with these errors. (Third SS)
You can access the the 'weight' of a PostProcessingVolume
your "Toggle" event will only ever turn them off because you're not feeding a value into the "Set enabled" node:
Look at the second SS
There if i put it into it the script breaks and the get the errors shown in the third SS
Yep lmao
Was following Vowgans tutorial and ive double checked everything from my knowledge and I have no clue what is wrong
- Check out https://tryuniverse.com/ and use the code VOWGAN to get $50 off when you enroll. *
Enabling and disabling large numbers of objects all at once is pretty easy, and here I do so using Colliders for a set of couches. All assets are available on my Patreon if you'd like to have access to anything I made during or before the video.
00:0...
hm - can you try renaming the Targets to lowercase targets just in case that's a protected property or something?
Ill try
i'm using udon sharp so i'm not doing it that way
When i did that I get this error no matter what now, whether its plugged in or not
...that was not a reply to you
Changed it back to an Uppercase T and im back to where i was at first
So lowercase "t" breaks it totally lol
ok, I just built the scene locally real quick and it works for me, so there's probably something funky in your setup. Can you show me what your Toggle inspector looks like? Mine is this:
I have a feeling you have that set to get Colliders or something
its not showing VRChat SDK
well now it is
So it worked? You're up and running now?
No
What's the issue now?
Still no control panel. Look at the drop down on VRChat SDK popdown
It looks like you don't have a "Toggle" assigned - it shows as 'None' in your screen cap
Better?
Ah -you've got an older version of the SDK without that shortcut. Navigate to Assets/VRCSDK/Plugins, select VRCSDK3.dll and VRCSDK3-Editor.dll, right click on them and choose "Reimport"
Yeah. What do you have under "Targets"?
Which one???
you should not have multiples of any of the DLLs in your project. You should probably perform a clean install
Ok
How do I perform a clean install?
- BACK UP YOUR PROJECT
- Open a new, blank scene.
- Close your project.
- Delete
Assets/VRCSDK,Assets/UdonandAssets/VRChat Examples - Open your project in Unity
- Import the latest SDK .unitypackage
I got one more question
How do I back up my project
Im not as familiar with unity so Im just asking as much as I can 😆
Make a copy of the folder that contains Assets, etc. You can skip the "Library" and "Temp" folders. I HIGHLY recommend you learn some basics of Unity before going any further: https://learn.unity.com/pathway/unity-essentials
Designed for anyone new to Unity, this guided learning journey is your first step toward gaining the background, context, and skills you need to confidently create in the Unity Editor and bring your vision to life. Experience hands-on learning as you discover what’s possible with Unity and unlock free assets to support you in creating your best ...
You're not doing an isvalid check and you have an empty slot in your array
isvalid?
Ok fixed it, guess it was just the fact that i had an empty one
Thank you
That script is still going to just turn all the colliders on, not toggle them
your going
Get the state of the collider, then set the state of the collider to the state it already is
you need to invert the bool here
i think the node is unary negation or something?
Cant remeber though since in U# you just put a ! infront to invert a bool
They're using the state of Toggle.isOn to set the enabled value of the collider, and triggering this update by changing the value of the Toggle. So it will work as expected.
isOn returns the current state of the Toggle: https://docs.unity3d.com/2019.1/Documentation/ScriptReference/UI.Toggle-isOn.html
Oh right, i misread the graph and though it was checking the colliders. 😅
I have a bit of a technical question as i'm torn on wondering how optimised a certain call is.
I was working on attaching objects to player bones, and was calling VRCPlayerApi.GetBonePosition
A friend of mine warned me that it was pretty bad, as it was doing network calls which are fairly slow. Although i'm wondering if that is true
From the documentation, it says that GetTrackingData gets the vector3 & quart from the TrackingManager's data to the local player, but this isn't mentioned for just position & rotation. Although implied i'm guessing
Here are the nodes relating to Players' positions. For nodes that deal with forces relating to Players, see Player Forces GetPosition returns Vector3 in World SpaceGets the position of the Player. GetRotation returns Vector3 in World SpaceGets the rotation of the Player. GetBonePosition returns Vect...
I guess the main question is then, does GetBonePosition simply take the value of the gameobject that correspond to whichever bone i'm trying to grab, or does it actively make a request to photon/whatever is used to grab the position
and is it bad to have this running on an update loop of any sort, or would i be better off getting that position ever x frames and lerping between each position
my current setup can be fairly expensive on perf considering i may need a LOT of these calls for 80 people in the lobby and i don't want to take any chances of clogging up any sort of network data, as well as having the lowest amount of calls in general
VRCPlayerApi.GetBonePosition ultimately returns the position from the first Animator found on the local copy of the target player's Avatar. This does currently include a call to GetComponentInChildren on the player's GameObject, which is not ideal for repeated use.
So - it's not specifically retrieving anything from the network, but it does require a GetComponent call for each time you want an update. Now that I know that, I'd like to see if we could cache that for better performance.
That'd be fantastic if cached!! But thank you for the quick and perfect answer ^^
I guess on one end i'm fairly happy that it doesn't make any network call, but i can see that going through all of that may hinder performance
For now, i'll only update it on an interval then, it'll most likely be better that way ^^
Hey folks, I'm looking to get all the playerIds of people inside a box collider (in trigger mode) and I'm currently testing out using onTriggerEnter/Exit to collect playerIds manually in an array. Is there a faster method to get all playerIds without requiring to maintaining the playerId array? Thanks!
Nah, I think that’s a solid way to go.
Awesome, thank you!
I need some help, I am wondering if its possible to make an object so only the master of the instance can interact with it
Sure, you can check to see if Networking.get localPlayer isMaster, but why?
oh I am building a world and want to make something only interactable by the master
But why do you want to use the instance Master? You have very limited control over that after the instance is created.
what other options are there for limiting who can pick something up?
You can compare playername
ismaster, isinstanceowner, playername is the option you can use
interesting, ill look into that, thanks!
so if i wanted to use something like this, would i write it like Networking.IsPlayerName[Miyu] if I was trying to check for my name?
I don't know about that method but I use Networking.Localplayer.playername == "something" like this
I'm using udon sharp
got it, i think i understand. and yea i am too. thanks!
I'm a bit lost with a weird bug right now. Player audio gets messed up sometimes and other players start to sound like they are coming from a different direction entirely.
Still trying to reproduce it properly, but not sure where to look.
I'm not using any "SetVoice" methods, so it must be something else in the scene. At least that's what I'm guessing. I also only have one audio listener, if that makes any difference.
anyone know how set this global locking, at moment it set to Local?
Ping me if going Awser this, i trying make it Global Lock doors so that Users can stop people provent access it. atm this set by Collider TP as toggle collider. but Local is works, but i need set this Global so even if other User locks it will not show door other side account
thats issue of this at moment as auto set local not Global
Screenshot is preview my locking system as example i made
do you have an accessive amount of audio sources in the world?
Is it possible to create a hashtable of user identifiers to detect specific users (e.g. how Patreon pledgers get to have glowy ice in Freeze Tag)? The reason for the hashtable is to preserve privacy.
list of player names, OnPlayerJoin compare player.displayName to names in list || generating list dynamically by reading pixels from avatar pedistals and decoding it, reuploading avatar's photo each change of patreon list 
Mayhaps, that could be a thing. Can this really impact the player voices? Do you know a good number of audio sources to limit yourself to?
So apparently there are quiet a lot, probably more than 150.
ye tht would do it. i can’t remember the exact limit youd want to use so id just slowly start removing some until voices start acting normal
i think limit of 80 or 64
Oh boy. This is going to be fun. Thanks for mention that though, don't think I'd think about that otherwise.
ye. im not 100% on how modern vrc audio matrix works but whatever theyre doing is making a fake virtual voice mask that seems to bleed with voice voices and world voices
however. id like to ask if all of those audio sources are playing at once or are they muted until used?
You've lost me. What is a pedistal? And where's punctuation? This doesn't answer the question of hash functions. Can Udon in any way do a hash function of some sort of an ID?
hes describing a complex method of using avatar thumbnails to update in world runtime data dynamically
i think udon has a weird hash function. mainly for udonsharp, but ive never used it. ive only seen one person use it and it was honestly intense to see how they used it lol
Not entirely sure, I'm not 100% familiar with the whole scene. I think most are muted/disabled though, or don't have a clip and are used to play a one shot with a script.
ok, so they probably are all playing in runtime then. oneshots are usually optimal but can also be abused accidentally as it lets you spam clips/voices without control over the clip. if you use long clips. try to .stop the clip when far away
The problem with that is that those can change. I need a constant identifier.
i personally like to assume every game has a 16 real voice count and a 32 virtual voice count, so you can only have 16 clips playing at once but 32 in total in the background. this may result in muted audioclips that are not intended to be muted
you would just have a forloop or cached strings to check for usernames
theres a bunch of ways to do it. its just the hashing part i feel like is a bit odd unless you mean special characters
Damn, that sounds pretty low. It very well could be that. Thanks again, I'll just mess around with it and hopefully can optimize some of the audio sources. Should be honestly easy in some instance because of how freely they get placed everywhere.
ye. if anything, all sound effects like walking or localized ui sounds should be under 1 asource. if you need networked audiosources per players, instantiating would be more efficient and accurrate as the processing would be done based on local and not on other clients. if you have items that make sounds on collision, use one cached audio source and teleport the source on impacts
Pooling audio sources sounds like a good idea here. I'm not sure if I understood the networking part. Do you mean, instead of having a static audio source as a child, you'd rather instantiate it when sending a networked event?
Ahh, I get it. Thanks again. I'll also check out the article, haven't really thought about audio that deeply yet.
@floral dove
If you want help, please provide some more info - like:
- What you did (the more detail the better)
- What you expected to happen
- What happened instead
i want to make a world VRCSDK3 gives version error
I am using version 2019.4.31f1
Sorry, I don't know much about this subject.
@floral dove
Can you tell me what you did, step by step? I can't help with what you've told me.
First of all, I installed the unity version.
then i installed VRChat SDK3 version
I created a new project in vr
I can't access vrchat control panel via unity
I'm getting the errors in the picture I posted.
Thanks for the details. How did you install the VRChat SDK? In your steps you say you did this before you "created a new project in vr". What do you mean that you created it "in vr"?
I'm using translation it's translating wrong
I'm installing by watching an installation video
I'm not doing anything different
what happens when you open the UdonExampleScene from the "VRChat Examples" folder within Unity?
Is it even possible accessing avatar image from pedestal?
what's a good way to have detection over a certain key press/button press on the controller or keyboard?
i'm working on making a flashlight and i want it to be able to turn on and off while held
Hey yall i need help; i need to make a voice amplifier for a stage and i have no clue how to do it can i have any help?
If it's a pickup, you can use OnPickupUseDown, which is the best cross-platform solution.
I can't guide you step-by-step right now, but these are the functions you want to learn about: https://docs.vrchat.com/docs/player-audio
Players have two sources of audio: the voice coming through their microphone, and sounds attached to their Avatar. With Udon, you can change how a Player hears other players' voices and avatar sounds. For example, this graph makes it easier to hear another specific Player, boosting their audio by 5 ...
@floral dove and for keypress on keyboard?
OnPickupUseDown will work for keyboard users as well, it will trigger when they press the left mouse button.
Can i call SendCustomEventDelayedSeconds() inside SendCustomNetworkEvent()? Its working across all clients in build and test but not with real people
That should be fine - by "inside SendCustomNetworkEvent", you mean that the logic is triggered by SendCustomNetworkEvent, yes?
Thats right
@floral dove is there any other way? I want to be able to hold the item in and out of vr and left click picks it up yeah
Could you explain how you'd like it to work in VR, and how you'd like it to work in Desktop?
@floral dove pick up for both, press e on desktop and press button on vr to activate while picked up
Just curious - why not press button on Desktop as well?
what would be the best way for me to sync a moving character in my world that is being moved by code?
I have a wander script that moves it randomly but its random per player
can I just [UdonSynced] the vector3?
@floral dovei guess i'm not familiar with inputs yet, if there's a better way to do this i would love to do it. it's just that left mouse click already picks up the item, and i have to hold that down to keep it selected
is there a way i can lock it like a first person thing?
like, once i pick it up i'm holding it in front of me on desktop like a fps
Set “Autohold” on the pickup to “Yes”. Then it should be left mouse to pickup, left mouse to use, right mouse to drop, hold right mouse to throw.
thank you!
Take a loo at the Udon Example Scene and docs, it has an example of how to do this and other 8mportant basic things:
this is a little unrelated, but now that i have you i was wonder if it's possible to disable light probes for just the avatars, and keep them available for objects?
This scene is ready to Build & Test or Publish, and it demonstrates many common interactive items. Prefabs These objects show off some of the Prefabs included with the SDK which demonstrate default interactions with the VRChat components for Avatar Pedestals, Stations and Mirrors. AvatarPedestal...
thank you, i've read a bit but i must've missed that part
i'm still very new to world making :3
Hm, sorry I’m not really sure.
that's alright, thank you for helping me!
Did I install the wrong version of U#? I downloaded JokeJam 1.0.3 and just extracted the _WorldJam folder into my project. And I installed U# 0.20.3
You’ve got to install the package versions. Check the manifest in packages/manifest.json, copy the top 4 to your manifest
Use those instead of the ones that go in your Assets folder
It may be easiest just to start from the example project and remove the parts you don’t want.
Thanks, I'll just do this.
Hey yall i need help; I want to make a button that doesn't activate or deactivates a group of objects but switches between multiple groups instead.
Example: Button pressed once object group 1 spawns, button pressed twice object group 1 despawns and group 2 spawns, objects pressed trice object group 2 despawns and it starts from the beginning again.
if it's just toggling between two sets of gameobjects, this'll cover it: https://youtu.be/19HMJaHGtqw
Here's a tutorial about toggling either one or multiple gameObjects via a button in udon. Something I forgot to mention in the video, is if you to toggle multiple gameObjects without alternate toggle a second list of gameObjects; either make a random empty gameObject for it to toggle, or remove the second for loop from the script.
Cycling thou...
I would use a for loop and cycle through the groups.
Placing all objects of a group in there own separate game objects.
I'm getting an issue with my script turning itself off, I looked into it, seems like its halting itself because of my use of .Length maybe
//AddToSet is another GameObject
public GameObject[] BranchSet;
//in another part of the script I'm setting the value based on the length of it
BranchSet.SetValue(AddToSet, BranchSet.Length + 1);
Am I using Length wrong? Am I not supposed to use it at all?
Maybe I'm not creating the GameObject list right?
So if say your BranchSet array is currently size 5, if you do BranchSet.Length + 1 its going to add it to position 6 which does not exist (only 0-4 are valid) and will throw an error.
@shell cloak
This may be what you're looking for.
I threw it together really quick, so please forgive me for the spaghetti code.
Thank you :)
You'll want to throw your objects into the array here under the UdonBehaviour component.
So you're saying I can only have the index 0-4, would I be able to insert into the next slot dynamically if 0-4 are filled? or would the size of the set have to be manually set beforehand
I'm not certain what your end goal is so I'm spitballing here.... however what I'd so is to set the value of BranchSet in the inspector to be a high value, and then loop through each item in the array, and only add if its empty.
With your code, no matter how you set the size of the array, it will always try to put it in a position of length+1, but the actual array is going to be from 0 to length-1.
Ay! I think that'll work, thank you! I really appreciate your help
is there a way to give a player non-lateral rotation (so they can be e.g. upside down or on their side) without putting them into a station
No, because generally you dont want to do that because of motion sickness,but since you can just force someone into a station and then do that, I dont really get that argument either. I guess its to discourage it or something idk
Hey folks, is there a difference between the build and test vs actually uploading it to the server? Locally, it all works fine on my machine. In vr with 2 or 3 players (I usually test locally with both 2 and 3 players), Interact() stuff works fine. But the events triggered by SendCustomEvent are kind of hit and miss. Mostly miss. Not sure how to troubleshoot in this case...
Perhaps a better question would be, how do you folks go about stress testing a multiplayer udon world?
The biggest multiplayer test I know is presenting a world at the community meetup
Momo, if you have a moment could you take a look at my previous message about build and test vs deploying on vrc servers? Thanks!
Yes, there are some differences. Notably, you’ll have much more variable ping and latency on syncing
I see.... so perhaps I should have longer delays in order to ensure the data gets sent across eh? I'll give that a go. Thanks!
Ideally, you wait until you have confirmation of all data received if your logic needs to wait
I just went through the vrc api, and I think the closest I can find is perhaps OnPostSerialization? So I should do requestSerialization(), then maybe every few frames after check OnPostSerialization(), and only fire off the event for all players if OnPostSerialization() returns VRC.Udon.Common.SerializationResult.success==true?
So I just did the first event at my world and while it mostly went well, the video player was having issues with it restarting, possibly because it was trying to stay synced. Is it possible to tell the video player 'I don't about syncing, just play this video as best you can for your local user and it doesn't matter if you're a bit behind everyone else'
Because its a problem if for other players it hickups and jams because it can't stay sync'd with the host.
Likewise we had people entering and exiting a room causing a video to jam for everyone as well
If I want to make players ragdoll on death, do I need to use the VRC_CombatSystem class, even though it's not in the SDK anymore? I found Toly65's Udon Combat System
you cant, as the program wouldn't know what event to play first. Instead what you will want to do is grab the arrow from the end of your VRCPlayerApi. TeleportTo node, and plug that into whatever you want to happen afterwards.
That being said, why exactly did you want two interact nodes?
Is it for the loose VRCPlayerApi. TeleportTo node?
no its so i could have multiple teleport points
ah, gotcha. yea, this wouldn't really be the way to do it.
If you want a separate teleport location for each button, just name the transform to something more generic like 'target', and give all your buttons that script. Then just give them the different teleport locations in the inspector.
if you instead want to randomise where they teleport to; instead of using the one transform 'commandDeck', you instead want to use a transform[] to create an array (essentially a list) of all the different locations possible. Then plug that into a transform[].get node, and plug that into the transform.get position and transform.get rotation nodes. The tranform.get node will have an int that will determine what transform in the array it grabs, which you can randomise if you're after that.
Thank u this will help alot kind sir
There seems to be a problem with this code where the last object group only despawns after pressing the button twice
does anyone know why the update event node only works when loading an avatar here?
nevermind, solved i didnt realise i was using distal bones, that my avatar didnt have
Besides occlusion portals. Are there any ways to unrender players avatars with Udon?
good question right here ^ i would also like to know. also is there a way to prevent udon nodes from compiling every time i drag a new noodle to a brick? i have allot and its getting slower and slower with each new node.
anyway to delete a game object after a specified time
@brave granite
thanks ill give it a try
what are you trying to achieve?
Unrendering avatars based on distance from the player or location, messing around with multiple cameras right now. I am thinking of reducing the far clip value on a camera dedicated to just the player layers and have the main camera not render the player layers but I can't seem to get it working.
anyone know of a tutorial on how to detect if a player opened their menu? I know its possible at least before the new ui, i assume its still possible. Just dont know how
you can detect when someone presses the button that opens the menu, but that can be worked around by pressing the UI button on your right controller, then left and then right again (not eveyone knows this though so in most cases it's fine)
Does anyone know what this error means? It's just spamming my console
Hi! Is it possible to access the mesh renderer component of avatars through udon? I would like to set the light probe option to Blend Probes or Off based on where the player is.
I need an object to constantly spin on the Y axis. Somehow can't find a tutorial.
Nevermind: https://www.youtube.com/watch?v=SP4K89z_Qck
This is a basic introduction to VRChat Udon.
This video should always be unlisted.
this happens when connecting a large amount of nodes, not sure what it means
it means it broke
so udon sharp does not work at all for me can someone help me out
?
like when i import it into unity it just gives me 52 errors and no clue whats wrong
Yeah, your graph is too big. Break up your logic into separate graphs.
You can use the JokeJam project for a starter project with UdonSharp which is ready-to-use: https://github.com/vrchat-community/VRChat-Joke-Jam
i already have a world up tho so..
Then you need to post the errors that shown up so we may get to know what is going on
theres 52 of em lol
Post a few first, or all of them if you might
It's likely that sdk version isn't compatible with udonsharp version
Yea, make sure you have the latest version of SDK3
What sdk version you're using?
2021.08.11.15.16
Yea just import the new one
it'll overwrite anything it needs to
wont that fuck up the one im using?
as long as you arent using a super old one that has upgrade steps, no
lets hope
i dont remember which those where, but they're on the wiki im sure
You could still use older udonsharp that could work with older sdk btw
@vivid tartan - (continuing the conversation from #vrchat-jams) - yes, I think it makes sense to eventually move all the open-source projects from the VRChat repo to VRChat-Community
thank you, that way names won't be confusing
i hate names why can't we all just screech to get each other's attention
glad we can see eye to eye on this topic
how can i instantiate an object on interact that will also be synced with other players
Synced objects must exist in the world when it starts. You can use a VRCObjectPool to create these ahead of time and manage Spawning / Returning them instead of Instantiating / Destroying them: https://docs.vrchat.com/docs/network-components#vrc-object-pool
thank you
Is it possible to make network players appear somewhere other than where they actually are?
Like uh
I want to write a custom movement system in a world
can I manually control apparent position of the networked players' gameobjects?
Here's all the things you can do with the Player object: https://docs.vrchat.com/docs/players
I cant think of a way to do what you want - player positions are synced, so you can move them but they will move everywhere.
damn
Okay, thank you
I'm trying to make mario galaxy style gravity, and I feel pretty confident it can be done
just need a different approach then
Good luck! I've seen lots of people try, and you're just fighting VRChat's player controller every step of the way.
Right, I expect to hit the same issues
and thank you!
...you can't access the player's gameobject/transform, can you?
you have to use TeleportTo or another workaround I assume?
No - you can Teleport them, add Velocity to their rigidbody, or have them enter a station and move the station around. I've seen a decent inverted-gravity world that used stations for this effect.
Has anyone used "UseAttachedStation" before?
It doesn't seem to be functioning for me when used on start
Apparently it just doesn't work on start
any way to prevent "gethumanbodybones" from erroring out while a user is changing their avatar?
when testing with 2 clients they are 3/4 times not in the same instance.... any idea why this is? I've tried setting to 0 and rebuilding with the clients open but they still don't always join the same instance.
Are you using the wotld jam kit? I've experienced similar issues when using the world jam sdk version.
yeah, I've found a somewhat odd workaround. When I join with 2 then add another 3rd client, then set it to 0 rebuild it will reload all 3 and place 2 of them in the same instance XD
So the only way to send an event to a specific user is to send it to set them as the owner of an object and then send the event to the owner right?
Correct.
How would I go about making a trigger area for on enter and on exit to then to se parent and to another 9bject or null and the to set position of the trigger object
I can't use my.visual scripting plug in apparently due to a whitefish problem. :(
Or is there way to add my plug-in to the white list as upon doesn't have a extensive documentation from my knowledge
Im trying to make a pickable object using the VRC pickup component but i wanted to know, is this making a local only pickup because that's what i want in the end.
Yes. For synced object you need to also attach VRCObjectSync too
cool thank you. one last question. I set my throw velocity the 0 on both but when i release it the rotation just keeps spinning. What do i need to change for the rotation to remain how it was when dropped
Found some useful stuff about udo triggers so I'll mess around and get back to this chat if I can't figure shit out lol
would you know how i can prevent the rotation it keeps on release. I tried increasing the angular drag but that also affect it when holding it.
If you don't use gravity then you can set rigidbody as kinematic.
Kinematic mean the rigidbody won't be able to receive force from other objects. It will also make the rigidbody ignores static colliders.
thank you, very useful info
OnPlayerTriggerEnter will also run in remote client when anyone enters the trigger.
is there a way to make it so it just triggers locally?
trying to avoid using a button
You see the VRCPlayerAPI output in the same node? That's where you get who entered the trigger. Check if the player is local player then run Teleport node
how can i switch it to that?
i understand mostly what you mean
Drag out from the "player" spot on the node and search IsLocal, then pipe that into a branch
still very new to udon xd
Pretty much ^
alright ill give that a try real quick
what do i do with the branch?
Getting the local player will always return local. You want to connect the IsLocal check to the "VRCPlayerApi player" output of the OnPlayerTriggerEnter, since that's a reference to the player that entered the trigger. Have the branch's white dorito or "flow" connected to the OnPlayerTriggerEnter, then if it's true, meaning they are the local player, pass that into TeleportTo
think i understood correctly
Yep, good to go 👍
👍
been going over udon documentation and am having a hard time figuring out how im to connect these together
i want to trigger the event when a object with a specific tag exits the trigger area and i want to set the parent to null and also set the position and roations of an item that is child to another item randomly using a child count of sorts
or would any one care to help me understand udon better so i dont need to ask for this specific help 😛
what i want to do if even posible with udon is this
grab card out of trigger area
on trigger exit set position get gameobject from parent of player1deck using child index random in range 0 to child count
we also want to set the parent of the card that exited the trigger to null so its no longer in the deck object
example of what im trying to accomplish
thanks in advance for any help Edit im very new to udon but ive used plyblox visual scripting they are very different but i have some idea of whats going on just confused with how things link together
i have a small question
how do i fix invite on quest vr??
I can’t see my invites nor my friend requests on VR
i feel like this bottum half should work but im still not sure how to get the trigger object for the first half
i then want to set the parent of the trigger object to null as in not parent to anything
this is more of a #user-support-old question
im a little lost as to what your code is doing, but you did miss this little thing
im making a card game and the deck has card objects thats you can grab and they start off under the field but 1 spawns at deck zone you grab that card and it then sets the parent to null and then moves a card in the object P1deckzonetrigger to the trigger location to be drawn
deck object has child objects and i return a random 1 to be moved when i take a take out of trigger zone
ill test again with the attachment
is setting a parent to null even a thing? pretty sure that would leave to a bunch of errors, as each object requires a parent. do you mean to set active = false instead?
though setting it to be deactive will effect all it's children
taking the card out side of the child of the parent
gotcha.
i used a visual scripting plugin before and they use null so im sure im doing that part wrong
well currently your code is setting the object that collidered with the trigger to have no parent, not the card itself
isnt the card it self the object that collided with the trigger
what im looking to do is set the parent of the triggered object which is the card in taking out of the trigger zone
to nothing
your moving a random card to a certain location. is it not that random card that you want to change child of?
no
okay, im lost
i want to change the child of the card i used to trigger the event
then it moves a new card into the trigger area
l
when i grab the card out of this area set this cards parent to nothing
the card there is in the deck object and need to be removed so its not counted in the next draw
im glad i did well for the most part but thanks for helping me trouble shoot this
im lost as to what your trying to achieve, aka the broader picture.
From my best guess, you have a bunch of cards, and you want to be able to pick up those cards and place them in one of the blue slots. Then when you place that card on the slot, it grabs a random object and places it there as well... but that's where i get lost. theres no garentee that the next button activated might not steal that card, as it's still a child.
If I were to guess what you want in general, is an object that is a stack of cards. when the player clicks on the stack of cards, it gives them a random card (from a limited list that gets smaller ever card taken). then they can do what they like with that card, such as placing it in one of the blue slots
also no the deck slot will just spawn a larger copy of the card in the same rotation of the card on the deck stand
the deck zone where i draw cards is what im trying to get working at this moment
so far its just setting the parent of the trigger object to nothing that im having a hard time with
okay okay, I'm just trying to get the concept down, so keep it simple.
So when the card is placed, you want a larger version of it to appear as well?
ill get that that later 1 step at a time
the card that is already placed is grabed and then a new card will take its place from the deck as well as setting the parent of the trigger object to nothing
thus the on trigger exit
yea, you don't really want to be changing the hierarchy structure, if you want it to be synced. you probably need to use a VRCObjectPool in this case.
Also it would be onTriggerEnter, not exit. unless you want it to be when they go to pull away the card that it places it
exactly when i pulll the card away i want to move a new card in and remove the card pulled away from the deck.. the card starts a child of the deck so set parent null is what i thought of
none of it works as of yet unfortunatly
okay, I am really getting lost here. Here's what I'm guessing you are trying to do (in order):
- click object and spawn (move from hidden location) a random card
- remove said card from list of cards (not make it a child)
- When player's grab their newly spawned card, then can place it on blue object thing
- When card touches blue object thing, card is replaced with a much larger one that looks cooler
you have the right idea in some way but i wanna stick to the first 2 steps
takinging the card and it being replaced with card that is child of the deck object and remove the child that triggerd event
okai so i have the card set the parent to null
and it works in editor but its not moving the other card i get an error
sorry
This really needs to be done with an object pool. I just see to many issues otherwise. Though I have yet to see a dedicated tutorial on it, this part of Vowgan's update video shows an example of card shuffling, or getting a random card, without any shuffling of the parenting, that will make it a million times harder to do the networking. https://youtu.be/95hk5m6L70E?t=96 (click on link to get exact timestamp)
Open Beta time! This one brings some features for easy shuffling of arrays and object pools, which sounds a bit technical, but makes things that need to be random MUCH easier, like card decks or falling obstacles. You can also now set whether or not something can be interacted with!
I'll definitely be using these a lot in the future.
Join my D...
so i got a deck working with the deck pool and the buttons
is it possible to return 1 card into the deck using a ontriggerenter ?
this is what i tried and it does not work
Only the owner of the pool can return objects, you may need to SetOwnership on the pool's gameobject to this player, or only run this method on the player who owns the pool.
i never set an owner to the pool but okai how would i set the owner to the player interacting with the reset button or trigger
and my original question wasnt answered as so far im the only one testing
thanks for pointing out the pools owner ship as well
(the photo udon code above doesnt work and i should be the owner as im the only one testing currently)
when you say "it does not work" - can you tell me:
- Exactly what you're doing to test
- What you expect to happen
- What happens instead
- i take a card that has already been drawn from the deck
- move card into on trigger enter area (by grabbing and moving)
- return only that card that triggerd the event to return to the deck
id does nothing that i can visually se
Are you sure the function is firing at all? Add a Debug.Log after OnTriggerEnter and log the name of the object that has triggered this.
very possible its not as so far im not ahving much luck with the trigger functions
Here's some info on how to get triggers to fire if that's not happening: https://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html
the most important part:
Note: Both GameObjects must contain a Collider component. One must have Collider.isTrigger enabled, and contain a Rigidbody. If both GameObjects have Collider.isTrigger enabled, no collision happens. The same applies when both GameObjects do not have a Rigidbody component.
well well looks like i needed the trigger object to also have a rigid body ill try it thanks for sharing 🙂
so the rigid body didnt do anything ill run a debug
This is telling you that either the Pool or the Object you are trying to return to the pool don't have a reference to an object. Do you have the reference to the pool set on this UdonBehaviour in the inspector?
For an easy test, use the "IsValid" node to check the collider and the pool, you can then log whether each one is valid.
your correct i forgot to link the pool in the inspector or it disconnected when i was fucking around sorry about that thanks so much for all the help now to figure out how to set to owner of the pool 😛
You can learn about Networking and Ownership in VRChat here: https://docs.vrchat.com/docs/udon-networking
The three main concepts used for networking in Udon are Variables, Events and Ownership. Variables are containers for values - like a number, a set of colors or a 3D position.Events are things that happen at a moment in time.Ownership is the system that decides which user can update a variable, whic...
appreciated
I know nothing about udon or where to get it and how to use it, any beginner tips?
All I know it’s for worlds
And I’m interested
id recommend going over this
there is also a reedme in the project somwhere for udon with some handy examples
Thanks it means a lot
no problem im still fairly new at this my self but have been getting along quite well with a bit of help here and there best of luck
check out the vrchat youtube as well for examples as well
Alrighty
Can you use untrusted URLs to make GET requests in VRChat? e.g:
Udon Card Game
- user makes request to myawesomesite?id=123123&action=new-card-pack
- server processes request, returning a single frame video with info about the card pack
- read frame in udon to update the user side
^ Basically, I'd like to make a card collection game in Udon. But don't think generating a code to copy with collection information would be practical 🤔
You can, but its discouraged.
Use Video Player to play videos.
Why is it discouraged?
Actually, to clarify:
You can make HTTP Get requests, however you cannot dynamically construct URLs at runtime, they need to be created in the editor. The only thing that can construct them at runtime is the VRCUrlInputField, which requires manual User Input. This is the first sign, that using Video Players to do arbitrary Requests is discouraged.
So your concept would only work, if you have a finite pre-determined set of URLs. And then again, its still discouraged.
Ah okey makes sense, thank you for the help 🙂
I have a question so I setup my trigger to also set the owner by getting the owner of the object that triggers the trigger event and it seems to work fine as the next function to return my card to the pool goes off but I'd also like to make sure it's working by viewing the debug
Mind you I've done alot of research in how to make the debug window work and nothing I do works
I go the the launch options and add the debug code and udon debug code then I build and test and try to hit shift 3 and nothing happens
Also is it possible to force stop the player from holding the item with a trigger I couldn't find anything in the input section of udon
I got a issue I don’t know how to fix… my world is uploaded fine but I did some updates to the world and when I uploaded and go into vrc nothing is updated. On the vrc website it shows it’s updated but in game it doesn’t. I even tried reinstalling my windows and android builders to see if that would fix it but still nothing
U# doesn’t support inheritance or nested classes 😭
It does now. Since version 1.0
What
I downloaded it from GitHub today and they both gave me errors
Is there another repo somewhere? The latest release here says 0.20.3 https://github.com/vrchat-community/UdonSharp/releases/tag/v0.20.3
Make sure you are using the latest VRCSDK
If you are upgrading from Unity 2018, follow the upgrade instructions https://docs.vrchat.com/v2021.3.2/docs/migrating-from-2018-lts-to-2019-lts pay specia...
Ohh yeah, sorry 1.0 is still in "Beta" so its not officially out yet
But its so stable that its perfectly usuable. There is still changes being made to it though
Oh okay, so should I just clone the assets straight from the repo?
how do u check two colliders if one of them collided into the other to start an event?
You can use the collision argument to figure out what collided with the object that the script is attached to
collision.gameObject.name for example
im using normal udon im not good with stuff like that
Oh then I don't know how to do it, sorry
Maybe try looking for an OnCollisionEnter node
i have this noodle but it checks every collision in the scene that colloids with the object the udon script is on
If you are using the old method of SDK importing (like for existing projects), you can import the latest beta release from merlin's discord (latest direct link https://cdn.discordapp.com/attachments/888675186256269332/956411728067969054/UdonSharp_v1.0.0b11.unitypackage).
If you are using (or want to use) the new package managed format (introduced in the JokeJam world jam kit), you need to follow these steps (based on my research, not official):
Make sure git is installed (or at least available in the PATH) on your local machine (git-scm.com).
Make a new project (not required, but highly recommended).
Add these packages to your project manifest "Packages/manifest.json":
"com.vrchat.base": "https://github.com/vrchat/packages.git?path=/packages/com.vrchat.base",
"com.vrchat.worlds": "https://github.com/vrchat/packages.git?path=/packages/com.vrchat.worlds",
"com.vrchat.udonsharp": "https://github.com/vrchat-community/UdonSharp.git?path=/Packages/com.vrchat.UdonSharp#1.0.0",
"com.vrchat.clientsim": "https://github.com/vrchat-community/ClientSim.git?path=/Packages/com.vrchat.ClientSim#1.1.3",
NOTE: The # terms specify which tag or branch to use.
Please check the respective repositories for the latest branch or tag that you may want to use, as they may change in the future.
Refocus unity, wait for loading to finish. Save, close and reopen project.
Open “VRChat SDK > Reload Plugins” in menu, just for good measure.
Add "/Packages/VRChat SDK - Worlds/Runtime/Required/Prefabs/VRCWorld" to the scene
Double check SceneDescriptor/VRCWorld you just added to make sure there is a valid spawn element present, add one if not.
Open "VRChat SDK > Utilities > ClientSim" and activate each button.
Open "VRChat SDK > Show Control Panel", login, go to builder script and activate each the layers and collision matrix buttons.
Save and restart Unity in case.
NOTE: Do NOT mix the old and new methods of SDK importing. That will very likely cause issues.
Oh awesome, thanks
you can also load the whole joke jam example project just to try it out. I have to warn you though, its quite crash prone so save often. Theres a reason why its a beta I suppose
I am quite happy with the progress its making, heres hoping for list / custom struct support, even if its local. I would also love to see the blitz commands for fun shader stuff
That would be great
Right now I'm using it to port a Ludem Dare game I made into VRC
oh fun, I seen unity ports into VRC before, its not too bad depending on feature set
But I just hit another roadblock because coroutines don't seem to be supported
oof
Yeah mine is a pretty simple stealth game so it works well in VRC
Most of the actual game is the AI
not sure of your implementation, but you may be able to cheese it with multiple Updates() with state machines
would certainly be awkward to adapt though
lol, well, from what I see asked for in U#, the most wanted features, I don't see coroutines up there very high, so at least take solace that you wont spend all your time porting it just for coroutines to be added next month lol
I hope not 😄
lists seems to be the big one (certain UI elements require it), and of course the shader bois are drooling over blitz and compute shaders
though in typical fashion, they have workarounds for those limits anyways
its just not very efficient
it would be so much nicer if we could write pure c#
but I guess that would be a security risk
yeah pretty much. dont feel like going to a world and having it delete my start partition thanks
Im just happy they hired the udon# guy onto the dev team. I can already see much tighter integration with U# into the official SDK, with many official examples available both in udon graph and in udon sharp, so its not some afterthought
One thing to note is that the worldjam package for U# 1.0 is currently tagged to an old commit and has not been updated.
In the manifest file you'll need to change the # term from wj3 to 1.0-dev-serialization on the udon sharp line to get the latest fixes. This has made things much more stable for me at least.
You can view the commit difference between the two here https://github.com/vrchat-community/UdonSharp/compare/wj3...1.0-dev-serialization
Refactors coroutine into a state machine
UdonSharp does not currently support node type 'GotoCaseStatement'
Bruh
How do I enable the Udon debug menu when I'm using the "Build & Test" in VRCSDK?
I can't see any place to put the --enable-debug-gui argument
it's enabled by default
for joke jam, do0 i have to use one of the assets from the package?
So, im making a club, and i have separate Video players, and the audio sources are being heard, wayyy outside the Maximum audio source zone, im trying to make private rooms for the club and i have the rooms really far away from the club area, and i can still hear the music playing in the club, and vice versa from the private room, to in the club
maybe make a spatial audio listener @proud skiff
are you saying that Disabling Spatial audio causes that?
dont make it bypass listener zones, and shrink zones too
maybe reset the values. i havent seen doppler level or spread like that as my settings
doppler is when the sound/ distance rolls off
spread is how far
ohh okay
hold up, i found something
heres the Video player audio source
and then heres a new audio source i put in the scene
it is audible to listener at 31, but that should be to their range
Okay
if you want the falloff to be even, make it linear falloff
can you select both of the audio sources in the scene?
you can make them separate and shrink the zonews
but if it 2d, doesnt it make it where you can hear it no matter where you are in the world
let me double check my world real quick
okay
I also have these toggle in the room before the Club area for obvious reasons, lol
if you want the spread to be absolute In one area***, you want it 3d, doppler 1, and min range almost equal to max
Okay, thank you
with spatial audio
okay
tag me if you still need help, >w< i hope it helped
okay
i used this for my amusement park which had different music zones
ohh okay
i put loop for background music, only add the attributes that apply to you
oh nuuu
I'll load up the game and make a recording real quick in a minute
ok
so, are these music players using different audio sources, or same ones?
i used my technique to work out different zones for background music and localized roller coaster cart audio ;__;
ahh i reread the OP, the club music needs to be smaller, like bg music
in a local area
imma draw on your picture
Im now only using one audio source
show the world from the top view with audio sources highlighted
/selected
you need a teleporting door
those are all audio sources?
the one on the right is for the club
but even still all the way over in the private room, can still hear it
hang on
wait, im confused, how is there 2 audio players, one per player, but another for the club?
2 separate video players.. one for two different videos, i made sure it worked, they both play differnt videos at the same time
it has a falloff audio
oh
you want to shrink the range
okay
can i see the attributes?
this?
that's the club music?
the spatial is further than the spread you want, the range is bigger
no
that affects the range too
you already have a falloff, the graph is just the rate of falloff
except, i see its flatlined at the top...
meaning its loudest closer to the source
for halfway to its dropoff
what about this?
i can't tell what you're trying to do anymore lol those numbers contradict each other so much XD
Lol, i dont even know what im doing anymore either
this was so much easier in SDK 2
or rather, Audio sources by themselves
get cyanemu first, a unity package that will help you quick play in unity without needing to upload test
nice
lol
but yeah get cyanemu for future projects to save time uploading to test maps
so i remember when i was in SDK 2 now, when i wanted the audio source to only be heard inside the zone, i remember i had to make ir Red like that
so, that method works perfectly
@unkempt seal
I've heard about this before, how good is it?
Basically just like being in VRC in desktop?
I just dont even put the vrc spacial audio component on things. Just check the spatialize checkbox and make sure the spatial blend is all the way set to 3d
Works just fine.
was meant as a reply to @proud skiff
Hase anyone done any testing to see if there is any performance difference between having an a behavior that uses the update tick to run a function every x seconds, VS using SendCustomEventDelayedSeconds to do the same?
i assume SendCustomEventDelayedSeconds is just registering an event an a background update somewhere that gets called so cant imagine there's much difference
If you have no other need for the Update function, it will likely be more performant to use SendCustomEventDelayedSeconds, since that does not require Udon itself to run the logic checking the functionality. The downside is there is no easy way to cancel that sort of call.
Mmmmk. I have no other need for the update event. Just need to recheck something every 30sec or so.
Guess I'll try swapping it out of the update function and if it works fine that way I'll leave it like that.
TY for the info.
The cyan Laser?
no, cyan emulator
Question, Is it possible to access the transform of a VRCPickup onPickup?
you'll need to have an existing reference to the VRCPickup. If you do, you can simply access VRCPickup.transform, yes.
Hi, I am going to try coding some ai stuff to an npc in my vrchat world, should I use U# or can I use python?
a long time ago, there was a python-to-udon, but it has been discontinued
so your answer is yes, you should use u# if you want to code your world logic
Nice, and should I treat it as normal C# ? I know that there are some differences but I can base my code as if I am working on a C# project right?
https://github.com/vrchat-community/UdonSharp#c-features-supported
https://github.com/vrchat-community/UdonSharp#differences-from-regular-unity-c-to-note
there is also u# 1.0, but i's still in development
ok thanks, and one last question, so if I were to use python for example it would not work? I know you said its discontinued but I think there are previous versions which can be used or is it totally unsupported now?
it won't work anymore
Oh
hey guys, does anyone knows how can achieve the camera movements like the video here? I just bought the full body tracking, and wanna record some dance video https://www.youtube.com/watch?v=kpBMRxIL8OU
This dance competition held in VRChat was produced live from within VR, using a self-programmed camera control desk (shown at the end). Contestants had to dance using full body tracking. This upload here has some parts that happened before the event put to the end, in case you want to watch it all. Other than that, it is unedited.
Since I started getting more into tilt brush Im running into a question that i have to ask;
Is there a way for the Tilt Brush audio reactivity to hook on to the Udon Audio Link?
Isn't Tilt Brush an entirely different game?
Google Tilt brush is more of an art software.
It does export these out as fbx files, and there is a tilt brush toolkit to get these into unity with all their materials setup
https://www.youtube.com/watch?v=rZQbYJbAymc
For instance I built this scene in tilt brush, exported it to unity, posed my avatar and ect. Tilt Brush Toolkit comes with a prefab that enables the audio reactivity you see in TiltBrush its self. But this has to be an audio source on the unity scene
Me: "These are all animated brushes in tilt brush. They actually are audio reactive"
Friend: "I wanna see a sea shanty"
Me: "Fine but im not fixing the rotation this time"
Friend: "You dont have to its just a curiosity"
Me: "ASK AND YOU SHALL RECIEVE FUCKBOI"
So my next step is to figure out how to bridge the gap from TBT's Visualizer to Udon Audio Link
Go into your VRCWorld object (VRCSceneDescriptor component) and ensure that there is an item in the Spawns array.
can anyone help me get the debug window to work when build testing ??
ive followed many tutorials and cant get it to work
ive enterted this info like i was told to and then go in game and nothing when i click either lshift 3 or rshift 3 (i have also tried with out the udon part as well)
shit finally found a good explaination Rshift + ` + 3 does the trick
ive been looking and cant seem to find a way to get the player that interacted with the button (interact udon event) as a game object so i can set the owner
the player that interacted with a button is the Local Player
was thinking network but yes that makes sense thanks 😛
question i want to instantiate a object over the network from my resource folder is that possible ? not having much luck find blocks to help with that
I'm trying to lerp an object's scale from 0 to 1 over time, and ran into the problem of coroutines not being supported. What's another way I can do this?
you can animate the object scale and run the animation when you want it to happen
Right on, sounds good thanks!
everything is working except the destroy function ive tested with debugs.
why wouldnt the object be destroyed ?
Networking.Destroy is deprecated. You can use an Object pool to spawn /return synced objects
im cloning an object and need to destroy the clone
If u want to know what it is I'm trying to do
i have 2 my card play area and a larger area that i clone the cards to as its a yugioh game world
there has to be a way to destroy an object or unload
how are you cloning it?
(the video you posted is too low-res to see anything btw. Also appear to be upside-down?)
ill send a better 1 one sec
If your object is synced, use an Object Pool (https://docs.vrchat.com/docs/network-components#vrc-object-pool)
If it's local-only, use Object.Instantiate and Object.Destroy
I'm using an object pool for the deck but I clone the card in the video example I'll show
at the top i use instantiate to clone the card as seen
everything works perfectly but i cant destroy the clone since the destroy function is not working
ill check out the object idea thanks
cant find object. instantiate in udon or destroy
local should work fine
How do I go about making uuuuuh... Door opening IN SDK 3 For worlds? I already have animations and/Or Controllers.
(Sorry, accidentally recorded this one in 1080p, whoops)
Two of my oldest videos, Contextual Buttons and and Door Animations, have both grown rather outdated, so I've combined the two into a brand new video to go over them!
Full Tutorial Playlist:
https://youtube.com/playlist?list=PLwEtUGCdQX7HMkFCVxiNvO4DS2CmHWbe6
00:00 - Intro
00:42 - Animat...
You could also Check if the player enters a collider as well, but for a more conventional door a button will do just fine
quick fix def not optimal for obvious reasons 😛
Question, Does "foreach" exist in the Udon Graph?
awesome! thanks a ton
I'm not trying to do anything related to doors
but I found a part of that video useful however it didn't work
I've made a button that when pressed changes my skybox material
though I want it to change more but those are other scripts behaviors which I'm trying to get triggered at the same time
and they just won't
Any ideas?
How do I change my name on vrchat
Wrong channel also I feel you'd find your answer from Google
Hello, can someone point me in a direction how to use SetProgramVariable in UdonSharpBehaviour?
It seams not to work for me. But my Property works in the unity inspector.
Here a short version of my code:
As I struggled to find a complete, easy to follow answer to the question about "object that faces the player constantly" I thought I'd post it here should it help anyone.
for us newbies, is very hard when we ask stuff but we get half-mouthed answers that assume things. Let's help each other when we find a solution!
I made a tutorial a couple of months ago on how to make a button that changes the skybox each time it's pressed.
Might help: https://youtu.be/yC9h-51jvBg
Here's a tutorial on how to make a cool little button that switches the skybox of your scene when clicked. It cycles through a list of skyboxes each time, and I've included how to do this both locally and globally.
This works really well as a day - night toggle, or combine it with some effects to create something truly awesome!
Hope this help...
Followed that exact tutorial :P
Ended up using Cyan trigger and some empty objects to just run like 4 udon behaviors off of the same button
probably not the cleanest or most optimized but it works
haha! If it works it works!
You're probably better of asking this in merlin's discord (udon# creator), as this is so heavily to do with udon#
I will do THX
Do you have a link to the server?
I'm using this to make an object active locally. It works fine.
How can I make a version that makes an object inactive? There's no SetInactive node.
All the examples I can find are for toggles, which is not what I want.
remove the unary function and just set the bool to false
i dont think youll need to get active self either
but try both
Depends what you mean by Set Inactive node.
To ensure that a gameObject will always be off, then plug a bool, const node that's set to off.
If you want it to be the opposite of the toggle, then either put it though another bool, unary negation node, or just skip the one you have.
I did that in this tutorial if you need a reference: https://youtu.be/19HMJaHGtqw
Here's a tutorial about toggling either one or multiple gameObjects via a button in udon. Something I forgot to mention in the video, is if you to toggle multiple gameObjects without alternate toggle a second list of gameObjects; either make a random empty gameObject for it to toggle, or remove the second for loop from the script.
Cycling thou...
Please note that this flowchart stuff makes no sense to me 😂
im making a life point counter and im trying to get the text from the component and set the text to the component example : when i hit the 1 key copy what ever is in the text field and add a 1 next to it 11
i cant find a string A+B function
this is the most basic way of doing it
but the better way is to use the format node, but that would take a bit of setup
string to object bu i need string to string
whats the my int for ? is there documentation on this
oh the addition works XD thanks
I don't see a way to set it to false 🤔
he meant this. it will garrentee that the object will be turned off when the node is called
Thanks... which one is it? 😅
bool, const boolean
Like this?
if what you meant though is that when one gameobject is toggled on, the other is toggled off (stays opposite). you instead want to do this:
yup. now whenever that node is called, it will turn it off
Thanks. All I'm doing with it is disabling it (plus child objects) on collision locally.
gotcha. well yup, that'll work ^^
Would the same thing with Bool work for my existing activation one? (Unary Negation and Get activeSelf removed, Bool added and ticked)
Yes
Great, that helps simplify the chart that I barely understand 👍🏻
what problem are you trying to solve?
your other option is doing a timer in the update loop
Turns out it was needed :P
I need objects to become after 1 after the other not at same time
to become active
I need a delay in between each object activating
I need a list of objects to become active one after another
you can just manage the state internally via variable and loop delay call the same event
Im very armature at Udon Graph or scripting in general so I don't know what any of that means. I just need game objects to activate 1 at a time with a 0.1 sec delay when a player enters an area.
you make a variable and check what value it has, maybe an int
then you decide based on this value what object you need to enable
I apologize Cake but I don't even know what a Variable is and only heard the term int once or twice in a tutorial. I only ask these questions here as a last resort when I cant find anything online. But everyone here assumes I know what the hell i'm doing lol. Your help is very much appreciated but with all do respect could you maybe give me a photo example ? or link me to something or someone that may help ? Again I cant stress this enough your time is appreciated.
This would be way better done with an animator, than doing it via udon. here's a quick tutorial on that: https://youtu.be/M7pN8QYTGBQ
But if you really wanted to do this via udon, this is how you would. You have an array of gameObjects, and you have an int that counts where along the list you are currently at. Then each time the event is called, it toggles the gameobject on that part of the list.
In this example, I just made it turn off the gameObject
Here's a tutorial on how to make an animation play when you click an object. This particular example covers firing a trigger on an animator, but hopefully this covers enough to help those wanting to change a int/ float/ bool on an animator as well.
So hopefully this is helpful. As always, if you have any questions, feel free to ask in the comme...
im following the net work guide and this should work but its only updating on my client not the other client i have opened (i have 2 instances open with build and test)
Is the Sync Mode set to None? Also, can you tell us what is not updating? (What do you expect to happen and what happens instead)
sync mode ?
when i click a button i want to update a score board on all clients to my local score. its only updating locally not on other client
now im looking into using variable sync instead and this is very confusing even with guide
im set to continuous
And yes, what will happen in your code: You tell everyone else, "display LifePoints". Every client has its own LifePoints instance though. So if you only change LifePoints on the owner, then the others won't have the same value.
the network guide says using the send custom network event should cast it onlevery client
but if thats the case each client has its own instance of the lipe points so not making it visable working and have been trying to do owner ship changes to do this but to no avail
Exactly, the event will be "cast" to everyone else. However, the actual LifePoints can be different for everyone else.
It really depends on what you are doing. Where does LifePoints come from?
Potentially, you have to use manually synced variables.
the documentation is pretty bare with proper example but ill give her a try i gues
does any one have any tips or knowledge they can pass on to using manually synced varriables ?
The VRChat SDK files have some examples, if you want to look through them.
For example this:
Search for "ToggelSync" in the project for that file.
I am trying to make a player counter of X number of users in a specific room, I can count who enters/leaves the area using OnPlayerTriggerEnter/Exit, however my issue is that Exit doesn't appear to fire if someone leaves the game while in that area.
thanks for the help i figured it out 🙂
Maybe adding a OnPlayerLeft to decrease the player counter would already help with that.
Not 100% sure on this, but I think if stuff gets destroyed then the trigger exit method won't be called. That's what VRChat might be doing, in that case you can't do much.
Hmmmm... yea, suppose I could keep track of the players in the zone, instead of just a count and compare the OnPlayerLeft player with that list and if they are in it, remove
Question for udon who is udon (assuming theyre a person)
Udon is noodle
?whatisudon
VRChat Udon is a programming language built by the VRChat Development Team for use in VRChat worlds! It enables complex behaviors and logic in VRChat worlds. Read more about Udon in our documentation: https://docs.vrchat.com/docs/what-is-udon
What’s this Udon thing anyways? VRChat Udon is a programming language built completely in-house by the VRChat Development Team. It is designed to be secure, performant, and easy to use via the VRChat Udon Node Graph, a built-in visual programming interface that uses nodes and wires (we call them “no...
Ah that explains alot actually
How do I make an item have a function when the trigger is pulled?
like a gun or pen?
Check out this example: https://docs.vrchat.com/docs/udon-example-scene#interactcube
This scene is ready to Build & Test or Publish, and it demonstrates many common interactive items. Prefabs These objects show off some of the Prefabs included with the SDK which demonstrate default interactions with the VRChat components for Avatar Pedestals, Stations and Mirrors. AvatarPedestal...
What do "OnPickupUseDown and OnPickupUseUp events." do?
like do I need both?
to clarify I mean an item that you can pickup
not a button
How do I make one object destroy instead of respawning when falling out of the map?
(I wanna make it so when a specific object falls off the map it gets destroyed/replaced but I dunno how to track when it falls off the map besides destroy but I have items set to respawn)
instead of waiting for the object to go out of bounds, set a trigger collider for it that's on the same unique layer as the object itself, then just set the object's active state to false upon triggering
I cant find post processing volume variable in udon graph? did the name change?
Had to use udonsharp for it instead i guess
When the pickup's hold mode is set to 'yes', it will hold the item in your hands without dropping it (at least on desktop where you're likely testing it). This will give you the option of 'use' the item. To do so, you would use either the OnPickupUseDown or OnPickupUseUp events.
OnPickupUseDown gets called when the button is pushed down, OnPickupUseUp is called when the button is released
Where would I set the hold mode?
it's a dropdown on your object's, pickup component
thanks
could someone help me with UdonVoiceUtils?
I set it up for different floors but inside of them ppl sound laggy af
everyone sounds fine outside of it
and it seperates the floors audios fine
people just sound weird and laggy in them tho
How would I trigger an Udon event based on local time?
(I wanna make it so if a player joins past 6PM it'll be night time in world for them, past 5AM daytime)
Has Anyone been able to change the max speed in the udon karts prefab? I altered the C# code but t doesn't seem like anything changes, only way I've done it was changing the pub vars while running cyanemu
public vars are serialised, that means public vars override the code
change values via the inspector
The thing is there is nowhere I can see in the inspector to change it, it only allows me to alter the values during play mode with cyanemu, outside of that, the vars are defined in the code
the vars should be on the udon behaviour if public
For some reason they aren't despite being public float values
It probably has custom editor and get hidden.
I want to make something I made synced for late joiners and such
So I looked it up and found this video
https://www.youtube.com/watch?v=RLJorzZGy-U
But I don't think it'll work in my case because what I have done
is made an object that switches first based on interaction while holding it
Which is fine that bit probably can sync fine
but then to switch back I currently have it triggered by being dropped then wait 55s
also I have some teleportation and stuffz as these are 2 separate pickup objects I'm enabling and disabling
aaaaaa
This tutorial teaches you how to create a synced toggle using CyanTriggers for VRChat's SDK3.
Download Tutorial Resources:
https://patreon.com/posts/54682376
This tutorial uses Unity 2019.4.29f1 and VRCSDK3 2021.08.04.15.07
Check the current version of Unity:
https://docs.vrchat.com/docs/current-unity-version
Download the latest VRChat SDK:...
You can learn the basics of Networking in Udon here - https://docs.vrchat.com/docs/udon-networking
The three main concepts used for networking in Udon are Variables, Events and Ownership. Variables are containers for values - like a number, a set of colors or a 3D position.Events are things that happen at a moment in time.Ownership is the system that decides which user can update a variable, whic...
has anyone here used the PBR Stage equipment asset pack before? I am trying to figure how to make it so i can toggle off effects from it
for example this smoke machine
Hey all! Does OnPlayerRespawn() only trigger for the person respawning? It seems to be the case in my local build and test...
Similar^
Does OnPlayerJoined only trigger for the person joining?
No it triggers once for every player already in the instance including yourself, when youre the one joining. And otherwise it triggers once for everyone else...its a little complicated to explain
Yes I'd assume it gets triggered by everyone
but I just mean like
if I have a toggle set to switch OnPlayerJoined
will it effect players already in the world when someone new joins?
You can't use screenspace canvas for VR Right?
I have a world with a bunch of floating heads. I want them to be always tracking/looking at the player wherever they walk. Is that doable via Udon?
Yes it is
Take a look at the JokeJam example project. The Jack in the Box head does that: https://docs.vrchat.com/docs/jack-in-the-box
Overview This system simulates a crazy Jack in the Box which can be triggered by the player. It is designed to work hand-in-hand with the Spring and SimpleEyeLook scripts, both of which can also be used independently. How it works When a player toggles the box, an animation is played making it pop o...
Right - use WorldSpace canvases.
Yes, that event will trigger on existing players when a new players joins.
Slightly related, just noticed the https://docs.vrchat.com/docs/jack-in-the-box page has a link to the SimpleEyeLook page in the overview as https://docs.vrchat.com/docs/simpleeyelook where it should be https://docs.vrchat.com/docs/simple-eye-look so the link doesnt work currently
Fixed, thanks!
np np 🙂
Does anyone know why when I open a prefab, all the udon behaviors are fine, but if I drag said prefab into the scene, the udon behaviors are all set to none for the program?
From the sounds of it, you instead want to use the event start node. It plays when the game starts (aka, when you load into a world)
I'm just starting using udon and was wondering how I should go about making a basket ball respawn if it falls off the edge of the world. I'd rather not make a giant collision object if I can avoid it. I'd like to just say something along the lines of if z position drops below 20 then reset position
I feel like this should be a simple problem I'm just not familiar with the nodes yet
Thanks I'll give that a try!
Had no idea what it did
That's built-in to your VRC Scene Descriptor under "Respawn Height Y"
ok gotcha, I thought respawn height only applied to avatars
When in doubt, check the docs!
thanks 🙂
So I have the Kart prefab for udon and it seems that they are not synced between PC and Quest. Everything else I made is, but the Karts are not. Anyone have any idea why?
Does anyone know how to make a fade to black animation when a player hits the respawn limit
Do you want it to be dynamic? (aka, the closer you get to the respawn point, the darker it gets), or is it okay for it to just be an animation of it fading to black.
If it's the later, the easiest way would be to have large plane, that covers the entire world, that is at the height that you want it to start to fade to black. This will act as a trigger, so on the collider, set the checkmark 'isTrigger' to = true.
Then do a on player trigger enter, check if it's the local player, and then if so, get the script to play an animation of it fading to black. That animation will animate the weight on a post processing layer, that makes everything black, from 0 weight to 1 weight (not quest compatible. You'll probably need to create a plane or something that stays in front of the player camera for that).
Someone can probably walk you through it if you want (do ask if so), but if you want to figure it out yourself...
Here's a video I did that uses the 'on player trigger enter' + local player check: https://youtu.be/qpCWzGmfXKI
Here's a tutorial on how to change a player's respawn point for something like an obstacle course. I also make an a cube to make the player respawn.
Something you might want to add however, is an little script on an empty gameObject, that reset the players velocity whenever the player respawns. This would avoid the slight shifting movement tha...
Here's a video to start playing an animation from udon: https://youtu.be/M7pN8QYTGBQ
And here's a video on how to create the animation on a darkness postprocessing volume: https://youtu.be/r-3L2h0yDkc
The only issue with that is the post processing
This world will be Quest compatible and post processing isn't available on the mobile pipeline
I do have a custom shader for Quest that over-renders everything and has varying levels of opacity, but it doesn't have a slider to my knowledge
The best way of doing that afaik, is to create plane that has a script that has keeps the plane in front of the camera. then create an animation that makes it active, and then changes the opacity to go from 0 - 1
perhaps it can do alpha on the colour value?
Oh I mean the shader ONLY has an alpha slider
The color is always black
Come to think of it it was used for a sleep world, so it probably does have slider capabilities
Let me see if I can make an animation with it
then it's the same process as your would do with the post processing volume, just with animating that slider instead
yea, that's the usual use for it
I see, I just don't know how to animate material sliders like that
I tried it with RGB emission on an avatar before but could never figure it out properly
One more question while I have you here
How do you move an object to the player using udon?
For example, the world is covered in water. When the player enters a collider, I want a splash sound effect to go off where the player who entered the water is.
I can imagine it would start with entering a trigger and getting the player's position, but then after that I don't know how to apply it to the audio source
lol, went afk
It's just the same as animating a post processing volume. you just have to go into the inspector, and at the very bottom you will see your material with a drop down arrow. click it, and you can see all the settings.
Something to note with animators, is that they can only animate what is on the same object, or is a child of the object. That may be where you got confused with the avatar stuff (avatars are also horrible to troubleshoot comparatively)
I got the fade to black working while you were gone
kwel! ^^
Ran into a bit of trouble but that's just because I was dumb and got my far clip too close
nah, silly mistakes are bar for the course when your starting out
In the VRCWorldSettings im looking to set the Voice settings but i cant seem to find any of the variables
Ive looked over the docs but they dont seem to match
Is this valid?
im new to vrchat and how do i get free avatars
Hey, i was wondering, could i add footstep sounds to vrchat worlds? Like, example: City 17 Has footsteps , i was wondering if there was a way to add em?
I'm using sdk3
For the audio parts, currently this script is changing the volume of the local player, for the local player only. Its not changing the local player's volume for others in the scene.
Go look under 'vrchat examples, udon program sources'. There is an example script that changes the audio of everyone in the scene
how do i use vrchat on discord? [PC]
thanks ill look into that
What is udon?
?whatisudon
VRChat Udon is a programming language built by the VRChat Development Team for use in VRChat worlds! It enables complex behaviors and logic in VRChat worlds. Read more about Udon in our documentation: https://docs.vrchat.com/docs/what-is-udon
What’s this Udon thing anyways? VRChat Udon is a programming language built completely in-house by the VRChat Development Team. It is designed to be secure, performant, and easy to use via the VRChat Udon Node Graph, a built-in visual programming interface that uses nodes and wires (we call them “no...
Oh thxs
i'm getting a new issue, this project was fine earlier today but now suddenly none of the scenes finish building. the two errors:
Error building Player because scripts had compiler errors
Export Exception - System.IO.FileNotFoundException: C:/Users/pkrah/AppData/Local/Temp/DefaultCompany/BreakUdonRebuildJune16/scene-StandaloneWindows64-Main_Apr_3e.vrcw does not exist
earlier i also saw vrcsdk build was aborted at the request of the udonsharpbuildchecks vrcsdkbuildrequestedcallback but haven't see that again
anyone have an idea why this could be happening?
That error is the result of earlier errors. You need to see what's wrong with udonsharp
how would one best find that out? i didn't notice anything out of the ordinary, while i was hopping between three different scenes, doing updates to each so going to a backup would be a huge pain
even though the backup is only a day old
Close unity, open, then do testing again. The errors should show up.
Hi, I have a question about Udon
I want to use a certain value based on a condition and continue with the same nodes.
Is there any way to branch values based on a boolean? Instead of the flow noodles or how they are called
i just did that, no error messages until i built it, then those two again. unless i'm supposed to be counting the yellow warnings?
If it's about udonsharp, you should try compiling all the udonsharp code again.
Hey, i was wondering, could i add footstep sounds to vrchat worlds? Like, example: City 17 Has footsteps , i was wondering if there was a way to add em?
I'm using sdk3
any one of the compiling buttons should work? i already did that. also this happens in different scenes.
Does any error come up?
the two i posted earlier
lots of warnings, not sure if those are key
Error building Player because scripts had compiler errors
Export Exception - System.IO.FileNotFoundException: C:/Users/pkrah/AppData/Local/Temp/DefaultCompany/BreakUdonRebuildJune16/scene-StandaloneWindows64-Main_Apr_3e.vrcw does not exist
hi, there, if I may. I have a gate in my world that is toggled on and off globally for my club, however during a test with a lot of people and late joiners, we noticed the gate being opened or closed is not synced for late joiners and some people is there a way to fix it?
if you're using cyantriggers then you can follow this https://www.youtube.com/watch?v=RLJorzZGy-U
This tutorial teaches you how to create a synced toggle using CyanTriggers for VRChat's SDK3.
Download Tutorial Resources:
https://patreon.com/posts/54682376
This tutorial uses Unity 2019.4.29f1 and VRCSDK3 2021.08.04.15.07
Check the current version of Unity:
https://docs.vrchat.com/docs/current-unity-version
Download the latest VRChat SDK:...
So this took me longer than it should have.
Time to toggle objects again, but this time, for everyone! You'll see that syncing is a little bit more complicated than it was in SDK2, so to set everything up we have to tell every player to toggle that object, but also catch up anyone who joins in after the button was pressed!
All assets are availab...
that's not cyantrigger
These errors would only come up when you building the world. But the actual error should came up when compiling the code.
just using this rn
ill check this out
when compiling udon sharp there's no errors. just the two errors when building
should i replace the sdk and udon sharp?
i only recently realized that sometimes the order udon sharp is installed makes a difference to other scripts, so i worry about replacing it
So that's probably something else that's causing the errors. What is the version of udonsharp and sdk btw?
this worked, thank you @true ore
is there a way to break from a for loop early in udon?
the latest of each i believe
guess i should check
but how else can one source this project-wide issue?
i guess i could just start deleting stuff from a backup
Better specify the version number. Latest could even means latest stable or latest beta.
20.3 udon sharp, latest
can't even see where the sdk says the version but i thought i downloaded the latest
still, can i just delete udon sharp and reinstall?
without breaking things?
For udonsharp, udonbehavior may loses references to its udonsharp asset file, where you need to reassign them manually later. Better backup again first.
is there a proper way to update udon sharp?
obviously it's built so people don't break their projects if done correctly
quick question, how can I toggle off an animator
Usually you can update by reimport the latest unity package over without deleting the old one.
ah
i can only answer this using cyantriggers
ahh i see, I am just using some PBR Stage equipment rn and my only current way I know how toggle off its effects is by toggling off the lights with a script but idk how to make that script stop the animation as well
because this moves around
wanted a way to toggle off its animation and light
that's probably relatively simple to do even without using cyantriggers or the sdk2 trigger system as i learned, but i just have no experience turning an animator component on and off otherwise
damn
i figured it would be simple i just got no idea how to do it xd
toggling off the light is easy since i can unpack prefab and make the target the spotlight
but the animator is attached to main object so chances are, it would toggle the entire thing off i targeted it
I do have cyan trigger but i havent really used it and im not sure if i can use it on this other things
yikes, i deleted udon and the sdk (not udon sharp) and closed unity, and now the project won't open! this has happened before but i don't remember how i fixed it, or why it happened in the first place
Won't open as in crashing right after opening a scene?
it starts opening for like twenty seconds then stops
can't see anything it's saying before it shuts down
Try creating a new project, import all the essential packages. Try building an empty scene. If that works then copy all the asset from previous project into a new one.
the library too?
Library folder is auto-generated by unity. You can leave it and unity will create a new one for you.
well if i'm not using the exact same library then rebuilding that will take five or six hours
so i want to be pretty sure before i spend the rest of the day on it
How big the asset folderyou have?
very big! i could check, but the entire project is over 100 gigs
so are you saying install the sdk, udon sharp and some others, then transfer the asset folder over, minus those package folders?
Yep. Except what comes from packages.
so you don't think just rebuilding the library would do the trick? what could it be about a new project that fixes what's wrong with this one?
A new project could eliminate a chance where some package script or other asset got edited from the previous one.
why in a brand new project, after importing a few basics, am i getting errors like this suddenly? i think this is jsut after installing cyanemu... Assembly 'Library/ScriptAssemblies/UnityEditorTests.dll' will not be loaded due to errors:
Reference has errors 'VRC.Udon.Graph'.
Are there more errors prior to that?
What would happen if you delete cyanemu and relaunch unity?
will try, but first i'm wondering about serializedudonprograms, do i transfer that over or could that be a source of the problem possibly?
no problem without cyanemu
So somehow cyanemu is the culprit?