#udon-general
59 messages · Page 25 of 1
r/whooosh
if i add network at end of premade toggle. will that make it global?
ok. that dont work. -.-
@rough beacon you need to send an event name and then create a custom event with that name. Check out the Sync examples in the UdonExampleScene to see how they work.
@bleak widget @fiery yoke the official place for Udon docs is here: https://docs.vrchat.com/docs/getting-started-with-udon
We don't have information on Sync yet because it's changing as we speak. Once we finalize the upgrades to sync, we'll document them and explain how it all works.
I have this script that is supposed to toggle the enabled state of my stage object and sync up the state for new people that join. It turns the object on but not back off. Not sure if it is a sync variable thing or if I am just missing something right in front of me
@bleak widget - only the owner of the object can change the state but you're not checking for ownership
not sure if that's the issue but it may cause some confusion while you're testing
Yeah, I thought it may have been related to it but that didn't explain why I was able to turn it on but not off
I'm assuming you've got StageStateSync with 'Sync' turned on and StageStateLocal with it turned off
I suggest you add the ownership check and then you can start logging what is happening to figure out what's causing the issue
How would I go about "logging" in udon?
use Debug.Log, then open the Debug Console by pressing Right-Shift, backtick, 3 with the client open.
to turn on logging, you have to launch with some command-line args, but these are injected for you if you use Build & Test with your VRChat Client Path set.
Whoa, that is key combo. That makes it a lot easier to debug things for sure
yeah, it's a little unwieldy but you get used to it. Feel free to press other numbers too, to see the other info you can get.
What node(s) is used to get owner again?
@bleak widget - try using the Full Search using tab, type 'Owner' and see what comes up.
@warm mist - not really a question for this channel about developing things in udon, you can try #world-development if you'd like.
Looks like a place to show off worlds mostly. But ok.
Is there a way to get the VRCPlayerApi of the player who triggered an Interact event?
Interact events happen locally - you then fire off something networked if you want your world to react to it
Oh right. I can just use local player then duh
that's right
Spent like 15 mins trying to figure out why my code wasn't changing when I loaded the world. Restarting unity fixed it lol
yea, Unity can be a bitch sometimes
seem like every time i think i got it to work. it bite me -.-
i just wish someone just give me prebuild button that work on global. it ok, 1 day i get it right. 😦
Oof ok this is becoming really trippy. I moved a debug block to a different section and it made another part work completely differently 0.o
Trying to setup a UI but can't seem to get words to appear, been trying to do what the UDON test scene does
Changed some stuff, still nothing
@scarlet lake what does your graph look like? How is it different from the working demo graphs?
So I have a synced bool variable that doesn't seem to be syncing between each persons instance. I set up a very basic script that to test if the variable is changing across instances but it doesn't seem to be changing. I am sure that I am the owner before changing the value. It does change locally but not for everyone else
Anything I should look for to debug this issue?
Do you mean it's not syncing between players? We use 'instances' to mean different copies of the same world, between which there is no data transfer.
Sorry, same instance of the world but different players
Cool. Do the synced variables in the demo scene work for you?
Umm, I don't know? I would think so because I can change the one for my local player but other players aren't getting the same value change
I mean - have you built the UdonExampleScene with its synced variables and seen them working? That helps to ensure that your workflow is all good.
How would I see anything different in the sample scene that mine? It looks like it works for my player in my own code as well, but the value doesn't change for anyone other than me
The easiest way to test sync is by running Build and Test with two clients:
https://youtu.be/8yaQY0arCnc
Learn how to make a Build of your World and run it in the client to test your Udon graphs.
Ah with two clients. I see. I didn't know if that would work for testing sync. I will try that next and look at my debug logs
Yep, it's the easiest way to test sync for sure.
You may want to take a look at the Readme in the VRChat Examples folder, it explains all this and more! Great place to get started.
Ok, just tested and the sync worked just fine. The way I expected it to work
Maybe I should just try restarting my unity and reuploading
@scarlet lake what does your graph look like? How is it different from the working demo graphs?
@floral dove I tried making it like the demo UI but smaller
I haven't gotten into the networking side of Udon yet, but the idea of testing with two clients never occurred to me! Definitely a good thing to keep in mind for the future.
anyone else having issues syncing?
testing a world, hadnt really changed anything, and only the master is getting updated
but no one else is getting synced
this was syncing perfectly find before
i cant get sync to work right. i sure other not having that problem
so it is working...kind of
when i wasnt the master it worked consistently but was super laggy, like would take upwards of 7 seconds to sync an integer
it took her when she joined a world like 45 seonds to finally sync
is it normal that you spend like 5minutes compiling shader variants?
//Edit: And how many FPS are needed for a good map feeling?
What is the right way to be able to pick up a object and when you let go for it to be not affected by gravity. I tried freezing it but that just makes it look super laggy xd
I'd guess this is what you're looking for, the 'use gravity' on the rigidbody component of your pickup item.
@onyx knot
Unless you want the object to float around like it is in space, you probably want to enable "Is Kinematic" as well
Thank you :D
Any idea if VRC_PlayerAudioOverride will be/is available in the SDK3? Looking to make a mic stand for singing and other related voice needs.
oof. Ok, Thanks.
@proven vessel we're working on a major audio system override right now to make all sorts of new things possible in Udon. I'm hopeful that it will be weeks and not months, but it's a complex system so we won't have a solid timeline until it's just about ready.
I appreciate all you do! Thank you for the update.
whos Hank?
Voice to text always killing my grove.
lol
Update on the fog issue. Through a bunch of testing, I found that it will turn off if you try to change the fog mode to anything other than what the world started with
i need a script for toggling mirrors. i tried youtube but they dont seem to work even in play mode
This video should be up to date for toggle buttons
With the recent Udon updates, some of the basics have changed, so here's my most basic tutorial redone with the new editor, and not recorded at 2am! If I get enough requests, I'll redo my "Contextual Buttons" video as well, which will give me an excuse to just rename them "Eve...
@dark blade - the script on the MirrorSystem in the ExampleUdonScene works. Make sure you've set up Build & Test correctly: https://docs.vrchat.com/docs/using-build-test
the video above from Vowgan will guide you through making a toggle in UdonSharp, the documentation above is for using the Udon Graph. You're welcome to use either one, but you'll want to go to the UdonSharp discord for any further questions if you go that route.
@dark blade let me know if the Mirror System in the ExampleUdonScene works for you once you have Build & Test set up correctly.
hey @dark blade it'd be cool if you followed-up here with what worked or didn't work for you after asking questions 😉
does anyone know how to make like edable foods and drinks for worlds? been trying to look for tutorials but i cant find one and im confused on how exactly people make them for their worlds ( like cookies that break when you use them, or drinks that can be used and refilled ect)
How would I go about having a proximity trigger? They enter an area to turn on the mirror, and when they leave that area, turn off the mirror
Man, I love clicking "Force Non-VR" in the SDK then clicking Build & Test -- AND IT LAUNCHES VRCHAT IN VR
updated my SDK hoping it would fix that and NOPE still does it
Actually lmao apparently I uninstalled my backup vrchat thigny and forgot to re-direct it
How would I go about having a proximity trigger? They enter an area to turn on the mirror, and when they leave that area, turn off the mirror
However, im still stumped on this
also having problems with QvPen's (https://booth.pm/en/items/1555789)
VRChatのワールド用のペンセットです。 消しゴム機能も付いています。 完璧に同期が取れるというわけではなく、速めにペンを運ぶと同期が取れにくくなります。その場合はゆっくり書くなどしてください。 Presentation RoomなどのようなLate Joinerへの同期は取れません。 同じインスタンスに長時間(2時間程度)いると書いた文字が他のプレーヤーに同期されにくくなります。 その場合はインスタンスに入り直すことで解消できます。 ※ExMenu用最小限アセット ExMenu(拡張メニュー) ( https://chiugame.booth....
@scarlet lake the nodes for detecting players are included in the next update. There are some funky workarounds on the forum but they're a bit complex.
https://github.com/Merlin-san/UdonSharp/releases/tag/v0.17.5 had a friend suggest I import this, it fixed most of the red errors doing that
2fde898: Add support for OnStationEntered/OnStationExited events with a player api argument, see https://github.com/Merlin-san/UdonSharp/wiki/Using-VRC-Stations
You'll need to ask the creator of the pens for support on those.
@agile oasis you could start by learning the basics of how Udon works, and make a simple object toggle. You can find the getting started docs here: https://docs.vrchat.com/docs/getting-started-with-udon
The example scene that comes with the SDK shows you how to turn objects on and off, which is the first step in making edible items.
@scarlet lake those are just warnings. Only errors (in red) will stop something from functioning altogether
Thought this would work xD but hope next update does have it
https://gyazo.com/3d4c5eb21f99b2e47882b11a7a8c08cf They work as props to hold uwu
but don't function as pens lol
@scarlet lake ok, looks like when any rigidbody enters the collider that graph is on, it will turn off the mirror and AvatarReplacement objects , and turn on the AvatarMirror object. What happens instead?
Nothing happens when I enter
Yeah, turns off the mirror that's by the couch (incase its on so you don't have 2 mirrors on), turn off my wall that says "mirror" and turn on the other mirror
I have been trying to create udon pens from scratch but gave up for the moment
@floral dove is it as complicated as my time changing button? lmao
first half is toggling some game objects off/on and the other half is changing skybox material
omfg my pen issue was because I didn't compile the scripts after importing everything
Ah - yeah, that's an Udon Sharp thing.
BTW @bleak widget - we updated some of the Udon docs today. I remember you wishing there was more documentation: https://docs.vrchat.com/docs/what-is-udon
You can let us know if there's anything you want to know more about. We'll have pages on Sync and Collisions as soon as those new features are out.
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 ...
Ah thank you! I will scan through those in the morning
How do i check if a transform is null with udon graph?
Usually you would do a object.ReferenceEquals which is equivalent to the "==" operator (in most cases)
However a Transform should only be null for the protected objects.
And in that sense I dont think you could ever get to that point without hitting a null before. Not sure on that tho
Objects in Object-oriented languages are represented as "references". An object is essentially just allocated space in memory. The program then points to that space in memory. Thats the reference. If an object points to null (which is a special memory address) it essentially means that there is no object to point to. But it still needs to point somewhere. And that is null.
It is essentially representing the absence of an object.
@floral dove the mirror works perfectly but i just dont know how to do toggling. the tutorials dont work and i follow it by the letter
how do i get the pens to work?
Are you saying the mirror toggle in the UdonExampleScene doesn't work for you?
i saw something about compiling? how do i do that? and i can find the example scene
It's in the VRChat Examples folder.
which folder after the example folder
The UdonExampleScene
so im in the examples folder but i dont see the udon one. should i reimport the latest sdk
I recommend you start here, seems like you're missing some basics: https://docs.vrchat.com/docs/getting-started-with-udon
Go through that one and the 'Using Build and Test' page/video linked after and you'll be in a good spot to explore the built-in examples.
well thats the problem. i think im missing those examples
now how do i compile scripts
nvm found it but now im getting a compile script error
Start with a fresh project and import the latest public SDK.
can i export my previous project or does it have to be from scratch
If you're talking about compiling UdonSharp scripts, you'll need to go to the UdonSharp Discord for help. But I highly recommend you learn the basics before jumping to advanced uses.
well whats the errors for
I recommend you start here, seems like you're missing some basics: https://docs.vrchat.com/docs/getting-started-with-udon
what visual studio do you recommend
VS Community
which year
ok. i need that for the audio toggling system
You can make an audio toggle system in the graph, no problem.
now i cant enter play mode because i need to fix all the compile errors and i cant find them
There should be no errors in a new project with just the Udon SDK imported. I can't help if you won't listen 😓
i imported my previous project and i think its the scene that has the errors. how do i fix that. i really dont want to start over
To fix errors, you must learn what they mean.
thx
is there a way to detect if an Interactable object is hovered and not clicked?
Something like OnInteractEnter() OnInteractLeave() instead of Interact
@lyric tiger not built-in, you'd need to do it yourself with Raycasting.
Ok, ty
Raycasting is exactly how VRChats Interact works. its based on proximity and the angle between where your hand is pointing vs your hand to the object.
Does anyone have an object physics script so I can throw items with gravity?
@distant abyss the PickupSphere object in the UdonExampleScene does this - no need for a special script.
tysm!
my items keep falling through the world forever, it was working not long ago but now when I play the scene they just fall forever. Any help?
make sure you've got some sort of floor with a mesh collider, and non-trigger colliders on your objects
Hey y'all ^__^ question: I want to have a key that, when brought to the keyhole, triggers an animation. any pointers on what exactly that's called, or maybe a youtube tutorial i can watch?
@edgy moss sounds like you want a VRCPickup with a collider. I recommend you start with the docs about Udon: https://docs.vrchat.com/docs/getting-started-with-udon
thanks!
@floral dove Sorry for the late response, but I have my items on an item with a box collider and none of them are set as triggers. Will that still work or does it have to be a mesh?
nvm! making it a convex seemed to make it work for me!
Does anyone know if i can get Tilt Brush reactive brushes working in VR chat..reacting to audio. I tried using SDk3, but inside VRChat the brush did not react to the audio coming from the audio source. In Unity it works fine.
@sour lynx to make something run in VRChat, you need to port it to the Udon Graph or UdonSharp.
Here's some info about Udon if you want to learn more: 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 ...
Udon can access Audio Spectrum data, it may be possible to provide the info that a Tilt Brush shader needs but I've never used their SDK so I can't say for sure.
@floral dove thats really interesting, so perhaps re-writting the scripts that tilt brush uses for the reactivity in UDON.. I haven't used it either so i dont know if it's possible.
It would be awesome if it worked! I love Tiltbrush.
Yeah im making a VR gallery called " "Moksha VR 2020" it got accepted to Burning Man Kindlin. I Have a bunch of tilt brush pieces inside which would be awesome if they reacted to music.
Does anyone know how to make button to be global
Does anyone know of a guide for Udon which explains the correct way of setting up voice dampening/roll-off?
@frozen matrix check out the ButtonSyncMaster example that comes with the SDK in UdonExampleScene
Well what is name of it there is like lot of different buttons for different use? momo
@frozen matrix oops, forgot we renamed it to UIButton Owner.
@frozen matrix the Readme.pdf explains it along with all the other examples
This doc and video explains how to Build the example scene so you can see everything working: https://docs.vrchat.com/docs/using-build-test
Does anyone know how to add a custom sitting animation on a chair? I tried searching it up but couldn't find anything.
I have a collider that works fine unless there are multiple people in the world, then it just stops detecting trigger enter/exit events. There are multiple of them but only the one the player spawns in originally just stops detecting collisions, only for the master.
Is this a known issue, and is there some kind of workaround for it?
eh, this method of player detection is gonna be broken soon anyway, I'll probably revisit it if the issue persists after proper player collision is implemented.
also, anyone know how to scroll the debug log? a million scrollbars on that window but nothing I've tried so far works...
I think you'll have better luck looking through the file of the log itself
You can fin it in something like C:\Users\YourName\AppData\LocalLow\VRChat\VRChat
I was afraid that was the answer. I usually do that, but testing networking stuff with multiple clients it gets a little more difficult keeping track of which log is which.
Ah well.
Agreed. I'll let you know if I figure out how to do it. I made it work randomly last week, but every new line logged scrolled it back to the bottom so it wound up being more frustrating than just checking the logs.
@solid cairn You have to open the quick menu to scroll the console. Because thats how UI Focus works apperantly.
And yeah there is no way to stop it jumping to new log entries which is very annoying.
Is there any way to generate a random int on start without it generating 0 every time?
As, sweet. Thanks 😄
I'm looking for a way to emit a single particle on interaction. Are there any good examples or tutorials for this?
You'd need this method:
https://docs.unity3d.com/ScriptReference/ParticleSystem.Emit.html
Not sure if it is exposed tho
Ah, I see. Thanks a lot
So is the Build and Test feature broken in SDK 3.0? For some reason it always loads up and then kicks me right back to my default vrChat world?
@fiery yoke thanks! Jumping around is fine for now, mostly just needed to check a few differences between the clients on load.
@visual crow make sure you've set the path to your VRChat client in Settings: https://docs.vrchat.com/docs/using-build-test
yeah it's exactly as shown which is why I'm baffled
I actually had this problem last night, so I created a new test map. Threw down a plane, Game Object, added Component Vrc_Scene_Descriptor set spawn to 1, ran the collision and layer dialogs, it loads up my world for about 5 seconds then kicks me back to my home world, my Mine world list appears then disappears before I can see anything and that's it
So it appears to be "somewhat" working, but I made sure to use this test map so I could make sure I didn't have any errors regarding assets/scripts
I'm going to try the build/publish route just to see what happens. It's a shame testing it doesn't work for me.
Take a look at your logs to see if there's any clues as to what's happening for you. For a know-good world, try building the UdonExampleScene world.
Thank you, I just uploaded it and found it under Mine, now it loads me into it in VrChat but kicks me right back out. I'll check the logs and also use the example.
as far as console errors this is all I saw really. Just about to check the logs
Those are warnings, nothing to worry about. Your logs should tell you what's happening. I wouldn't expect it to work Published if it doesn't work Built.
I have had that issue where it kicks you back to the home world but still launches the game. It was because I wasn't using the EXACT version of unity that is needed with SDK3
hmmm maybe that's it
I'm using Unity 2018.4.20f1 (64-bit)
I might of not realized there was another version I needed (was working on avatars recently)
nope that appears to be correct from what I just saw
I'm not quite sure what I should be looking for in the logs either. I'm using Entering World under the find function for now to see what kicks up when joining my world
The only thing I really could see is when joining a world I occasionally saw this
2020.08.24 11:08:10 Log - [VRCFlowManagerVRC] Spawning players
2020.08.24 11:08:10 Log - [PlayerManager] mPlayerInstigatorIdDictionary[1] = VRCPlayer(Clone)
2020.08.24 11:08:10 Log - Voice DeliveryMode: UnreliableUnsequenced
2020.08.24 11:08:10 Log - [SpawnManager] Not aligning tracking to Spawn because false == !False || (!True && (False || False))
I'm going to test the example scene now
Okay the example Scene produced a considerable amount of errors compared to my almost identical Scene
Those are not errors, just warnings. Errors will have a red icon on the left instead of a yellow
That is still normal
strange
I'm at a loss. I am using ProBuilder, PolyBrush and ProGrids other than that everything else is pretty straight forward
You should be able to use the build and test on the example scene to make sure the you setup everything correctly
Yeah, same issue. It loads up then instantly kicks me back to home
Thats because the SceneBuilder fails to build the scene. So it cant properly load the scene
Error - [VRCFlowManagerVRC] Something went wrong finalizing the scene:
System.NullReferenceException: Object reference not set to an instance of an object.
^^
Yeah, that might do it
Hmm not sure where or why that would happen
Ive only seen it when you dont have a spawn object
but the default scene should have that+
it does
If you have two scenes in a project, can errors from one cause another to fail to build?
I'll restart and open the example scene to make sure it's not messing it up
lol I felt like I made so much progress last night, once I got through setting it up and getting use to using unity (been mapping in HL and Source for about 21 years) so I expected some learning curve but Unity is pretty pleasant to work in I have to say.
If you still have issues building, try a fresh project with the SDK and try the example scene again
I'm doing that now
Pretty much all I'm going to do on this one is Import the SDK> ProBuilder> PolyBrush > Open Scene > Build and Test (maybe it was ProGrids? since it was in preview?)
ooooooooo I must of used the wrong example scene. I wasn't using the Udon one above that was my mistake 😆 lack of coffee
lets try it now
That would explain a lot of the obsolete warnings
yes, I wonder if I'm not correctly setting up my Scene Descriptor
Yeah, I'm going to take a look at the Udon example to see what their scene descriptor looks like, I just have to figure out what they labeled it
And this one talks about everything you need to create a working world
Before getting started, ensure you have a Unity project with the SDK set up. If you want a great intro to creating your first world with pre-created assets, a tutorial video, and detailed steps, check out the VRChat Home Kit! Step 1 - Setting up a scene The first thing you nee...
I had spawn order set to first instead of random, so I'm testing that otherwise it's the same.
nope still kicked me ugh...
Are you still getting that same error in your logs?
@visual crow I don't think ProGrids, ProBuilder or PolyBrush are whitelisted
But I'd only expect that to mean that their components get stripped from the world
Hmm so do people generally not use them in 3.0?
Does ProBuilder have a way to bake it's objects into regular Meshes?
I'm honestly not quite sure, I just started using Unity yesterday so I'm still new to these tools.
well, I should say making worlds
I have made a couple of avatars but I never used these packages
No Exception
{{"error":{{"message":""World not found"","status_code":404}}}}
Error - [RoomManager] World Metadata failed to download for world local:b9df73d9128097dbeffa58c98c5047b41bd71418192c9b8be2f7b1d6b3ba9ff0
two of the errors most recently
Yeah, you generally need to stick to Vanilla Unity.
Okay so I assume I could go back to 2.0 if I did want to continue using those packages? Because it really streamlined the process for me
Any scripts not whitelisted will be removed from your world. Did the UdonExampleScene Build for you?
it did
Hm - I'd be surprised if they were allowed in SDK2 but blocked in SDK3.
Every tutorial I've seen uses them so that's why I was shocked it wasn't working in SDK3
the only one hidden in Preview was ProGrids
Coming from other editors it really makes mapping way easier. Hell just figuring out how to adjust snap to grid was kind of a pain till I used ProGrids
(adjusting the incremental values of snapping I mean)
These tutorials were all VRChat SDK2 tutorials?
Yes
I might of even seen one SDK3 but I'd have to double check
Way less common to find right now
Hm, the whitelists between the two aren't that different. I'll have to try it out to confirm.
Will you post a link to your published world? I can take a look later today
sure you want the basic example world that I was working on ? 1 plane, 1 game object (VRC_Scene_Descriptor)
It's locked as private? Do I have to re-publish to enable it as public?
If it's not allowing you to join it, I'm curious what's going on. You can share the link to a private world, it just doesn't show up in searches, etc.
All I saw was a Twitter link to share it https://vrchat.com/home/launch?worldId=wrld_8991452e-a4c5-4410-899e-7f81c4f84bbe
so I just copied and pasted I hope that's okay and it works
Yep, that should work.
cool, yeah let me know if you have any clue what's going on. I'm going to start a new project without loading up those packages and see if I run into the same problem.
Hi I have a little problem with my avatar. when I have, in unity, the SDK it does not offer me to import it. Help please
So I re-attempted without adding any of the other packages and now it won't even Build and Test I just get these warnings
@visual crow - those are Warnings, not Errors, errors are in red. What happens when you try to Build & Test?
Warnings don't block Build & Test
someone can help me ?
@toxic tartan - this channel is for Udon Worlds, not avatars. Try #avatars-2-general or #avatar-help depending on which SDK you are using
ok sorry I not realy now this server
Ok so originally I had those warnings, I forgot to change my spawns from 0 to 1. Once I did it built and tested it. Then it just loaded up and kicked me out like before.
@floral dove I forgot to target my Spawn Entity
@visual crow - I experienced the same thing when visiting your world. Your World Descriptor had 0 spawns set, not sure if that's how it was uploaded or a byproduct of some ProBuilder stuff.
so no spawns were set in your world?
Lol this is why I need like 3 more cups of coffee. My apologies lol
even my other world from last night works now using those packages. Ugh. I am sorry to have bothered you. What a simple mistake to drive me so crazy.
yep
The SDK really should default to itself (The Object that the Scene Descriptor is on)
Seems like an oversight to me
I would report that as an SDK bug on the Canny, but I cant login with my Gmail anymore, because of the recent Attack so I wont.
It was the one thing I just overlooked when watching the tutorials. It didn't occur to me to have to set it.
It was really my oversight in this situation
I recommend just using the VRCWorld prefab
So I am extremely interested in Udon worlds. Do you suggest following the docs (as do they offer enough info), or should I follow a set of youtube tutorals (scared of outdadted/unneeded info).
I mean it works now, I just spawn completely away from my spawn point lol, so hopefully with some positional adjusting I should be okay now.
I would suggest @twin pollen following the docs and getting your most basic map test worked out then explore youtube tutorials after that
Thank you @fiery yoke @floral dove
The easiest youtube tutorial to make sure you are not being dumb like me is https://youtu.be/-ema-hdNiB8 this should get you to make sure all your basic settings are configured.
really to the point simple
Then I would move on to others if you want to use some tools to make it easier or do more advanced geometry world building
adding unity assets/textures
Some 2.0 video tutorials will have useful information that carries over, but it should help to give you a good idea of the basic controls/keyboard shortcuts if for some reason you learn better that way instead of referring back to the documentation
On that note, I'm going to fix some more coffee and exit stage right. Thanks again everyone, and also I'm sorry!
I understand SDK
I do AV3 stuffs, so I would imagine it is dragndrop up until creating a simple world itself
Importing the sdk is the same for worlds as it is avatars. There are just a few more things you have to add to get a working world once the SDK is setup
Here is a link to setting up a basic world
https://docs.vrchat.com/docs/creating-your-first-world
Before getting started, ensure you have a Unity project with the SDK set up. If you want a great intro to creating your first world with pre-created assets, a tutorial video, and detailed steps, check out the VRChat Home Kit! Step 1 - Setting up a scene The first thing you nee...
Playing with the world Geometry is pretty straight forward for the most part I've noticed. So once you get your feet wet and don't make a simple mistake like me you should be off to a good start after checking that link he posted out ^^
The only other advice I could really give that might be useful is be careful when downloading assets off the asset store. When you import the packages check to see if any scripts are included because it more than likely will kick off errors if you leave the scripts in
Is there a way to change the render distance of geometry in the 3d viewport? I'm trying to select faces on a small cylinder but the closer I get it disappears?
It is dependant on the size of the object youre focused on
yeah the size of this is very small
Make a cube, scale it to be reaaaaaaaaaly small, then press F when having it selected
then you can move around the scene
Well thats a little much, but thanks
I have a 6 sided cylinder that I could only select 2 sides of the top face from a distance
🙂
Am I being blind or is there a list of shortcuts in the documentation on the website?
Shortcuts for what?
Keyboard shortcuts, Like F to focus (I assume) Ctrl, shift etc
I mean google is your friend
I'm kind of shocked there isn't a centralized wiki for information regarding this specifically for VrChat.
It seems that there is a lot of information out there, though a lot of it is scattered and de-centralized for specific uses and applications
Those shortcuts are for Unity, not for VRChat. Here's a nice graphical shortcuts list for Unity itself: https://oxmond.com/unity-shortcuts/
Oh yes I understand. That was very helpful. I'm just shocked there isn't a resource that helps bridge VrChat Specific knowledge with Unity Knowledge (I never had a reason too work with unity without my interest in VrChat)
I do enjoy the challenge though.
Is there a keyboard shortcut for the graph comments?
no, the right-click context menu is the quickest way to make one at the moment.
I'd be open to making one, though. Any suggestions?
CTRL+K+C is the comment shortcut in Visual Studio. Maybe that or some variation of it?
yeah, Ctrl+k is decent if that's open. Then maybe Ctrl+g for group.
Yeah, that would be really nice. Is there a way to change the default size of the comments as well? By default they are only big enough to show like a 2-3 words at a time
not at the moment, no
That might be a nice addition. Very low priority though
Or have it dynamically size based on amount of text
How do I add jumping to my world?
Alright quite possibly another dumb question, is there a way to change render distance for Point Lights? they seem to fade out when I'm a certain distance?
2 in the back left and right
I am trying to follow this tutorial but it looks to be too outdated because I can't get even the first node to appear. All I get when I try to add the player api is this menu.
I am sure it's probably just one of these options to create the same node as in the video but I don't even know where to look.
@shy cave - the UdonExampleWorld that comes with the SDK has jumping enabled, check it out!
the Readme.pdf that comes with it explains how to modify jump too
Okay, thank you!
I am trying to use these electric sparks. It works in unity, but not in VR Chat. I feel like this is probably a pretty commonly used asset, so does anyone know off the top of your head why it's not working? https://assetstore.unity.com/packages/tools/particles-effects/lightning-bolt-effect-for-unity-59471
@edgy moss - does the effect have a custom script on it? Look like it's got one in the package called LightningBoltScript. You can't use custom scripts in VRChat, that's the whole reason we made Udon. You can try converting it to Udon but that's not necessarily a beginner's project.
thanks so much 🙂 I have a buddy really good at scripting, I'll have him take a look. Thanks!!
Hello i just downloaded udon sdk and unity is screaming at me saying i dont have "udonSharp"
so i am pretty confused as to where i could find it
(i used some prefabs for a kart that might be too old ) does udon sharp still exist ?
Anyone got a good example for a volume slider?
@worldly forge UdonSharp and Udon SDK are two different things. Udon SDK is actually SDK3, that allows you to create logic in your worlds using Udon. It supports creation of Udon graphs. UdonSharp is a plugin that lets you write C# code for Udon. It is useful if you wish to write C# code for Udon, instead of creating Udon graphs. UdonSharp is meant to work along side SDK3.
SDK3 can be downloaded from the VRChat website. UdonSharp can be found and downloaded from GitHub through a quick google search.
You mentioned a prefab. Could it be possible that the prefab contains some scripts that are meant to be compiled by UdonSharp? If so, then you need both SDK3 and UdonSharp.
I mentioned searching for UdonSharp through google earlier, but incase the exact download location is hard to find, here it is: https://github.com/Merlin-san/UdonSharp/releases/tag/v0.17.5
2fde898: Add support for OnStationEntered/OnStationExited events with a player api argument, see https://github.com/Merlin-san/UdonSharp/wiki/Using-VRC-Stations
thanks a lot for the explanations
what is udon?
Here's an explanation of it: 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 ...
oh okay. thanks for the info. I actually thought you mean udon the noodles 😅
I was trying to download a prefab for my world but upon adding it I kept getting these errors. How can I fix this issue?
@shy cave - a good place to start when you have errors is to search for them. Google 'UdonSharp' to find the package you need.
Oh, I thought the SDK would already have the package included.
I would hope that the site that provided you the prefab would have information about needing UdonSharp.
No, UdonSharp is not part of the SDK, it's an add-on made by someone else.
Oh, okay. Thank you*!*
Hello everyone
, so i'm trying to make my first World map and a try to make a pick able object but when i or someone else move it people other than the one who move it can't see it move. how can i make it global 
@solar wolf add an udon behavior component to it and check the sync position box
i dont fond it TwT
Ooooh! i feel stupid xD
No worries =)
i did it but it still dont sync ???
Are you using Build and Test @solar wolf ?
no i ask a friend to come in vrc to try
never mind for some reason the check box got reset to "not check" but now it work
Ok, glad you fixed it. FYI I recommend Build and Test to try out your synced objects and variables, much easier than asking a friend each time.
If I have a position synced game object and a graph that effects the transform of the game object as well, what takes priority of the position?
I want to make a lightswitch which will turn all lights off/on which are in the room.
I already tried my best with U# and it didnt worked like I planned.
Things I have to consider are?
- Switching the material to the turned-off material?
- turning the light off?
- changing the refelction probe?
I tried it with animation but failed ... any ideas?
I think Im thinking to complicated here right?
Is there a downside in Unity to duplicating walls as opposed to creating new objects while world building?
Does anyone know how to get text to show up in the vrchat camera?
@tawny island there are some more options. You can maybe replace the mesh renderer by enabling one and disabling the other. Or just disable/enable entire objects. Or maybe change the color value on the emissive property in the material to black
The main problem is that I need to adress multiple lights in the room and because the amount of lights changes in every room I cant hardcode it
@tawny island Maybe you could have an array of your light objects then iterate through each one?
tried it but it didnt work
use layers?
layers?
anyone have documentation on receiving player data? e.g. when enter trigger take the player data (username) to be displayed
@tacit pasture check this one https://github.com/FairlySadPanda/UdonStringEvents
awesome thankyou
@tacit pasture official support for this in Udon is coming in the next release.
oh man, thanks a bunch, cant wait :)
How long would it potentially take to learn udon enough to make a world?
Difficult to answer that one @scarlet lake
All depends on your capability to learn a coding language.
But basic stuff is pretty easy.
I already know a bit of C#, does that help?
That does help yeah, just got to be aware of Udon limitations. Things that work in C# might not work in Udon because you don’t have access to the same methods/properties
Right. So is udon a language that you learn from scratch like C# or is it something that's easy to understand when you already know the basics of code?
@scarlet lake 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 ...
Are there other video sources that go into more detail than the 3 videos on the youtube channel?
That's all that we've got for the official videos, I'm working on more right now. After those videos, I recommend you go through the Readme.pdf, which walks through every graph in the UdonExampleScene
Awesome!
We've got a couple features coming in about 2 weeks that will be fun for spooky worlds - haptic events, player collisions, video players
Is udon about choosing whether to use the graph editor or U#, or do you need to know both?
Because I don't really understand the graph editor too much and U# feels more close to home.
Since I use C#
is vrchat/udon compatible with the unity Director Timeline?
@scarlet lake U# isn’t a official tool from VRC, it’s something Merlin made. Other than that, you’re free to choose what to use. Do keep in mind that support for U# is only given in that discord.
Alright, thanks.
Is it recommended to focus more on the graph editor?
That's up to you. Graph will have official support. While U# will only be updated after the graph
I just have trouble understanding the tabs in the graph editor. What's the name of the discord that supports U#?
Link is at the bottom of the GitHub page
Cool, thanks.
How do I make thrown objects bounce
Also, how do make objects not have gravity, so they can't be thrown, Like they can float in mid-air
In the rigid body component is a check box for 'use gravity', turn that off. @scarlet lake
for bouncy objects, I haven't tried this, but this looks simple enough, make a physic material and apply it into the collider component https://docs.unity3d.com/Manual/class-PhysicMaterial.html
In the rigid body component is a check box for 'use gravity', turn that off. @scarlet lake
@zealous mason I'm dumb, didn't think of that, thanks!
Also that works great, create the PhysicsMaterial, customize the settings, slap that puppy in the collider material, bam, done
One more thing, how would I go about making a button that cycles through game objects?
For like, music queuing
1 click
Plays song 1 (GameObject 1)
Second Click
Plays song 2 (GameObject 2)
Third Click
Plays song 3 (GameObject 3)
fourth click
Goes back to song 1
@scarlet lake you can use the'remainder' node - it will take an increasing input number and roll it over
Heck, i'm over my head with this one, time for googly
You could always just increment an index and then set it to 0 if it's greater than or equal to the length of your song list
No like, I have no idea what im doing with this, lmao im very virgin marry with udon
and scripting in general
Ah, gotcha. Yeah, Google / Stack overflow may guide you towards a good pattern for this.
Basically, you create an array of audioClips, and an integer we call the 'index' that starts at -1. When someone clicks a button, you increase 'index' by one, then set the Audio source to use the AudioClip at 'index', which will be the first clip (0). This will work until index is bigger than your AudioClip array.
So to fix this, right after you increment the index by 1, you check if it's greater than or equal to the length of your array. If it is, then it's hit the limit and you want to set it to 0 before you try to use it.
But it you can find the int.remainder node, you can just feed it the index and the length of your array and it will output an index that is already rolled over for you so you don't have to mess with if(index >= array.length) index = 0
I appreciate your help, I shall put the puzzles together
Good luck! I'll check back in when im at my machine and can make an actual graph
Is there more documentation on how the different momentum transfer methods work on a VRC Pickup?
Hm, it doesn't look like there is. I'll see if I can flesh it out a bit.
Hey momo, update on that button thingy, friend helped me with it, found it easier to use Udon C#
New issue, can't seem to interact with my UI 😠
Thanks Momo, that would help a lot
Like, I have a slider for world audio volume, in my world, and can't seem to be able to interact with it, in my test world
make sure you've got a VRCUIShape component on your Canvas @scarlet lake. You can check the UdonExampleScene for an example under UdonVariableSync/Canvas
There is one on the canvas
ah - I know it's a little counter-intuitive, but take your canvas off the 'UI' layer, 'default' should work.
aight, i'll check up after compiling
also - 'remainder' shows up for me when I do a full search, can you verify that you bailed before using tab-search? Want to make sure it's not somehow missing for you:
We used Udon C# - it works how I want it ❤️ thanks though!
glad you got it figured out 🙂
This is all it took xD
haha - yep, that's exactly what I described, just in UdonSharp
Again, I take no credit, friendo nerd helped
Jesus, something so simple, the slider works now! Thank you very much ❤️
a couple things you can bring back to your friend - this will break if you ever change the number of songs., and skips the first song in the list. Here's a fix and simplification:
public GameObject[] Songs;
public int currentSongIndex = -1;
public override void Interact()
{
// increment index by one and roll it over
currentSongIndex = (currentSongIndex + 1) % Songs.Length;
foreach(GameObject x in Songs)
{
x.SetActive(false);
}
Songs[currentSongIndex].SetActive(true);
}
that % does what the remainder node does, which is roll over the index by the number of songs so you don't have to check and roll it over yourself. Using Songs.Length instead of 3 means you can change the number of songs and it will all still work.
Ah yes. Modulus.
yep! so powerful. Also, I only learned recently that Unity has a version that works with floats: https://docs.unity3d.com/ScriptReference/Mathf.Repeat.html
Bruh, that is so cool. I will have to remember that one
@floral dove Why is my slider reacting to A & D being pressed while on desktop lol
btw momo since the song 0 is playing by default making it -1 replays the first song
I can control the slider from anywhere in the world just by pressing A or D
@bleak widget In C# % is in fact not Modulus, but Remainder
The difference is subtle, but its important (well only for negative numbers)
ah @proper oar - yeah, then starting at 0 makes sense. I was writing this as if nothing was playing at first
Huh, that is news to me. Thanks for the info
@bleak widget - I've updated the VRC_Pickup docs with info about Momentum Transfer: https://docs.vrchat.com/docs/vrc_pickup
This defines how the collision force will be added to the other object which was hit, using Rigidbody.AddForceAtPosition.
Note: the force will only be added if 'AllowCollisionTransfer' is on.
Ohhhhh, it is for collisions. I assumed it had to do with how it was thrown
honestly, I thought that too until I looked at the source code 😛
Deceptive naming haha. Thanks for clueing us both in on that one
Hello everyone, i'm kinda new to udon & i need some help w it, i'm trying to set the UI button to trigger door open\close animation on my map. I wrote simple code w animator.SetBool (using U# (i'm new w C# aswell)), attached it to my UI button but when i launch it in test world it doesn't work :\
tried it without target.GetBool before - not working
@prisma juniper - you need to make sure your Canvas is set up properly, like the canvases in the UdonExampleScene. Make sure you've got a VRCUIShape component on your Canvas, and that it's not on the UI layer.
yep, that looks right. First, add a Debug.Log to make sure that this method is running. If it is, you can debug the value of that bool to make sure you're getting it properly.
don't you need to add the main camera as the event camera?
@proper oar it's not necessary, though it doesn't hurt.
aight
Only needed if you want to test it in the editor. Otherwise, VRChat will replace/add it for you anyway, as long as UIShape is on the canvas
Is anybody writing Udon Assembly? That sounds way more enticing to me than a nodegraph.
lol
But nowadays most people "code" in UdonSharp
which is a C# to UASM compiler the User "Merlin" wrote.
oh cool!
But yeah back then you couldnt even do a simple if-else, because you couldnt jump ahead. You could only jump back.
oh god
Well you could jump ahead, but only to fixed addresses, not to any labels
i'll definitely be using udonsharp then
They changed that at some point, but there isnt really a point to it, since the optimisation is so miniscule that it doesnt matter. And the compiler Merlin wrote is really really stable. There barely is any bugs or problems with it, and if there is then he usually fixes them in under a day or so. (Give or take)
Hmm, still not working (looks like vrchat cant see a button inside the canvas (no white dot when targeting the button )) & yeah i can't test this button in Unity cuz i can't click it (through game mode), but almost the same script for GameObject toggle works perfectly in vrchat (but not in Unity :D)@floral dove
@prisma juniper Make sure your Canvas isnt on the UI Layer, because VRChat is weird, and that layer makes it so you can only interact with the canvas, when the menu is open
it's in "default" layer
And the canvas has the VRC Ui Shape Script added?
yup
vrchat can see the canvas but not the buttons
i think problem is inside the U# code but idk, same code for object toggle works fine
@prisma juniper make sure you've got a graphic raycaster on that object. If you want to test in the Unity Editor, you can select the EventSystem while the scene is running and take a look at the debug info in the inspector
Can i somehow get all the objects 1-15 from the Role list object ? Without me having to put all the 15 objects in unity into list
GetComponentsInChildren of type Transform. However that will include the parent itself. And then getting the actual GameObjects or UdonBehaviours requires additional effort. Alternatively you can use a loop using Transform.childCount and Transform.GetChild(index)
Does U# do for each?
foreach(Transform child in transform)
{
}
Yes
But not like that I think
Actually strike that, it works using enumerators. Which I have no idea how they function, or if they function in Udon(sharp)
Which one?
.childCount
@floral dove
Okay read up on it, and Im pretty sure it doesnt work, because currently it just turns foreach into for-loops.
It would only work with a "real" foreach, since those contain some compiler magic to make Enumerators work I guess. Gonna ask Merlin for confirmation
Ok. You could just try it, too - seems like the most straight forward way to test.
Yeah, but I like explanations as to why something does or doesnt work, so I can remember it more easily.
But in general I would agree. However I dont have a Unity Project with U# open right now...and I dont want to boot it right now, just to test that.
@floral dove welp i tried, button is workin - U# script - nope, dunno why 😄
They do. But I guess not in the way youre using them
which is a little unconventional
i printed 1 >> 4 and got 0
Yeah I think thats just how right shifting 1 works
or rather doesn't work
That is how Rightshifting works.
gah got my ends mixed up
That has nothing to do with endians tho :P
yeah you're right
Its just a non-cyclic shift.
Not sure if that has to do with arithmetic shifting >> and logical shifting >>>
I think those are just for whether or not you want to preserve the signed bit
is vrchat/udon compatible with the unity Director Timeline?
i can't find an answer online
I'm just trying to figure out the best way to trigger animations in my environment and the director timeline is so simple compared to the nightmare that is the animation node thingy lol
Yes, you can use the timeline. I believe we've blacklisted the ability to call arbitrary methods from the timeline for now but using them to trigger animations should work ok.
What has smaller performance impact ? 15 objects being deactivated and 15 objects being activated or 15 objects changing Material ?
there's one way to know for sure, @stark adder - try each one and measure your performance!
Tried it 😄 but its very hard to see
if you're working with syncing some of the objects, it may be better just to change their material so you don't incur the overhead of different objects
lets try that too
Not synced
just local
But i'd say that Material changing will be better anyway..
Because usually its its 15 OFF 15 ON but sometimes is 30 OFF 15 ON etc.. but it would be always 15 change
Yeah, generally you have a small overhead from having more objects in your hierarchy. It's a TINY difference, but it's something.
I have an issue with my world being the same size regardless of avatar height.
@floral dove okay cool thanks. Partly why I asked is because, when I Build and Test using the Animator, all my animations start automatically, but when I use the Timeline and go into VRC, everything is still. So I'm wondering if there's a puzzle piece I'm missing
Is there a way to change the lighting of a mirror so it doesn't use the directional light that the world uses?
Question: Is there a way to have a Udon Script be broadcasted globally to all players once one player triggers it? (Kinda like an interact back in SDK2 days and settings it to global instead of local)
@errant pilot SendCustomNetworkEvent has a choice between Owner and All.
All does what you want here.
Check out the UdonExampleScene for examples.
To clarify my head will be leveled with the doorknob regardless of using a tall or small avatar. How do I fix this?
@manolo you want to change the height of things in the world based on Avatar height?
No. The it's like the world is already scaling to my avatar. How do I stop that?
That's not something built-in, is this a world you made yourself?
I got it from a friend. The scale by default is 100. I also tried 10 but same issue.
What scale? Ask your friend what they did, it must be a graph or script they added.
Oh, you mean on the model you're importing?
Yep.
What scripts are in the world?
None so far. I was just excited to see the world in VR so I added collision and tested it.
I did the bare minimum just to see it. I added vrcworld prefab with a spawn point and that was it.
Hm, I just don't understand what's going on then, sorry. There's nothing that auto-scales a world to your Avatar height.
Weird. Thanks for helping though.
Thank you @floral dove . I am going to compile the code and hope it works and if it doesn't, ill need to rethink my code
Wait does instantiate work with that method? Or is it still local only?
Instantiate does not currently work across the network
Damn i thought so. Hope yall can get that to work soon 🙂
It's in the works but there's a few things ahead of it in importance. We recommend you use Object pools for now.
I'm currently using Instantiate to place a 3d tile system, but for some reason tile rotations don't show up in VRChat even though translations do.
@floral dove does anything here stand out to you as wrong?
How many tris/polys should a normal gameobject have?
I have a metal barrel with about 1k tris (500 polys), is that a fair amount?
That sounds pretty reasonable. As long as your not building for quest, tri's are not a HUGE issue. As long as your not going for 70k+ tri models placed everywhere
Ok, thanks.
Is it possible to make other players be able to see instances of an object? I made a little gun that shoots instantiated balls, but only the one who shoots sees the balls
So what I'm getting is that instance is referring to what is being effected and the value is referring to how it's being effected. Is that correct?
how do i get particles to show in the mirror?
How can you catch when someone presses TAB with who pressed it ? U# Currently no idea how to do that
What event ? 🤔
Have you tried
if (Input.GetKeyDown(KeyCode.Tab))
{
//do something
}
I have not but i dont think it will work but i guess doesn't hurt trying it..
Ok I just read your question again. I only answered one part of it. Someone else is gonna have to help you with the exact functions for getting player name.
@dark tiger Instantiate is local only for the time being. So use object pools instead
@vernal phoenix Make sure that your mirror is showing the proper layers. Dont know exactly what layer it is, but the default mirror does the trick on showing particles.
Hey all, trying to get a physics object to play sound on collision in udon. (bonus if I can get it to only play when object it hits is a specific object or set of objects) Is this a simple thing?
Sure - you want OnCollisionEnter and AudioSource.Play
@errant pilot. thanks :)
@floral dove Oh yeah that was a simple thing 🙂 Thanks.
is it possible to get the worldspace view position of the avatar the local player is using
i can attempt to get the eye/head bones but sometimes the eye bones are unset and the head bone can have a large offset
You cant get the "view position of the avatar". But you can get the camera position of the player. Which is the position of the TrackingData of the Head.
I'm a bit new to world building and I'm wondering whether I should build the majority of my world in blender first? Or just try and use probuilder in Unity
I'll be using the Udon SDK
@pallid yarrow that would have to be a choice you make. Personally I prefer doing it in blender as that gives me more control
Not sure what you wrote there, but Blender gives you more control, while Probuilder does some for you.
Pros and cons for both.
But learning a good tool, even if it takes a little time is better
What goes into the instance side of the VrcpickupGetIsHeld node?
the VRCPickup on which you want to call this method
btw - you can hover over ports to see their type
That is what I guessed. I was going to use the get component but there didn't seem to be a VRCPickup type node like there are for other data types. I had to look in the full search to find it
it might just be named different from how you expect. FYI the easiest way to get a reference to a particular component is to drag and drop that component from the Inspector into the Graph. This creates a public component for that variable type that you can then wire up in the inspector.
Ohh that is a helpful little trick that I didn't know about before. I was going to have public variables but didn't want to have to tie in the components because I have the script across multiple objects
anyone here familar with toggles
for some reason only one of them works
i have a total of three
Are they all set up the same way?
yup
with different animations of course
and naming conventions
I dont know if its because i copy pasted the edit that works and modified that one
i ended up remaking both toggles instead and still nothing
or maybe...test avatars could be buggy with stuff
Oh are these toggles on an avatar?
I think you may be asking in the wrong channel
Yup lol
Try the avatars-3-help or avatars-2 for help
yup there now, they need to rename this channel lol
Is it not allowing you to upload/test your world?
Yes
Oof.
@stark adder - try closing Unity, deleting your Library folder, and opening your project back up
hm launching again
Trying build
let's see
But look fine..
Build is taking more than 1 second
Its.. kind of fixed I can't press buttons now
Any idea why,.. ?
Buttons??? Like UI buttons or the actually game buttons
These buttons In-game
Also i literally did nothing from last time i used it.. Yesterday it was working fine before i closed Unity.. Then i Opened it today and did Build&Test without any changes and it broke
But cant interact.. 😄
Go ahead and reinsert the udon graph/script. If all else, delete the objects and rebuild them. Sometimes udon does a thing where it just breaks but rebuilding it usually works
well wil ltry i guess
nop
Not working at all
This is build that i built yesterday.. This is how it should work
Today.. No changes
Also in Unity it works just fine

Yea
Magic
Like what
Also my other Udon script on different object (not interact) works just fine
I had it where my ui just magically vanished. Rebuilt everything and just worked... the code was the same
So in theory, it would work as well. Aparently im incorrect.
This is some kind of super weird magic
Welcome to programming. The rabit hole just gets deeper!
😄
The only other advice i got is to rebuild EVERYTHING. including the code
Yeah udon is still alpha. So weird stuff like this happens on occasion with udon
Building again.. 😄
nope xD
Its just all Interact stuff
All other stuff i try works
Only Interact
Are you using U#?
ye
Did ya quadra check that nothin is mispelled
i have not changed the code since yesterday..
What if your cat walked on your keyboard overnight?
XD
Fair enough
Yeah your best guess is mine at this point then
#MagicOfUdon
I created a prop spawner menu but even though the prop prefabs are set as global and everyone can see them, the props spawned through the menu can only be seen by the one who spawns it.
@shy cave Are you using Instantiate?
Good question. Give me a sec.
If you are, instantiate is local only for the time being
Yes, yes I am. Is that a problem?
Yes. You cant globally instantiate an object... for now
Use an object pool instead.
public override void Interact()
{
var transform = roleList.transform.GetComponentInChildren<Transform>();
for (int i = 0; i < transform.childCount; i++)
{
if (i < matAllObjects.Length)
{
var o = transform.GetChild(i).gameObject;
o.SetActive(true);
o.GetComponent<MeshRenderer>().material = matAllObjects[i];
}
else
{
transform.GetChild(i).gameObject.SetActive(false);
}
}
roleList.SetActive(true);
backButton.SetActive(true);
backButton.GetComponent<MeshRenderer>().material = transform.GetComponent<MeshRenderer>().material;
mainMenu.SetActive(false);
}
What is an object pool?
I have never used one so i have no idea.
@floral dove well i fixed the animator setBool problem, but here's another 1, UI works perfectly in unity but when i launch test world i can't press a single button, how to fix it? :\
I'm a little new to Unity, how would I go about adding motion activated lights?
You can remove Public Override
hey @stark adder - this room is for asking questions, please pull back a little bit from using it as your dev blog.
is there a way to prevent players from casting shadows but still have them lit by realtime lights?
There is an option for shadows in your lighting window @icy gale
Is is possible to turn VRC_pickup on and off by say, hitting a button in world?
@errant pilot i don't really see anything?
i want realtime lights to cast world shadows but not player shadows
maybe i can mess with light probes
@drowsy tundra - you could enable/disable their colliders
Is changing the environment in a vrc udon map the same as in 2.0? (Teleport + Destroy)
Does OnTriggerExit/OnCollisionExit not fire if a player is holding the object that exited?
can you change player orientation to match world normals? Would it need to be basically a vehicle?
How does the maze world allow taggers to move faster than those they are chasing?
Can i make parent move same as child in world ? I am moving the child and i want parent to move same as the child i am moving
does the ToggleGameObject udon script in latest sdk work locally or globally? wanting to make sure my mirror toggle is local.
Its local until you tell it to be global
👍 Thanks @errant pilot How would I make it global if I needed?
Thanks!
@jaunty schooner you can change the movement speed of players using VRCPlayerApi.SetWalkSpeed and SetRunSpeed. Check out the graph on the default VRCWorld prefab for an example.
@floral dove Can that work, lets say, when someone enters a collider? Or interacts with an object? Or can it only be set when the map loads?
@errant pilot it can be set at any time.
That is something new with udon... Thats very neat
I know this question gets over asked, but any update on the potential timeline for video players and/or the audio rework?
I'm very confused about UI buttons, I set them to GameObject.SetActive (Bool) and it only turns the object on, not back off if clicked again
Both are bring actively worked on right now. Video Players are very likely to be in the next release. Audio upgrades may need another release or two but they're not far out either.
@scarlet lake check out the UdonExampleScene for an example of a working Toggle. The Mirror system has an Udon graph that is made to be reusable, which will turn things on and off to match a UIToggle.
ffs lol why must nothing be straight forward
Your inspector there just sends GameObject.SetActive false since you have an unchecked box.
But that box will never change it's value because you're never changing it.
You made a Button, Unity has no way of knowing it's supposed to be a toggle.
Thanks for that update on the progress. I appreciate all the work you guys do
Oh, I see, there's a toggle version. Of the button.
@scarlet lake If you do Gamobject.setactive(!Gameobject.ActiveInHiearchy), itll set the gameobject the opposite of what it is in the hiearchy, aka, toggle.
Can you make buttons passthrough ? If i make it pass through it just becomes no longer interactable..
If you make the collider a trigger, I believe you can pass through it and make it intractable
Is it a UI button or a gameobject @stark adder
GameObject
Under your collider settings, check isTrigger
Youll still interact with it, but your player model will passthrough it
Np
Would text mesh pro gameobjects appear in the VRChat Camera?
They have worked for me, yes
Thanks, Ill test it out.
There weren't any errors before I imported the SDK??? And then all of these just exploded in :( I have no idea what any of these are
(please ping if replying)
@plucky tree Seems that your sdk didnt import correctly. As it is missing some of it's dependencies. Delete the SDK from your assets folder, then reimport it, making sure everything is checked before you hit the import button
Delete everything regarding your VRChat SDK then import it again. Looks like you tried updating it, skipping the clearing step which can cause a lot of errors
@plucky tree
@plucky tree - also looks like you may be importing several different SDKs in one project? Keep SDK3 Worlds, SDK3 Avatars and SDK2 away from each other.
I wiped all the vrc stuff from my folder and reimported it, and the same errors are coming up
I'm also only importing the SDK3/Udon package 😔
I'm gonna try importing it into an empty project and see if it pops up the same errors
can someone help me with this? i was updating the pictures in my world and then it's not uploading the updated pictures. when i check for errors it said udon is missing but it say that it's in play mode but i'm not in play mode. what's going on?
@sick dawn have you tried restarting Unity?
yes
ok, good. Next general troubleshooting advice I have is to close Unity, delete your Library folder, then re-open Unity.
this will not delete any of your assets, it's just cached data
@floral dove ok it fixed the udon problem but the updated pictures are no uploading when i do build and test.
the world is not updating
Try clearing your cache: https://docs.vrchat.com/docs/frequently-asked-questions#manual-method
Why can't I upload content yet? You must obtain at least "New User" Trust Rank in our Trust and Safety system in order to upload content. You can get this by just spending a few hours in VRChat, hop some worlds, and make some friends. Give it some time and you'll be able to up...
@floral dove didn't show how to fix the update problem
Did you delete your local cache?
I've got a problem. My world is fine in unity but in VRChat nothing is updating. Does anyone know why this could be happening?
Ah, server issues. That's probably it.
@scarlet lake check the link above and the announcement. You can clear your cache manually, it may help.
Thanks, I'll try it ^^
My cache isn't getting cleared for some reason :/
How do I manually clear the cache through the files?
Momo linked to it a few messages up
I can't get my music to play. I dragged an Audio Source into the world, assigned an audio clip, Play on Awake is checked. Then I added a VRC Spatial Audio Source component. But when I build and test, just silence 😦 did I miss a step?
@edgy moss Did you set the the spatial blend to 2d?
also, make sure volume and priority is high enough to be able to hear it.
both of those things are indeed in place, but thank you so much for your response! 🙂
Is it normal for an udon world to be 40mb with barely anything on it?
Mines 35mb and all it has is 2 dir lights, 1 camera, a world descriptor, a small mesh with an animation and particles, and a small terrain with nothing on in.
Created a new world to test. I guess it's not normal. Hmmm...
This random texture is reflecting light. Does anyone know how to fix this? The diffuse is just a normal png. Any other png works, but I don't know why.
It's the dark texture btw.
Fixed it by remaking the texture, but that was weird.
This is what it was supposed to look like. If anyone know what went wrong there, I'd like to know.
Hey, I'm new to Udon.
I made this Udon graph to make neon lights look glitchy :
But when I attach this program to my game objects absolutely nothing happen (no light glitch).
Question : what am I doing wrong? is the graph correct?
Thank you in advance 🔥
Sooooo my water shader isn't working. Help.
Works in everything but VRChat :/
It's just white in VRChat.
(Sorry for spamming this chat with so many problems)
Hey,
I'm stuck with the exact same scene. Even if I create a new project and a new scene with a new scene descriptor and click on VRC SDK > build, Unity builds the exact same old scene... 😐
Please help changing the build scene. Thank you in advance
yo I was just about to ask the same thing @west compass asked, it happens rn to me too
is there some type of global issue rn with testing worlds?
does testing a world right now work for anyone else?
uh I checked the world chat under development and they said its a global issue, rip
Alright, thanks for that info. I was hyped to create my first world.
VRC is like: nope, stop it. you'll not test your world
Haha I'm sorry that happend 😅 I was working on udon stuff but hopefully they'll fix it soon so we both can go back and continue our worlds
I've been struggling to make a teleport button ive been trying to follow tutorials but with no results, can someone please help me
@misty berry VRChat servers are broken, heard there will be a fix in the meantime
publishing a world still works...
How do I enable/disable a gameobject component in Udon?
Anyone have any tips for reducing file size of your world? I've already reduced textures down to 512 and Crunched them, deleted any assets,textures,prefabs and scenes I'm not using.
Well I managed to figure out what some of my biggest memory usages were and it was some sketchup models I decided to convert to FBX and decimate which reduced the file size by almost 75% so that's a start ^^
I'm still confused why my textures memory usage was so high even after crunching and reducing to 512 though.
Are you talking about ram or file size?
How do I add pens that can draw in the air in Udon or just SDK3 in general?
All of the prefabs I have tried so far haven't worked.
any idea why my local build & test using an old version of my map?, having to publish each time i want to test which takes 10x as long
File Size
I have another question though. Sometimes my 3d Models get it's Move/Scale Adjustment axis messed up and it's offset very far from my view. Is there any way to reset this or fix it in unity?
it is only me or others too? I made a world and now i started a new one but when i try to build for local test it is just loads the previous world.
yes this is a global bug
@azure moon current version of vrchat has a problem with local cache
and there is any way to clear that local cache manually until they fix it?
Why can't I upload content yet? You must obtain at least "New User" Trust Rank in our Trust and Safety system in order to upload content. You can get this by just spending a few hours in VRChat, hop some worlds, and make some friends. Give it some time and you'll be able to up...
Results can vary
let me see maybe it is working
okey thnaks for the help the manual cache clear is worked for me
erm.. I have no idea what I am doing and the documentation I can find doesn't cover it and youtube vids seem to be on months old version of udon, I have a world and it has an animated oceanic mesh in it, I simply want the mesh to animate in an infinite loop upon the world loading for people, however it does not animate at all, how can I make this happen?
@deft magnet you need a reference to an animator if you want to use it with Udon. I recommend you start here: https://docs.vrchat.com/docs/getting-started-with-udon
It you could just set your animator to play by default if you don't need it tied to any specific action.
Trying to make a radio.music player that will play and change songs for all users when a player clicks it. It works local for everyone but having trouble making it work globally for all players in world. This is what i've tried. I'm probably not using that correctly.
@deft magnet ill try , thankyou hopefully I can understand ^^
@floral dove sorry still not used to discord yet, um, I already looked at those videos, I saw nothing that told me how to do that in them
maybe im a bit dense >.<
It seems like you don't understand how to use Udon yet, which is cool, just means you have some things to learn. Those videos don't teach you exactly what to do, but they'll teach you how Udon works and you can apply that to your specific situation.
@deft magnet I think you can get an object to animate looped without any udon. if you drag your animation clip to the animated object in your scene, and make sure the clip has loop time checked, I think it should animate and loop automatically. Not 100% sure though.
I did but it does not play, in 2.0 I had to do that too but I also had to drag an animation controller onto it and then in the controller set the idle animation to the clip for the object, however, you can not do that in udon
because animation override controller cs does not exist
how do i get rid of errors like this??
did a quick test and seems to be working for me with an animated character. not using any udon. When i run build & test world opens with character animated. (though today I need to make sure I delete my cache before every build and test)
yes works in play also
wha? how did you get "animclip" in yours?
are you running udon vrcsdk?
I dont have that as an option
running current sdk
yes but the udon one or the vrc avatar 2 one
there are 2
current
theres vrc sdk 2 then avatar 3 and udon so 3 I guess actually
the sdk3 worlds
thats udon then >.<
so why dont I have anim clip D:
my whole script list is completely empty
theres nothing at all
I heard that in the "vuirtualfurence convention" map that menus and buttons were scaled based upon the local avatar height. Does anyone know where I would get that information from if I was making a world? As in where would I be able to find a value pertaining to the height of the local avatar?
When launching VRC in local testing is there a way to get debug logs from my client?
finally got it, thankyou, that was sooo confusing >.< xD
If you're having issues with Build & Test or Publish showing an old version of your world, it may be due to a bug in the latest patch of VRChat, and clearing out your cache may help. Find the instructions for clearing your cache here: https://docs.vrchat.com/docs/frequently-asked-questions#how-do-i-clear-the-vrchat-cache
To reply to myself you can get the headbone location of the avatar, so using that you've be able to work out their height if you know their spawn location or even compare to the foot bone.
But secondly is there a way to tell when a player changes avatar?
So I can then change the height to be appropriate when the player changes avatar.
Maybe I could do it thought the setup of the pedestal to tell all the important things that the player has changed height?
@dense halo - thanks for adding that helpful info. I'll recommend that you use Tracking Data instead of Bone Data when possible because bone data can change a bit based on the avatar setup, whereas Tracking Data should give you the real World Positions of the Avatar's head and hands. You can get the data from VRCPlayerApi.GetTrackingData
Unfortunately, no - there is no method to directly detect an avatar change, you'll need to come up with a workaround.
@deft magnet - that's the animation clip that they're playing in their animator. Maybe this helps: https://docs.unity3d.com/2018.4/Documentation/Manual/animeditor-CreatingANewAnimationClip.html
@surreal flume - check this documentation for all the info there is to know about debugging Udon when running in the client:
Here's how to Debug your Udon Projects: https://docs.vrchat.com/docs/debugging-udon-projects
What is Debugging? Debugging is how you learn about what's going on under the hood in the VRChat client and your world. It's a key skill to develop for programming in general, and for building your worlds. VRChat Logs When you use the VRChat client, it saves logs about things ...
Thanks. Also clearing out Cache-WindowsPlayer fixes the world loading problem.
glad to hear it!
@floral dove Thanks for the tip to use the tracking data, I'm still new to unity and this so working a lot out as I go. I assume that gives you the headset location?
yes - the tracking data represents the headset and controllers
Is it safe to assume that all objects spawn at the start of the game if in the world, so I can use OnSpawn as an alternative to "Start" or unreals "Begin Play"?
Or is onsceneloaded better?
I don't know for sure, I'd recommend using Start, as that should run after all components are registered and available, network is settled, etc.
Okay thanks.
You can use a Block node if you want several things to happen in order on Start without making a long chain
I just didn't know if start was udonsharp friendly in code as it wasn't in the list from the UdonSharpBehaviour.cs
Start is a Mono function
meaning that UdonSharp doesnt specifically need a stub for it. Which in return means its not in that "special" list
Ah okay understood! Thanks.
So are Update, FixedUpdate and LateUpdate btw
Is there a pipeline of the order things happen in?
So I can know if a player will appear in the level before "Start" happens?
For Unity Events this is it:
https://docs.unity3d.com/Manual/ExecutionOrder.html
Good luck getting through that
Thanks!
This server is so friendly! I'm actually getting answers to questions, if I'm spamming it too much let me know!
Not at all - appreciate your well-formed questions and you following-up with the answers when you find them.
hm...my world isnt updating when i click build and test
its stuck at an older version
this has been happening to me with avatars too and jumping on a vpn fixed that
when i wasnt on a vpn i couldnt even connect to the built world when testing it, jumping on the vpn allowed me to at least load the world but its always an older version of it
yeah that's been happening today, it's in the second topic pin
have to manually delete cache
ah okay thanks
do i need to put a vrc ui shape script on every canvas?
like if i had a canvas beneath a canvas, does that require the ui shape script? or just the highest one in the hierarchy
@daring copper why multiple canvases? Pretty sure you should only have one canvas at top, the rest can just be UI elements.
yeah i just realized that haha, i was kind of using canvases like i would use grids in xamarin or wpf to line things up and keep structure, but i should be using panels instead...i think
at least the first result on google told me to use panels
but would that be the reason it wouldnt work, like would the ui shape script break if i had multiple canvases?
hm...just tested it after switching everything over to canvases and im still not getting button click events to fire or the blue reticle
omg...
i already cleared my cache but i had to do it again it was an old version of the world again >.>
Yeah, you may have to clear your cache each time until the patch next week.
Panels should work. Make sure your canvas and children are not in the UI layer. You can always check your work against the Canvases in the UdonExampleScene
I'm still having problems with my water shader. No matter what I do, It's just white in VRC.
Does it use any scripts?
It uses a water script.
You can't use Scripts in VRChat - that's why we made Udon!
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 ...
If you want to use the script, you need to create it in the Udon Graph or with UdonSharp. If you're new to programming, those may be difficult tasks. You can start your journey by reading those docs and then going through the UdonExampleScene to learn how you can put things together.
If I just just copy paste the contents of the script to an U# script. Would that work?
Nope! You gotta learn if you want to make custom scripts. Start with the docs I posted.
Well this script is about 500 words long so there's no way I can convert this. Is there a VRC ready water shader I can use somewhere?
o.o
SO MoMo I finally got the animation to work xD
but now I am sad because I have a new problem >.< it seems like the sheer amount of data in my map is choking the sdk to death when I attempt to hit the "builder" button the entire unity session stalls to an infinite hang, and If I manipulate memory to force the function to execute to bypass the stall the sdk crashes
Oh wow, never heard of that, sorry. Do you get any errors in your Editor log? How big are your animations / models?
no, it never even gets to generate a log, the whole thing dies
my map is a fully modeled cruise ship vacation for furries type thing I been working on and I been working on it for a while now the ship base alone before I started modding it was 157 megs but it has since grown to 1.8 gigs from alterations and fleshing it out floor by floor, I think its the ammount of memory or data the sdk is trying to work with or something, I made it fully functional and it sits in a bathtub with a yeenling playing with the ship in the background as his momma yeen scrubs him with a bubble bath animation in the distance xD, ish cuute xp, but then outside the giant bathroom is another scene which is a city setpiece with the king of all cosmos in the stars... I dont know how much data its putting through to the sdk.. er I have 1.2 tb of ram... I think I might have gotten a little too ambitous xD
Oh yeah, you can't upload that, sorry.
I don't know exactly what our file size cap is but I recommend you get it under 200 at least.
aww ;/ ok
A tip a found out yesterday is that textures can take up a lot of space. Try reducing the quality of textures.
You can also break things up into multiple worlds with portals between, but you'll want to reduce the size of each world.
hm...my ui works normally when it's not rotated, trying to rotate it 45 degrees to match an object though makes it so i cant click the buttons
How do I add pens that can draw in the air in Udon or just SDK3 in general? All of the prefabs I have tried so far haven't worked.
I'm getting a "System.Exception: Invocation requires method expression!" error for this:
VRCPlayerApi LocalPlayer = VRC.SDKBase.Networking.LocalPlayer;
Vector3 PlayerHeight = LocalPlayer.GetTrackingData(VRCPlayerApi.TrackingDataType.Head).position;
Can anyone help me out?
Is it the way I'm passing in the head tt?
@dense halo you're calling a method as if it's a property.
@shy cave you could try making a pen using LineRenderers: https://docs.unity3d.com/2018.4/Documentation/Manual/class-LineRenderer.html
Okay, thank you*!*
Recently got into world building. However until now in the building process i've started to get these errors when trying to test a world and when it failed it just booted me into my previous save build. Anyone know what may be the cause of these errors?
Those are warning not errors the issue is unrelated to your project and is on vrchat's side currently:
https://ptb.discordapp.com/channels/189511567539306508/657394772603830360/749384653948977193
Thank you ! ill try this out but im glad i atleast know whats going on now.
Hi hi
Is it possible to turn off my HQ mirror when i turn on the LQ one?
Yes
ok i dont know how for the moment but now i know i can ^^ i just need to found it 😋
You just do what you do to the HQ mirror but in reverse 😄
You need to toggle the mirror so then you can turn it off as well
So toggle on the mirror you want to activate and off on the other
Then you can press it again to turn them off
oh ok i get it now thank you
in an udon script, how to I get player who initiated udon behaivor (trying to do setowner on object, which needs a player input, trying to figure out what i need to plug in to that)
is this correct?
@hearty linden - actions always happen locally first, so you want to get Networking.GetLocalPlayer
@floral dove Thanks. Trying that now. hopefully it does what I think it does for me 🙂
how do i use the combat system?
@scarlet lake the combat system is not updated for Udon yet, you'll need to use SDK2 if you want to use that.
how did it work on the boxing map then?
If the boxing map you're referring to is this one: https://vrchat.com/home/world/wrld_1e02aa98-d6e8-4109-9803-754a6d3d3ba3
then you may be able to ask the creator of the world @worthy beacon for some tips (though keep in mind they might not be around right now)
I believe they created their own system through lots of hard work.
hello yes?
am in middle of updating it XD
the combat system is accessible through udon, i wouldn't recommend it atm, after avatar 3 the ragdoll effect was broken. If you wanna force a death animation it might be better to rig up your own by using a station, forcing a player onto it, play said animation, then force the player off, then teleporting them
its somthing i plan to look into on the update after this one that im doing
This happens whenever I try to join my world
@icy gale check second pin in this channel about clearing your cache
i've been deleting the vrchat folder in appdata each time i close the game