#udon-general

59 messages · Page 23 of 1

sinful slate
#

so i guess the current alternative for save games is basically doing what old DOS games did: instead of saving, you get save codes which you can enter

fiery yoke
#

Yeah. You can encode game states in a string

#

Doing that efficiently is a little tricky tho

sinful slate
#

yep, but definitely posible

fiery yoke
#

Plus it requires that you have discrete game states

sinful slate
#

true

fiery yoke
#

But that also makes syncing easier

sinful slate
#

although in base36 you could encode quite a lot of data in a very short string

vale current
#

just use base64

sinful slate
#

well, it should be easy for the user to enter it 😉

#

base36 would be simply alnum

vale current
#

I think base 64 is simple enought

fiery yoke
#

Base64. And yeah that is 6 bits per character if my maths isnt wrong

vale current
fiery yoke
#

6 bits per character isnt much

vale current
#

or use base2048

sinful slate
#

@vale current base64 is terrible for a user to remember, as they have to remember upper and lowercase characters

#

plus two special characters

fiery yoke
#

You would never "remember" a state string

#

You would have to copy and paste it.

sinful slate
#

copy and paste in VR? how does that work? 😄

fiery yoke
#

Well thats the problem

#

It works

#

but its cumbersome

vale current
#

it's called use your keyboard in vr

fiery yoke
#

You also have to do Ctrl+C, Ctrl+V for Video Players in VR

vale current
#

not really practical

sinful slate
#

not at all, yeah…

fiery yoke
#

Again VRChat is not a game engine :P
You can use it to make some cool experiences, but its not there to make your VR games in 😉

sinful slate
#

but well, if all you want is to store a dozen boolean values, a 2-character base36 string would actually be enough.

vale current
#

yeah but having vr games you can play with friends easily is a good thing

sinful slate
#

^ this 🙂

vale current
#

so making games in vrchat is always a good thing

#

before udon most worlds were just talking/relaxing worlds

fiery yoke
#

I would disagree

vale current
#

now we can have actual things to do

fiery yoke
#

there were a lot of cool interactive worlds with SDK2 as well

sinful slate
#

all the climbing worlds were sdk2, yeah

fiery yoke
#

You could have done a lot of stuff with Animators, UI Events and Standard Assets

#

Minus Standard assets you can still use Animators and UI Events in SDK3 to make a lot of things without even using Udon at all

sinful slate
#

(to be fair, that one climbing world, climbing carnival, is definitely missing a save game feature :P)

fiery yoke
#

I even managed to make a Trigger-Toggle System with exclusively ParticleSystems and Animators (so yeah you can put it on Avatars). Admittely its pretty Janky. But it works...

vale current
#

welp, I can't find a good solution for my station problem

#

I guess my world will be vr only

fiery yoke
#

Yup. Unfortunately there is often something that you just cant work around.

vale current
#

maybe

#

I can detect when you move the camera at the edge of the view angle

#

and rotate the station

#

using the mouse X input

fiery yoke
#

lol

#

That sounds so dumb, that it could work

vale current
#

btw I got the full list of inputs

#

and found out that every gamepad inputs are present in the game

#

like, the standard xbox gamepad inputs

#

also, is there a way to test a world in local with multiple clients ?

fiery yoke
#

Yeah. Thats what the "Clients" setting is for in the SDK

#

However it doesnt work well

vale current
#

I tried the one in the sdk but it's completely broken

fiery yoke
#

especially with stations

vale current
#

exactly

fiery yoke
#

GotoFinal has a tool that lets you test locally with multiple profiles

#

You can try that

vale current
#

interesting

#

I'm trying to make a custom physics with stations but I need to test the safety system I made

#

so stations respawn when the player in it disconnect

#

is the tool you're talking about called GotoUdon ?

#

because it doesn't use actual vrchat clients

fiery yoke
#

Yes

#

It does use actual clients

#

it just starts them with parameters for different profiles

vale current
#

oh ok it's just not presented as a main feature

fiery yoke
#

Yeah its the client manager

vale current
#

hmm

#

just found out that GetBonePosition ignore finalIK

pliant jay
#

hey

vale current
#

does someone knows why it does that ?

#

like

#

the feet stays where they were before I enter the station

fiery yoke
#

When youre in a station, ik is pretty weird

vale current
#

is there a way to know if someone is in a station ?

vale current
#

sad

fiery yoke
#

You can setup your own logic

#

WIth StationEnter/Exit

#

But you dont know "who" is in any particular station

vale current
#

well in my case I do

#

because when someone enter the station they become the owner of the station gameobject

dusk zealot
#

Question again: "OnTriggerEnter" is not working.

#

it works on unity On play mode.

vale current
#

I just found out that OnStationExited is not called when the player inside the station quit the world

fiery yoke
#

Well not locally no

#

obviously not

#

There is two methods for entering and exiting. One is local, one is remote.

#

The remote one is hidden in the debug inspector right now

#

PhaxeNor has a really nice graph on that on his Twitter

vale current
#

it would be awesome that the Station event are called for local and remote and just have the VRCPlayerApi as parameter

#

that would solve everything

fiery yoke
#

Yeah. But that would be smart API design, and thats a rare treasure in programming :^)

vale current
#

XD

sharp basin
#

does anybody have an example of how the render settings set skybox node is used? I would like to swap my skybox material on an interact event

vale current
#

now I just need to fix this, when the player quit while in the station, the new master of the world take control of the station without being in it

fiery yoke
#

@vale current Welcome to the world of Networking. Have fun.

sharp basin
#

@fiery yoke I had seen on a forum or something you mentioned changing skybox mats with that node- do you have an example?

fiery yoke
#

You just give it a material

#

shouldnt be too complicated

sharp basin
#

drag from hierarchy?

#

then op unary negation to swap back to another skybox mat?

fiery yoke
#

wat. No. You cant "unary negation" a material. You need a variable for a material. And then you get that variable and put it into the node.

sharp basin
#

oh duh that only for game objects

#

oop

vale current
#

help, even OnOwnershipTransferred is not called when the player quits and the new master takes ownership

fiery yoke
#

OnOwnershipTransfered is a Network event. And its only called for the previous Owner of a GameObject.

#

Because that previous owner left. It doesnt get "called". "OnOwnershipTransferred" is pretty ambiguous

vale current
#

guess I'm gonna make my own check for owner change

#

yep, it works

#

I can detect when the player leave

flint urchin
#

@vale current @fiery yoke stations do in fact have VRCPlayerApi parameter now, however, it returns null at the moment. 😅

vale current
#

what XD

fiery yoke
#

gg wp

vale current
#

but how do you get it, I didn't found it anywhere

flint urchin
#

Don’t think it was supposed to be added this update, as there is no changelog for it

#

The new graph has it (beta)

vale current
#

interesting

#

let's hope that mean that in the next update it will work

flint urchin
#

Hopefully. Next update for Udon is supposed to include a lot of goodies

vale current
#

ooh

fiery yoke
#

Soon™️

flint urchin
#

Hehe, they are currently working on the video player. So that will take some time and testing

vale current
#

ok I got everything working, from the station controls to the player disconnect safety

flint urchin
#

@vale current @fiery yoke I take it back, tested a bit more (after the recent open beta update) and now the Stations returns VRCPlayerApi info.

sharp basin
#

hmm. Having an issue with my skybox material changing.

#

The button does change the skybox material, but instead of changing it to the material specified, it just turns blue, like a flat blue

fiery yoke
#

@flint urchin Thats pretty cool. Thanks 👍

sharp basin
#

Also I synced the vars and now it will turn from the day to night, but not vice versa

flint urchin
#

@sharp basin it looks like it just silently fails to do anything after the first time

dusk zealot
snow orbit
#

you dont get a debug message?

dusk zealot
snow orbit
#

it looks like he doesnt like collider equals

fierce parrot
#

Is it possible to update a textmeshpro component's text? I don't see it as a variable

#

nevermind, it's not supported

snow orbit
#

i am searching for a way to trigger a function in another node graph and send values over

flint urchin
#

@sharp basin tested some more, and it does work. What's the settings on your material (shader specifically)

sharp basin
#

Its a skybox/cubemap shader @flint urchin

#

do you want to see the settings on the shader?

flint urchin
sharp basin
#

ok lemme see one min

flint urchin
#

so double check the udon graph

sharp basin
#

building currently

#

@flint urchin could you send ur udon graph real quick? a screenshot

dusk zealot
flint urchin
sharp basin
#

hm ok let me change somehting around I mightve had something goofed

#

weird. Once it sets night active it wont let me deactivate it

#

as in, the skybox stays night

#

isNight var is synced, yes?

#

and default value is false?

flint urchin
#

It's not synced in this one, and default is On

sharp basin
#

do you start in daytime then go to night?

flint urchin
#

In the test yeah

sharp basin
#

ok, ig let me try flipping those two settings. dont know why

flint urchin
#

It's a Udon thing I guess

sharp basin
#

riiiggghtt

#

this is so scuffed, I have the exact same graph and settings and it doesnt work. Its like a one way toggle. Ill send another screeny

floral dove
#

if your assembly doesn't match your graph, you can select-all, cut and paste to kick-start the compiler. It sometimes keeps a cached version of nodes and doesn't actually compile what's on the graph anymore (fixed in next release)

sharp basin
#

oh just saw your message now Momo, got it. will try ❤️

#

this is like almost the SAME issue I had with my brrken teacups before. Once a var was chanegd it would not change back

#

it wouldent have to do with multiple udonbehaviours being on the same button would it? unrelated functions

flint urchin
#

That should work just fine

#

Each Behaviour has it's own compiled asset

sharp basin
#

even after doing what momo suggested, making a fresh udon graph and psting, double checking, its all fucked still lol.

worldly yarrow
#

hi guys, im working in this udon file, its to toggle rooms on teleport, this means, when the onTriggerEnter is activated the "currentRoom" will disapear and the "targetRoom" will be loaded so i wont have all the rooms enabled. This first part works pretty good, both rooms do toggle but the player its not beign teleported. Any idea to fix this?

zealous mason
#

"target position" is a game object?

#

@sharp basin i ran into a problem today myself having two 'enable' lines (the white line for lack of better term) going into one node. It was even a debug node at that. I recommend making two debug nodes for each line.

sharp basin
#

staight up ended making 2 seperate buttons for day and night, which required like 6 different udon scripts but it works

#

so just said fck the old one for now until I fix it

#

but the whole process of converting to be able to do day/night balooned world size (prob lightmaps) so gotta fix that

worldly yarrow
#

"target position" is a game object?
@zealous mason its a transform

dusk zealot
quiet bramble
#

Did you set the collider to "Trigger"?

#

Else you'll have to use "OnColliderEnter" IIRC

dusk zealot
quiet bramble
#

Then it's likely a bug. Did disabling "Is Trigger" and using "On Collision Enter" work?

#

I imagine this working just fine, but I didn't play with these kinds of events yet

dusk zealot
#

Can't use OnEnterTrigger? I want to use OnEnterTriger.

#

p.s. Maybe your graph is not working. collision is not collider.

mighty fjord
#

Does the object with the OnTriggerEnter event have a rigidbody on it? I recall having some weird issue where it would would crash my script most of the time, even though it worked fine in Unity

dusk zealot
#

It have Rigidbody.

quiet bramble
#

You get the idea from the graph 😛

fiery yoke
#

@dusk zealot If the player enters the trigger it will return null as all player objects are protected. Checking null for Collider.Equals will then crash the Behaviour. Use a branch with "ReferenceEquals -> null" before checking the collider.

stray junco
#

hi all

I'm little curious about UDON potential
and I'd like to ask couple of questions:

1 are we in UDON will be able to make autonomous AI's NPC idle and behavior's
just like in fallout 3 GECK ?

2 is it possible to make wind particle or some sort of force
to move avatar's body or hair on it moving?

3 is it possible to make new animation for swimming just like in some modern games
when you jump in water and your avatar transform in diving or squbadiving animation ?

4 is it possible when you make your avatar dancing
to move his viewpoint vision as well to make it more realistic ?

5 is it possible in UDON to implement music,video and stream player ?

thanks in advance 🤔

floral dove
#
  1. Yes
  2. Udon does not currently work on Avatars.
  3. See 2.
  4. See 3.
  5. Soon.
stray junco
#

@floral dove
ok thanks

vagrant sparrow
#

im not much of a modeler so im trying to use assets from unity store - is there a limitation of which models i can use or will that be handled by the sdk somehow?

wanton cliff
#

do the mathf trig functions use degrees or radians?

fiery yoke
wanton cliff
#

oh ok

#

thanks lol

vale current
#

Is there a way to get the local position of the player headset ?

#

relative to the room center

fiery yoke
#

Ohh well together as a question. No.

vale current
#

hmm

fiery yoke
#

And yes that is a problem.

vale current
#

yeah, I'm trying to get the player headset movement only

#

so I can apply that as movement to my custom controller

#

btw I tested teleportation without lerping and it doesn't use as much network as normal teleportation

#

but it stills use more than SetVelocity

wanton cliff
#

is there a way to tell if an object with a pickup component is currently being held by a player

#

i see the vrc pickup get isheld but i cant find anything like a vrcpickup type to actually get the pickup component for that

wanton oxide
#

you can use OnPickup and OnDrop (those aren't the exact names probably but eh)

wanton cliff
#

i need a boolean for whether its being currently held

wanton oxide
#

toggle a boolean when those functions are called then

wanton cliff
#

i guess i could do that

#

id have to create a separate script with what im doing though

#

and theres a thing to get the is held boolean i just cant find a way to actually retrieve the actual component

#

because i cant find a type for vrc pickup

#

actually maybe i can set a public variable and put the pickup as a literal

fiery yoke
#

There is a field for that

wanton cliff
#

what

fiery yoke
#

So. The type is VRC_Pickup

#

And there is a field for whether its currently held and by which player

#

Intellisense helps you out a lot if you use VS (with U#)

wanton oxide
#

assuming he is using graph tho

#

yeah intellisense is good shit

wanton cliff
#

theres SDK3ComponentsVRCPickup but i cant put a type for it in the graph

fiery yoke
#

Another reason to not use the graph lol :^)

wanton oxide
#

haha agreed

fiery yoke
#

But it should still be possible in the graph

#

But for obvious reasons Im neither sure nor do I know how

wanton oxide
#

its absolutely possible in the graph

#

but yeah who knows how lol

#

why not just use OnPickup and OnDrop?

floral dove
#

What happens if you drag a VRC Pickup to the graph?

worthy beacon
#

will setting the lerpOnRemote to false on VRCPlayerAPI.TeleportTo help with the whole failing to teleport thing?

quaint onyx
#

Is it possible to code udon with written commands, not a node graph? I prefer writing the script to connecting the nodes graphically.

fiery yoke
quaint onyx
#

thank you

wanton cliff
#

can an array be synced or does that still not work

hushed gazelle
#

Quick optimization question; If I assign the same audio clip to multiple Udon scripts (as in set this clip to an audio source -> play audio source), is it storing a separate instance of that clip for each script, or is it storing a single version of the clip that's called by each script?

pure parrot
#

hello , just wanted to ask quickly if this is better to start making vrc game with the basic code of unity or to try udon ?

#

i am totally new on making maps , i have 0 knowledge and i probably couldn't difference those 2 things

wanton oxide
#

your only option is to use udon (or u#)

pure parrot
#

oh so udon is more simple ?

wanton cliff
#

no you literally cant use sdk2 to create a new world anymore

floral dove
#

not true - you can still use SDK2, though we recommend learning Udon + SDK3.

#

@wanton cliff - you cannot sync arrays yet, but we're working on that right now, should be in a release soon.

neon badger
#

Hey guys, new to VR chat.
I wanted to ask if I can write my own C# scripts
And if there's a list of scripts for Udon (with the SDK 3)
Thanks!

floral dove
#

@neon badger - welcome! Yes, there is a community solution called 'UdonSharp' that will let you write in a limited C# subset that's compatible with Udon. It's linked in this channel about 10 comments above.

vagrant coral
#

I have trouble finding the "Set variable" node in the new udons. just got tired from copying it from old programs 😄 Where can i find it?

quiet bramble
#

Was either shift or ctrl

floral dove
#

@vagrant coral - drag and drop a variable to the graph while holding control. Check this video for quick tips on how to do things in the new graph: https://www.youtube.com/watch?v=IVjEx_H5BZc

VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!

As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...

▶ Play video
fiery yoke
#

It says that you need to hold control somewhere...right?

vagrant coral
#

oh that is clever 😄

#

nice

steel nova
#

does anyone know if Topaz player 2.0 is compatible with udon? know video players in general broke w/ udon but i can dream right? lol
https://booth.pm/ja/items/1752066

専用サーバーを通して、ライブ配信を超低遅延(1秒程度)でVRChatから視聴するためのプレイヤーです。 OBS等の動画配信ソフトを使用して、2000kbpsまでの動画を無料で配信することができます。 音声のみの配信であれば、TopazChat 2.0 Streamerを使ってカンタン操作で配信できます。 https://tyounanmoti.booth.pm/items/1756789 個人利用向けです。法人での利用はTwitterのDM等でご相談ください。 以下のような用途を想定しています。 - 音楽演奏を高音質かつ低遅延でワールド内の人たちに...

sharp basin
#

a block node in udon basically just lets you run multiple things at once yes?

fiery yoke
#

Not at once

#

one after the other

sharp basin
#

oh ok

#

that works for me!

#

trying to use "render settings set custom reflection" node, but cant seem to hook up material variable to the value on the node?

floral dove
#

@steel nova - Video Players are not broken in Udon, they are removed - no external assets will change that. The good news is that we're making good progress on adding them back in with more features than before.

steel nova
#

gotcha gotcha, just was curious if some 3rd party stuff may had gotten through.

floral dove
#

hm - @sharp basin - that node wants a Cubemap, which looks like it's not implemented. If you file a Canny for it, we'll add it to the backlog and update you when it's available.

sharp basin
#

will do!

floral dove
#

@steel nova - if it had, we'd remove that as it would be a major security risk if someone figured out how to connect you to random servers without going through VRChat.

steel nova
#

yeah, i heard about that

sharp basin
#

momo, would you want it under udon live alpha feedback?

#

That was going to be my workaround to the reflections not changing when skybox material changes. looks like a reflection probe it is 😦

floral dove
#

yes, that's a good place for it, nosferatu.

light kettle
floral dove
#

@light kettle you'll want to change the Gravity Strength for the VRCPlayerApi, like this:

#

Very similar to how you set Run + Walk Speeds like in the ExampleScene and on the VRCWorld Prefab

light kettle
#

@floral dove if i change that, can i walk the wall like floor?

floral dove
#

ah, now I understand what you want to do. No, this will just change the effect that vertical gravity has on a Player.

light kettle
#

I wonder how can i make this world

floral dove
fierce turtle
#

#udon-general how does Lolathon make is avatars go invisible and make them scare people pls help me

floral dove
#

@fierce turtle Udon does not work on Avatars, sorry.

fierce turtle
#

Ok

radiant stratus
#

how do i import my world on unity version 2020

flint urchin
#

VRChat don't use Unity 2020

radiant stratus
#

so best use 2018?

vagrant coral
#

Something seems to have gone wrong with my project, Its a fresh one. Tried reimporting the SDK. still i get all these errors. the would runs into VRChat but nothing works in it (sounds & particle collisions) Any Ideas?

native estuary
#

Any errors?

vagrant coral
#

not what i can see no

#

and true 😄 i just started poking around for a reason and they scared me

native estuary
#

It's quite normal to have that amount of warnings in your console no need to be scared

vagrant coral
#

still confused as why all runs as it should in unity but in vrc nothing happens

#

like... "sound play on awake" wont event work

#

🤦‍♂️ Spatial audio source script was the culprit. I think I need sleep 😄

light kettle
#

@floral dove thank u!

ancient spindle
#

alright, i cant figure this out in the new editor. trying to make a toggle button, and i came across this link here. https://www.youtube.com/watch?v=GWv3zloRWY4 and there is supposed to be an input from what i see in his editor in the "gameobject" node, but i don't get that on mine. theres got to be something im missing. xD

This is a short tutorial on getting a simple button toggle working using Udon, the new VRChat scripting system. As an example, we're using it to toggle a mirror on and off. I've also included a segment on doing the same thing in UdonSharp, the C# compiler by Merlin allowing fo...

▶ Play video
floral dove
#

@ancient spindle take a look at the VRChat Examples folder for an UdonExampleScene with working Button Toggles you can play with.

ancient spindle
#

iv peeked in that folder, but it doesn't exactly show me how to create inputs for my nodes. the old graph had them already, but im unable to connect any variables because of the lack of knowledge in that area. :c

hushed gazelle
#

You GET existing variables and SET them with new information.

#

You'll also need to click on those variables and make them Public so you can drag the related objects from your world onto the graph values in the component.

floral dove
#

@ancient spindle go through the Readme and follow along in the scenes.

radiant stratus
clever trout
#

Hey, I've seen some cool FFT demos with audio done with Udon, was wondering if you can do the same with mic input at all? Or is that just for avatars to control their mouths?

radiant stratus
#

thanks

clever trout
#

any time!

vernal phoenix
#

how do i pull up a list of udon commands in visuall studio?

clever trout
#

I don't think you can. There is autocomplete as usual though, so you can see any properties/methods available on a given object

vernal phoenix
#

i figured it out

#

hold ctrl and click on udonsharpbehavior at the top

clever trout
#

nice

flint urchin
#

That only list what U# has available for you

clever trout
#

Ah yeah, you're just looking at that specific class 🙂 Autocomplete is probably the best bet. Missing those Udon docs tbh

vernal phoenix
#

yeah documentation is rough righ tnow

tropic canyon
#

Udon just uses the normal unity stuff so that's the documentation you just have to make sure it's in udon

solar swan
#

How would I go about making pens work with Udon? I've only started learning recently and I'm only able to make things toggleable :/

devout nova
#

How can I upload my avatar without using Unity

zealous mason
#

Don't think you can

mild tiger
#

will you ever fix the udon issue. where there is always 1 world master who gets screwed over by the voice whenever someone new joins?
buffering sound and more lagg than the others

floral dove
#

@mild tiger this room is for questions about building things with Udon - the Canny is a better place for bug reports.

mild tiger
#

its not a bug repport

#

its a issue with how udon is build, world master option was intended

#

im asking if they are going to change it

#

its a question litterally for this chat and only for this sdk option

floral dove
#

We're tracking this issue internally, it's not specific to Udon as far as we can tell. Master does not work any differently in Udon vs SDK2.

edgy moss
#

Hello everyone! ^__^ I'm extremely new to VR Chat (only a few weeks) but it's quickly consuming my life lol and I'm already working on creating my first world. I have a question hopefully someone could help me with. I want to create a very simple teleportation elevator that goes from one floor up to the next level. Sort of a "Beam me up Scotty" type thing, that when you step into the rings of light, you automatically float up. If anyone could point me in the right direction of how to make that mechanic happen with Udon, I would SO appreciate it! I ❤️ ❤️ -ScreamingColor

neon badger
#

Hey guys, I'm creating my first world and was wondering if I needed to clean up all of the unnecessary extra assets that I downloaded that I dont use in the project, in order to optimize; or, does it only use what is active? Thanks!

native estuary
#

Only stuff used in the scene itself get's uploaded (also not really a Udon question)

solar steppe
#

This does not trigger the animator

#

What did i do wrong?

chilly aspen
#

How would one get a list of all the player's VRCPlayerAPI in an instance? I found a method to do this before but didn't save the code.

zealous mason
#

@edgy moss sounds like you would want to set the player gravity to negative

#

@neon badger i believe it only uses active stuff

wanton oxide
#

@chilly aspen you can get a list of players, but currently list<T> isn't available in udon

#

so you can't do anything with it

#

there are other ways of doing it, but they get veeery complex

#

at least for what i can think of

fiery yoke
#

Use an Array of type VRCPlayerApi with a fixed size, OnPlayerJoined find the first element that is null, set element to the player that joined. Its not complex :P

#

Since there is maximum of players per instance

wanton oxide
#

that will only work for the first player that joins

fiery yoke
#

No?

wanton oxide
#

afaik onplayerjoined is only called when a new player joins right?

#

if not and it gets called when joining initially as well for each player, well uuh, that is great news and i need to do something with it

solar steppe
#

(any help would be cool, if you just tell me im doing something dumb ill go figure it out myself)

fiery yoke
#

another one that doesnt understand OnPlayerJoined...they should really put up some documentation or whatever.
If you join an instance with players, then from your view all the players join you. So you will get an OnPlayerJoined event for all players that are already in the instance youre joining

wanton oxide
#

yeah okay

#

in that case do what thehelpfullhelper said

#

yes, there is no documentation and it sucks lol

chilly aspen
#

Let's say I was populating the list using OnPlayerJoined but the list, at some point, got bad data and I needed to reconstruct the list from scratch. Is there a way to do this?

wanton oxide
#

nope

#

and its not a list btw, its an array

fiery yoke
#

Well there is sort of

wanton oxide
#

no lists lol rip

fiery yoke
#

Also I dont know how it would ever get "bad data"

chilly aspen
#

The example this occurs in is where two players leave on the same update frame, and OnPlayerLeft only removes one player from the VRCPlayerAPI list.

fiery yoke
#

No

wanton oxide
#

that never happens

fiery yoke
#

you wouldnt remove it

wanton oxide
#

it gets called for every player that leaves individually

fiery yoke
#

When the player leaves its api will become null

#

Plus that

wanton oxide
#

ooh yeah so you can do null checks on each item

#

when referencing it

#

in the array

fiery yoke
#
  1. You dont need to manually set the elements to null 2. Even if you had to it wouldnt be a problem
chilly aspen
#

Ah okay

wanton oxide
#

that is actually quite smart lol

fiery yoke
#

Well. Would be smarter to just have an API Method to give us an array of all players in the instance. But that would be good design, and we've talked about that :^)

wanton oxide
#

there is a method just for that

#

but it returns a list lol

#

if were talking about bad design haha

#

i'm sure we'll eventually get lists tho..

#

right..

#

right... 🙏

fiery yoke
#

Generics are complicated

#

Generics and LINQ is quite tricky to handle. Might take a while

wanton oxide
#

i know

#

but like, lists are a pretty basic thing lol

fiery yoke
#

Not at all.

wanton oxide
#

i really hope we get them

#

its not basic to implement no

#

but in a programming language

vernal phoenix
#

Can I not use an udon script to disable another udon component?

fiery yoke
#

No. The enabled field of an UdonBehaviour is not exposed.

wanton oxide
#

you can disable the gameobject its attached to tho

#

if all else fails you can put the udonbehaviour on an empty child

#

and refer to its parent when doing transform shit for example

vernal phoenix
#

I’m trying to destroy an object under certain circumstances but disable that script when needed

floral dove
#

@chilly aspen @fiery yoke - the next release will have a GetAllPlayers method. You pass in an array of whatever maxSize you want and you get back that same array filled in with all the players in the instance.

fiery yoke
#

And if the array isnt big enough it just crashes?

wanton oxide
#

it'd just throw an arrayindexoutofrange exception

#

or thats what i'd expect right, thats the correct way to do it imo

fiery yoke
#

Dont understand why you cant just make an array and set the reference of the passed in array to that new array. Or even better have an alloc and a nonalloc version

floral dove
#

it will only copy as many players as you have room for in your array

fiery yoke
#

Determined by what?

wanton oxide
#

why would it do that?

fiery yoke
#

Like order

wanton oxide
#

then if your array isn't big enough you're gonna have a hard time figuring it out

floral dove
#

You make your world, so you can allocate an array big enough to hold all the players in the world.

fiery yoke
#

Hmm guess that makes sense

wanton oxide
#

throwing an exception if its not big enough seems like a better way imo

fiery yoke
#

Kinda meh tho

#

when you distribute code

wanton oxide
#

you can still do it then

#

but at least you won't run into weird issues like players missing or something and a lack of testing causing that

fiery yoke
#

If get an API method for the max player size of the world then that would be 👌

#

Generally more World API would be neat

wanton oxide
#

yes

fiery yoke
#

but guess that is somewhat down the list

floral dove
#

well, that would be good design, and it sounds like we don't do that, so...

fiery yoke
#

Yeah right

#

forgot about that 😛

wanton oxide
#

lmao

#

i love how you're so open about it like "yeah its shit, we know"

fiery yoke
#

However there is a difference between not having a feature, and implementing a badly designed feature :^)

wanton oxide
#

hey i'll take this over nothing lol

fiery yoke
#

I think that was sarcasm Bocu. Just a guess

wanton oxide
#

heh i don't even know

floral dove
#

Yeah, just a little sarcasm. Like, I'm here neck-deep in the code trying to improve the system and hanging out in Discord to help answer questions, so reading that kind of things is hurtful.

fiery yoke
#

Nothing personal

#

Its a big web

floral dove
#

I think it builds and propagates a culture of disrespect.

wanton oxide
#

I can see why

#

If it helps, i gotta say, Udon really is pretty damn amazing for a system used for user generated content

#

And i love it for what you can do with it

floral dove
#

I'm under no illusions that it needs a lot of work, and we're putting the work in. Just remember we're people on the other side here, pouring ourselves into this work because we want to make an amazing platform.

wanton oxide
#

Its amazing compared to anything in well any other game really, and the fact that i'm as familiar as i am with unity just makes that even better

fiery yoke
#

Just because Im complaining all the time, doesnt mean that I am not appreciating it a lot. I just want to state that I feel as if many things can be improved upon and most of that "rage" comes from the fact that many things could be much easier on all of the developers if fundamentals like APIs would be much more thought out.
Not even Unity manages to make a perfect API. No one expects that. (That goes for outside-facing as well as backend api)
But speaking for myself, motivation for change comes from seeing a problem and trying to improve upon it.

#

Im also well aware that Udon and the API isnt the only "problem" when it comes to VRChat. There is a hundred things the team needs to handle and take care of.
Im not saying that the team is incompetent. Just that a few things could be better and that its kind of annoying to always have to work around seemingly nonsensical limitations. Thats all there is to it. 😅

wanton oxide
#

imo you're being a bit harsh still lol

#

you're right i guess, yeah but i'm sure they're all well aware of vrchats uuh "quirks" lets call them that

fiery yoke
#

Well I guess its all relative. Im used to a harsh tone, because Im harsh to myself all the time. So uhh...Ill try to be less "dramatic" in the future 🙂

floral dove
#

You should be nicer to yourself, too 😄

wanton oxide
#

^^ this haha

vernal phoenix
#

But why can’t I just disable an udon component?

#

Is that intentional? A feature in the works?

warm cave
#

my udon is throwing an exception but the console doesnt state why, is there a way i can view the exact exception?

vernal phoenix
#

Script or graph?

warm cave
#

graph

vernal phoenix
#

idk then sorry...

#

how do i get the child object?

#

so i can disable it

warm cave
#

Its all good, thanks though

edgy moss
#

@zealous mason ooooh that makes a lot of sense actually. make it so that only when the player is standing on that exact spot, their gravity becomes zero. thank you!

zealous mason
#

totes 🙂

#

@chilly aspen To create a list of players, here's the code that I came up with to add each to a list and then use a for loop to go through each one

chilly aspen
#

@zealous mason Wow thanks!

zealous mason
#

yw 🙂

solar steppe
hushed gazelle
#

Have you actually assigned Closed to the animation transitions?

old kestrel
#

Hi! @zealous mason I would like to make only two people can interact with things and reset the number when they leave the world. Do you have any idea how to do it?

solar steppe
#

@hushed gazelle Yup

grim blaze
#

hi

#

goodnight

old kestrel
#

Where can I sync objects across all players? Seems like I have to utilize 'Udon Synced Variables' this thing but don't know what to do ! Thanks for your help

zealous mason
#

@old kestrel leave the world as in the whole instance is gone? Or leave a world with other people still in it?

zealous mason
#

@old kestrel for your second question, should be built into the sdk some good examples specifically for syncing, that's how i learned

old kestrel
#

@zealous mason leave a world with other people still in it. I want to make a function like when a user turn on the light, the light turns on. And when that user leave the world, simply turn the light back off.

zealous mason
#

@old kestrel oh ok, so it's a synced deal. I'd have to look that up, haven't done syncing for a while

scarlet lake
#

How do I make udon buttons? To toggle things on/off? I tried finding some but things have changed since those tutorials have come out, like ui locations and the name of some stuff
I also really like those new fancy ones where vr users can literally push the button in to toggle things on/off and wondering where I can get/find those

scarlet lake
zealous mason
#

In the Udon sync examples, there is also a UI with it that you could check out. For the fancy button pushes, i believe those are custom, likely a player's hand position in reference to the button's position type thing.

scarlet lake
#

I have never made a world before, i'm merly making a small avatar world for my avatar models, but like little fancy stuff like those buttons. Wonder where I could get those

#

If you watch a little bit of that video, you'll see what I mean about, him searching things, but if you search them in the current sdk release, you wont find them

zealous mason
#

Oh, perhaps you're referring to the game object reference?

#

With the new Udon you can drag and drop a game object (like a mirror) directly into the udon area. Check it out in this update video. https://youtu.be/IVjEx_H5BZc

VRChat Client Engineer MomoTheMonster walks us through all the brand new stuff in the latest Udon Node Graph!

As of 26 June 2020, this Preview version of the Node Graph is available on our Discord! Join us with the link below and check out our latest Announcements for the lin...

▶ Play video
#

It can then be used as a variable

#

To be toggled

scarlet lake
#

i was trying to find the Op Unary Negation boolan but it was a struggle to find, I think I have the right one

zealous mason
#

Good stuff. If i were to take a guess where that is, it'd be under System > boolean

scarlet lake
zealous mason
neon badger
#

Hey guys, is it possible to update my world, or can I only reupload my entire world over and over again?

zealous mason
#

@neon badger

#

when a world is updated, it is reuploaded completely

#

unless i'm not understanding

neon badger
#

Ahh, no that helps; Thank you !

zealous mason
#

np

neon badger
#

Hey, anyone having trouble logging in on Unity?

ancient spindle
#

hey @edgy moss did you ever figure out the player float thing in your graph? im actually kind of interested in the same thing, but for the life of me i can't figure out what nodes to conjoin to make it happen. lol

#

@neon badger i logged in just fine.

neon badger
#

Ahh I see, thank you

scarlet lake
#

try this out my guy
@zealous mason That makes the button go poof

zealous mason
#

@scarlet lake lol yes it will if there's no object assigned to the game object, I've done that multiple times 🙂

#

in the udon component, drag and drop the item you want to enable and disable

#

so like, in your scene, drag the guy from there, to that public variable spot

#

forgot to mention, the game object in the udon needs to be marked as public for it to show up on the component

scarlet lake
#

I'll try that once my unity finishes decimating 1.4 million poly off of my couch xD

scarlet lake
#

@zealous mason

#

I wanna toggle that drop down off & on with the button

old kestrel
#

Is there any way to update text without texh mesh pro??

zealous mason
#

@old kestrel like a UI text object?

old kestrel
#

@zealous mason yep

zealous mason
#

@scarlet lake should just be able to grab that drop down and pull it into the udon to become an object

#

got a reference for ya social, one sec

#

@old kestrel alright so first you'll need a canvas (UI > Canvas) then add a text

#

(this is older udon btw, i didn't update this world)

#

and then in that udon, put something like this to change the text

#

I was using the string as a public variable so other udon behaviors could send text to it to be displayed kind of like an in-game debug wall. I think just using the debug-log would be easier though

scarlet lake
#

This is so stupid just for a toggle button vrcCrying

floral dove
#

You can just drag and drop the UIText field to create a variable for it instead of doing GetComponent of Type

#

That's a little more performant, as well

scarlet lake
#

I finally got the stupid button to work, found a pre-made toggle udon script and edited. The original didn't work (replaced the object it wants to toggle obviously) but changing the custom event with interact, and connecting the object to set active.

dull thorn
#

I’ve seen a few worlds override the desktop window’s camera with a camera in the world. Does anyone know how that is done?

old kestrel
#

@zealous mason @floral dove Thank you its working! I am trying to show a random stored string every x seconds. Is there a way to pull a random string from the string array?

flint urchin
#

Yeah, get the total length and do a random range

#

Then use that value to get the string at that index

old kestrel
#

This is what I have rn but the text is changing every sec. Is there a way to update every x sec or min?

floral dove
#

@old kestrel take a look at the Timer example in the UdonExampleScene to see how to fire an event every X seconds

old kestrel
#

@floral dove perfect! its working 🙂

scarlet lake
#

How do I change the Interact words, instead of it saying "Use" It will say "Toggle (Insert text)"

old kestrel
#

@scarlet lake I was wondering about that too. It seems like you can change the interact words when using U# script (Udon Behavior => Interact => interact text). But I also can't find a way to change it

floral dove
#

Looks like we need to expose that. See if you can edit in in Debug mode in the inspector by clicking on the three dots in the upper-right and switching temporarily from 'Normal' to 'Debug'

scarlet lake
#

i was wondering how i can add custom emotes and dances? like ive seen people do non default dances and was wondering how to do those

hushed gazelle
#

You can absolutely edit it with the Debug menu, I've done that in several interactive objects. @floral dove please expose the interactive distance as well as the use text.

edgy moss
#

TL;DR How do I make a player levitate upward when they enter into a vertical shaft?
Okay so first off, forgive my ignorance. I've been using Unity for like a week and I know NOTHING about coding, but I'm determined to make this happen. I want to create a levitation portal, like an elevator that goes up to the next floor. @zealous mason suggested I go about it by effecting the player's gravity. I ran with that and I like to try to problem solve on my own, but 24 hours later I still haven't figured it out via google so I'm asking for the next step. This is what I have cobbled together so far, and i know I must be close. I created a cylinder, gave it a rigid body and a mesh collider, which I set to convex and made it a trigger. Then I gave that cylinder Udon Properties and set up the nodes like so. What am I missing? Btw I have no idea what the numerical gravity values should be, I just typed those in as a test, but nothing happens. Thanks ahead of time!
P.S @ancient spindle I didn't see your question til just now! (I'm also new to Discord) Hoping we can figure this out together!

quiet forge
#

I need to change my appearence every day
I have 3d models of chothes
How can i equip them to my base model and change them
Please help me
If possible dm me

#

@here

zealous mason
#

@quiet forge try out the avatars channel, under the development category for that question

#

@edgy moss likely whats missing is getting the player collision working, since 'on trigger enter' needs to be setup for that. In the forums there's a nice post about player collisions and how to do them. Another option is using the player position to check if it's within a 'bound' box and if they are, affect them.

#

actually here you go, this is a conveyor I made to move a player, perhaps you could turn off the collision for the cylinder and if if the player is within your cylinder, add vetical velocity to them. This again, is old udon, but the idea should still work.

daring copper
#

how to object syncs work? does everything go through the master like it would player positions? and are objects that aren't moving still synced and taking up messages? and if an object is moving, how fast is it updated and how many messages/second does it take up?

obtuse patrol
#

Can you port 3D models from mobile to vrchat oculus quest

zealous mason
quiet forge
#

@zealous mason so if i have some clothes fbx or obj
I cant change them now

edgy moss
#

@zealous mason thanks so much for your help, and your patience with me jumping into something that is clearly over my head for such a NOOB. I was able to replicate your node system perfectly, until the very end... and I cannot for the life of me figure out how to place the last two. I see about 30 different options for types of Vector3, but not one simply titled "Vector3" with a place for me to name the PlayerSpeed. I also can't figure out how to place the node simply titled "Get Variable." I've tried every combo I can muster. Is that perhaps because, like you said, that's the old system? Is it called something different now? Thank you so much. I hate to be a nuisance but I've made it this far 😅

clever trout
#

Hey, I noticed that the Laser Nights hub has avatar props. How would I go about making something similar with udon? Is it supported? 🙂

zealous mason
#

@edgy moss my pleasure man. Looks like i need to update my udon test world to the latest. Get variable has been replaced so it's easier, just drag and drop the variable you need from the variable list. Also the vector3 in my example is the variable.

#

@quiet forge avatars clothes aren't simply changed, they need to be apart of the avatar and 'weighted' and can be turned on and off by animations. But really though, try out the #avatars-2-general or #avatar-rigging channels for your questions on that.

#

@clever trout props as in pick-up items? Or things that stuck to the avatar?

clever trout
#

@zealous mason They stick to your avatar once you pick them up, there's some comedy glasses next to the mirror you can use.

zealous mason
#

Oh, ok, yeah, I've made a thing that's stuck to avatars using udon, it's possible. I did it on the update event, move it's position to the avatars certain bone position.

clever trout
#

ah that makes sense! Thanks man 🙂

zealous mason
#

Np

quiet forge
#

@zealous mason thanks

zealous mason
#

Np, good luck!

sharp basin
#

can anyone explain what the exact grip option does on the vrc pickup component?

warm cave
#

How can you set a variables value, so say on interact set a value to 1 so it can be used later in an update section

scarlet lake
#

I created a gameobject, put a mesh collider on it (so a button can toggle the collider off) but udon graph keeps saying "Object reference not set to an instance of an object) how do I fix that?

unreal helm
#

Hi. Using udonsharp, is there a way to access the the screen.width and screen.height and set a render texture resolution using that? I've seen it done in places like the portal world, but the only info I can find on it doesn't work in udon

languid valve
#

As a beginner to world creation should I be using SDK 3 or SDK2?

scarlet lake
#

SDK3 for world building, SDK2 for avatars

languid valve
#

Thank you

restive dust
#

@warm cave to set a variable's value to 1 on interact, you create an Interact event node and a Set Variable node with the variable selected in it. Then plug the flow of Interact to Set Variable.

scarlet lake
#

Fixed my issue regarding object errors being thrown. ❤️

warm cave
#

i found what my issue was with set variable not working before, thanks though @restive dust ^-^

scarlet lake
#

@floral doveSorry to ping you, but can you please add a small pin regarding changing what an interaction text says?

Enable Debug in the Inspection Tab, it can be found beside the tiny lock icon, via the 3 lines, it's in Udon Behavior (Script) as Interact Text

#

That would be super sweet ❤️ and help a lot of people

floral dove
#

Sure!

#

To change the Interaction Text on an UdonBehaviour:
Switch your Inspector to Debug mode by clicking on the 3 lines in the upper-right of the inspector. Then you can set the "Interact Text" and switch back to Normal mode. We'll fix this in an upcoming release.

scarlet lake
#

Thank you so much ❤️ You're the best!

unreal helm
#

Is it possible to locally change the orientation of gravity with udon?

fiery yoke
#

Yesn't. Depends on what effect you want to achieve

unreal helm
fiery yoke
#

Ahh yeah. No.

unreal helm
#

damn

fiery yoke
#

You would have to rotate the entire Player Controller and thats not really possible. You can use some hacky tricks to achieve an effect like that

#

but there is no easy straight forward solution to that

#

At least as far as Im aware

unreal helm
#

Does vrchat use the Physics.gravity vector3?

fiery yoke
#

Sort of. That plus the character controller does something weird with gravity. Not sure yet

unreal helm
#

If I were to experiment with this, would I just attach an udon behavior component in an empty object somewhere in the world?

fiery yoke
#

Yes.

floral dove
#

Yep - you can change the Physics.Gravity, as well as the strength that gravity has on the Player

#

but as TheHelpfulHelper says - VRChat doesn't work well with changing the orientation of the player. I tried to build the same thing last weekend and didn't get too far because of that.

fiery yoke
#

CyanLaser made that concept a while ago

#

From what I remember he had different versions of the same room for all orientations. He then used stations that are desynchronized and locally moved to the place where the other players would appear, relative to you.

#

Its pretty janky and complex

floral dove
#

pretty inventive workarounds

fiery yoke
#

Yeah,. Imagine what we did back in SDK2

#

When all we had were Animation Events, UI Events and misused Standard Assets scripts (Plus FinalIK for those who had it)

sharp basin
#

momo, what are some of the main challengers still remaining in getting a video player back into sdk3?

scarlet lake
#

aww I can't have a video player in sdk3?

fiery yoke
#

Not right now. But soon

unreal helm
#

Is there a way to grab the player camera resolution and apply it to a render texture? I'm making some portals and I've seen it done but my method doesn't work in udon

fiery yoke
#

portals are a mess

unreal helm
#

Yep. Been trying to make one for like two days

#

Not going gucci

unreal helm
#

Well, I should say its going ok. If I preset the render texture to just be 1920 by 1080 its okish on desktop, no idea if it works in vr

old kestrel
#

Does anybody know how to sync objects?

zealous mason
#

@old kestrel Perhaps this can help https://ask.vrchat.com/t/how-to-sync-with-udon/449

floral dove
#

@old kestrel if you're just looking to sync their positions, just add an UdonBehaviour (with the provided 'empty' program if all you need is sync), and check the 'Synchronize Position' box

unreal helm
#

How do I reference the player in vrchat / what do I change here to make this work in udon?

floral dove
#

FYI @unreal helm - reacting to the Player Collider is currently difficult because of how we've protected the object. We've got some fixes in the pipe that expose proper events for this. Looking at this code, I would guess that the author is using some sort of proxy Transform to follow the player around and testing against that. Are you asking how to recreate this in the graph?

unreal helm
#

I'm actually doing this in udon sharp, but if its easier to do in graph then sure

#

I've not used the graph yet

old kestrel
#

@floral dove thanks for your input. I would like to make an object's Set Active = false and other people also see that object Set Active = false. Do I still need to use the event OnDeserialization to do this?

floral dove
#

Ok, just trying to understand the angle you're coming from here. "What do I change to make this work" is hard to answer when I have no idea if this is part of a working script someone else made

unreal helm
#

It's a script from a regular unity tutorial that I just typed in unity sharp

floral dove
#

@old kestrel - yes, if you make a bool variable and mark it as Synced, then you can have the owner change that variable, then check it On Deserialization for everyone else and update the Active state of the Gameobject to match. Check out the Sync examples in the VRChat Examples folder that comes with Udon for some demos of Synced Variables.

old kestrel
#

@floral dove Thanks I will try!

floral dove
#

@unreal helm - if you're just getting started with Udon, I'd recommend going through the VRChat Examples folder and associated readme to get your feet wet with how things work.

unreal helm
#

oki doki

old kestrel
unreal helm
#

ok, so this actually looks a lot simpler with udon than regular unity...

unreal helm
#

Did yall change the name of some of these nodes since April? I can't find "Get Variable" in search

zealous mason
unreal helm
#

Thank you so much

zealous mason
#

yw

old kestrel
#

@floral dove when syncing a variable, you mentioned " then you can have the owner change that variable, then check it On Deserialization for everyone else". My question is how do I make the owner change the bool variable? and could you explain how to check it on deseralizationfor everyone? thanks

ionic crest
#

how do I make a trigger that plays an audio clip from an audio source when clicked?

#

I'm having issues :(

zealous mason
#

@ionic crest try this out, I use it for starting/stopping world music. Drag and drop that audio source component into the udon then make the other components and link em together

#

also note the 'spatial blend' on the audio, thats important that its set to 3d.

#

also note, this is an udon graph on the 'cube 9' so the cube 9 holds the audio source and the udon behavior

ionic crest
#

Thank you so much

edgy moss
#

@zealous mason THANK YOU! 😍 to be honest, I still never figured out those last two nodes, but apparently it works anyway! I so appreciate all your help

ionic crest
#

@zealous mason Sorry, where do I find the "Set Playing" node in the editor? I can't seem to find it.

solar steppe
#

How do i add jumping and sprinting in worlds in udon?

unreal helm
#

There's a preset udon behavior thing for it when you add the vrchat world prefab

solar steppe
#

Thank you!

unreal helm
#

How do I get this object into the udon behavior send custom event? I'm trying to get something to activate when you walk through a spot

scarlet lake
#

how do I make a teleport button?

#

so I click a cube and it brings me somewhere else I mean

unreal helm
#

Im doing the same thing right now, except its done when you pass through a space. How much do you have so far?

#

@scarlet lake

scarlet lake
#

all I have is a small cube

#

Idk anything about udon

#

I just wanna make a racing game

unreal helm
#

All I know is that you need a "Interact" node, feeding into a "Udon Behavior Send Custom Event" node, for the button. In the place you want to teleport to, place an empty object with the actual teleportation script on it. I have the script in udon sharp, not nodes though.

#

I don't know how to make the rest of the button and that's where I'm stuck

scarlet lake
#

*imma try watching yt

#

I found a vid

#

looks helpful

unreal helm
scarlet lake
#

im watching that vid rn lol

unreal helm
#

Ah yes, I'm sure the udon sharp script works fine, but the way you make buttons has changed

scarlet lake
#

sad

#

I miss triggers

unreal helm
#

Very. At least I can make this sick portal now though. When it finally works IF IT EVER WORKS

scarlet lake
#

Rip tiggers: idk lol-2020

unreal helm
#

If you figure this out please tell me cause I've been at a stand still for hours

scarlet lake
#

ill let you know

#

I am only using this so I can have a nice little racing map

unreal helm
#

Oooo

#

Nice

scarlet lake
#

so I made an asset now I want to add a node but idk how to

unreal helm
#

press space and then type it into the search bar. I got stuck here too lol

scarlet lake
#

ill try that

#

Why dont they just tell you these things inside the grapgh itself

floral dove
scarlet lake
#

thanks

floral dove
#

Lots of good info in the VRChat Examples folder and Readme, too.

scarlet lake
#

thx

#

when I press space and look for varibles like set gameobject active I cant find any

floral dove
#

Space > Gameobject > Enter > Set

scarlet lake
#

Ill look

#

im sorry im new to udon

#

my first ever time using it

#

Space > Gameobject > Enter > Set
@floral dove Im so dumb thank you

floral dove
#

No worries, it takes some time to get used to how it works. We're not done with documentation so there's lots of figuring things out and asking for help 😋

old kestrel
#

@floral dove This is my graph setting the object to SetActive = false. But I am confused on how to use OnDeserialization. Is this what I am supposed to do in order to sync the object for every players?

scarlet lake
#

So, I wanna have a button toggle a Flat Plane off and a mirror on, how would I do that?

formal sigil
#

hi, what is U# ? how does it compiles?

#

I understand that unode is the only way to get logic into VRChat, so what is that U# ?

zealous mason
#

@ionic crest playing is that boolean variable, drag and drop from the variable list =)

chilly aspen
#

hi, what is U# ? how does it compiles?
@formal sigil The complexity of answering this went from 0 to 100 real quick.

zealous mason
#

@formal sigil Udon sharp is a third party compiler. So the code works more like c and not graphical nodes

#

@scarlet lake that should work, just need to drag a line from the output arrow of the first 'game object set active' to the input arrow of the second one

frozen matrix
#

Hey question guys does anyone know in here how to make prop grabbable

formal sigil
#

@zealous mason thank you very much,
-> I can write code in Udon sharp instead of using graphical nodes: yes
-> I can write complex logic for games and presentations: yes

#

yeah, I get it!

#

hey thank you Merlin, for building Udon Sharp, thank you VRChat team for Udon

zealous mason
#

@frozen matrix under the inspector of the object you can add a vrcpickup to it, should make it grabbable

frozen matrix
#

Well there's the one problem @zealous mason it's falls down under my map

zealous mason
#

@frozen matrix oh yeah, gotta put box colliders on the prop and the thing it's sitting on

frozen matrix
#

Thank you it was helpful @zealous mason

#

Just another question do you know how to set up music while using hold on I want to have a mechanism where I press the button and plays the music in world

zealous mason
#

@frozen matrix like it only plays music while you're holding it?

frozen matrix
#

actually pressing button

zealous mason
#

Actually pressing eh? Might want to try to use the player's hand position and if that position is within a certain distance, then play the sound.

bleak widget
#

Quick question. Are video players still not supported in udon/vrc3?

fiery yoke
#

Not yet no, but soon

bleak widget
#

Soon like very soon or still a while?

floral dove
floral dove
#

@bleak widget - we're working on it right now, but can't tell you the exact week they'll be back.

#

But I would measure the time left in weeks and not months if that helps.

bleak widget
#

Yes, that is very helpful. Thank you!

vernal phoenix
#

Does udon support doing stuff with date and time?

fiery yoke
#

Yeah

#

System.DateTime

#

Who would have guessed

unreal helm
#

@scarlet lake figure out buttons?

warm cave
#

ive noticed that when you do a test build it doesnt always use the new compile of code, like i removed a debug log like 10 builds ago but its still there and nothing new taking effect, anyway ideas to stop this annoyance?

#

for reference i cleared cache and deleted the serialized code and it didn't change anything

fiery yoke
#

Youre using the graph right?

warm cave
#

yes

fiery yoke
#

The graph has a compilation problem of yet unknown cause.
The easiest way to fix it is usually going into Play mode, exiting it and then recompiling. If that doesnt fix it, try duplicating the Graph Asset and delete the old one

warm cave
#

ill give it a go, i also noticed branches break a lot, they throw Exceptions that are fixed by just replacing the old branch

fiery yoke
#

Yeah the graph compilation is still quite buggy.

#

It mostly works

#

but there is a few situations in which it breaks

warm cave
#

Its still in its early days so its to be expected, i really should just consider U# sometime as well

scarlet lake
#

@scarlet lake figure out buttons?
@unreal helm nope

#

I was taking a nap

unreal helm
#

Heck

floral dove
#

@warm cave @fiery yoke FYI I think I've got the compilation bug fixed in the next release. However, there are also situations where the graph compiles but Build & Test launches an old world that's cached on disk, may be some sort of write permissions issue if there's still a client running in the background or something.

#

Also, the quickest fix for the current bug is to select all > cut > paste, but that kills all your comments and groups 😦

warm cave
#

Im glad to hear it may be fixed, ill give that cut and past a try next time i work on it, thank you ^-^

rich mica
#

how do i set up avatar pedestals in sdk3 -w-

#

ree

zealous mason
#

The way I've gotten around that cached world bug is by compiling the udon, hitting play, then re-opening and compiling again... sound weird but it works for me

floral dove
#

@rich mica check out the UdonExampleScene in the VRChat Examples folder, it's got one.

bleak widget
#

I went to update to the newest version of the sdk and now I got this

scarlet lake
#

delete everything regarding to the old SDK and import the new one

bleak widget
#

Will do, thank you

#

That fixed it! Thank you

unreal helm
#

For Udon Sharp, what's the name of a function that can be used when entering a trigger collision box? Like how buttons are void interact?

warm cave
#

Ive noticed that UdonSynced variables always have the owner ahead on, is there a way to correct this?

analog kayak
#

ok im new to udon and unity how to i open the udon graph, and can i make the worlds in unity or will i have to make a base in blender still?

unreal helm
#

Ok so, just right click assets to and go to create to make an udon graph asset, then click on it and in the inspector theres a button that says Open Udon Graph

#

10/10 would recommend making in blender first

lime void
#

hiya!! i get compiler errors when importing sdk3 with udon into a new blank unity project-- is sdk 3 only compatible up to unity 2018.4?

ionic crest
#

@lime void You have to use Unity 2018.4.20f1 otherwise it won't work.

#

Anyway, how would I track if a player is in a certain radius of something? Specifically, what I'm doing is I want to make a pair of eyes focus on the closest player.

zealous mason
#

comparing distance between 2 players

#

believe the distance is in meters, so this would be 'if within 2 meters'

ionic crest
#

Nice.

#

Pillazo the udon wizard

zealous mason
#

Pillazo the obsessive programmer

unreal helm
#

Mr wizard, how would one trigger an udon behavior on another object when one enters a collision box trigger?

zealous mason
#

one sec, i may have a reference for that

#

so, this is untested... but I'm fairly confident this is how that works @unreal helm

#

make a udon behavior variable, set it up like this so when the first object is interacted with...

#

then on the udon component, drag in the other object you want to affect

unreal helm
#

It's not letting me drop my target into the event spot. Am I supposed to place the udon thing itself in the box or the object that it's attached to?

zealous mason
#

your target being the other game object?

#

perhaps run compile at the top right then try

#

also make sure 'public' is checked for that variable

#

ALSO, for player collision, you got two options, one is grabbing player position like this:

unreal helm
#

Yep it's public. The Text in the box looks kinda weird, idk if that has something to do with it

zealous mason
#

oh yeah, mine does that too, just drag and drop the other game object into it

#

so like cube 1 has the udon interaction, cube 2 is the affected thing, drag cube 2 into that public spot

unreal helm
#

Yeah its still not letting me drag it in...

ionic crest
#

I got as far as the branch, I figured all I'd have to do is get the player position and plug that in as a value to set rotation but that seems to just not be right.

zealous mason
#

@unreal helm perhaps your target object needs to have an udon behavior on it first?

#

@ionic crest I see, your setting a rotation based off position? I may have something for that...

ionic crest
#

What I'm doing probably won't work but I gotta figure this out somehow, haha. Sorry for all the constant need for help.

zealous mason
#

s'cool

lime void
#

sick, thanks Tricky!

zealous mason
#

@ionic crest don't have a working reference, but I've used this command in other 3D programs

ionic crest
#

thank i will attempt this

zealous mason
#

world up would be something like x=0,y=1,z=0

#

not sure if vrc is y is up or z is up

#

np, good luck

edgy moss
#

Hey y'all ^__^ Question: I have this material that I'm using a veryyy small video file as a texture for. When I press play in Unity, it works. (video example below) But when I test in VRC, the video is no longer playing, just frozen on the first frame. Is it possible to use a video texture in VRC? And if not, can I somehow use Udon to animate a single image texture to simply continuously rotate? Thanks!

scarlet lake
#

Did I hear a birb?

floral dove
#

@edgy moss check pins for status of video player in Udon

scarlet lake
#

Momo, would you say that's how to have something active, turn off, and something not active, turn on? With a single button

#

then vice-versa

floral dove
#

Yep @scarlet lake that looks like a good pattern for get-and-flip-active

scarlet lake
#

Thanks very much ❤️ I'm very new with all of this, im also for some reason having problem with a separate toggle button, and I don't know why, even though it's made the same way all my other toggles are made. Just makes the button poof on click.

#

Wanna toggle game object "Sun" off, which will disable world lighting (baked probe is still active so the world isn't pitch black, makes everything darker and more moody)

#

Literally made the same way xD

#

The heck, the button works now, even though I didn't change anything

floral dove
#

Try this: Select All, Cut, Paste. There's a bug where graphs are recompiled from cache instead of graph

#

Oh good!

scarlet lake
#

Also, that mirror thingy works!

floral dove
#

Nice! Fixed the cache bug in the next release so hopefully will be seeing less of this.

scarlet lake
#

Also, this is such a mean thing, by default, when you add a avatar pedestal component, the "Change into avatar on use" button is un-checked by default

#

So, all day, there was this cute avatar for quest users in my world, and they couldn't use it

#

Thank you for your help and patience ❤️ Even though im doing, super simple triggers, I hope to soon be able to do bigger and fancier things ❤️

ionic crest
#

Is there a node for an event that detects a button press on keyboards? Like, a player presses "P" and something happens, I can't seem to find it if it exists.

#

Found it, it's under "Input" for anyone who couldn't find it either.

frozen matrix
#

Question everyone does anyone here know how to set up a jukebox

scarlet lake
#

day 149 I still cant make a teleport button

frozen matrix
#

l mean

#

l can help

scarlet lake
#

do it please

frozen matrix
#

l know how to do that @scarlet lake

scarlet lake
#

please I need to know

frozen matrix
#

l will send it

#

in dms

scarlet lake
#

thank you

hushed gazelle
#

Share it here, so we can all benefit.

bleak widget
#

Does anyone know if it possible to convert this line to an udon graph?
RenderSettings.skybox.SetFloat("_Rotation", Time.time);

#

I poked around and could find the RenderSettings.skybox portion but couldn't get farther

unreal helm
#

@zealous mason Yep, the target behavior already has udon behavior attached to it.

#

@scarlet lake could you share the stuff you got dmed?

bleak widget
unreal helm
#

Yeah I looked at that but it's not working

bleak widget
#

Where does it not work?

unreal helm
#

I can't drag and drop my empty object with the teleportation script into the box for the the trigger

#

Actually scratch that

#

Im an idiot

#

I was trying to put it directly into the udon script, instead of the object the script was attached to

#

time to test

bleak widget
#

Let me know if you got it fixed ^-^

unreal helm
#

Ah. It did not

#

Wait, I think I know why

#

Nope, didn't fix it, still not working

bleak widget
#

Alright, what state is it in now?

unreal helm
#

The collider box gets highlighted, and its supposed to be a collision trigger rather than a button, but that doesn't matter as much right now. It just doesn't teleport me anywhere.

bleak widget
#

Highlighted when moved into or highlighted when hovered over?

unreal helm
#

When hovered over

bleak widget
#

It sounds like your graph is set up more like a button than a collision

unreal helm
#

Yeah. How do I make it a collision? It looks like this right now

bleak widget
#

The interact is basically an "onClick" event. Is that all of your graph? There doesn't seem to be any of the teleport code in there

unreal helm
#

The teleport is attached to the empty object at the location to teleport to. I used U# for this one though, cause I'm gonna be making it a little more complex later

fiery yoke
#

The first time you enable an UdonBehaviour OnEnable isnt fired due to how UdonBehaviours currently load programs.

unreal helm
#

I was hoping the udon graph would call the teleport program attached to the empty when the player entered the collision box

#

should I use normal Enable instead?

#

Ah, nope, regular Enable didn't work either

#

So, how would I go about making this work?

#

/making it a collision box instead of a button

fickle stirrup
#

@unreal helm in future updates they'll add functions to get playerapis from collisions, atm you can create an extra collider and make it move with local player and teleport on collide
private void OnTriggerEnter(Collider other) { }

unreal helm
#

Ah ok. But how do I also make the actual teleportation work?

zealous mason
#

Here's a simple teleporter, I got 2 cubes, one is called teleFrom, the other is teleTo. I made an udon behavior on TeleFrom and then dragged and dropped TeleTo into the udon and then made the rest

#

Turn off the collider on the TeleTo box tho

unreal helm
#

Is there a way to do dot products in the udon graph?

#

Just cause I plan to make this teleport thing way more complex later, and right now the teleport half of this is in U# where I know how to do that type of math already

#

So only the button part is in the graph for calling the teleport script.

deep raptor
#

ummm help i did local testing on my world and some errors popped up in the console about some variable types while building and now every udon behavior in the scene looks like this

#

i restarted and all behavior scripts look normal but they lost the program source

sly pollen
#

Quick question: I'm planning on beginning to make my first vrchat world and I'm wondering whether I should go with the old established SDK or jump in to Udon?

bleak widget
#

I chose to go with udon for future proofing reasons. The biggest downside I have had with it is that there are less recourses out there for udon and some things aren't supported just yet.

#

But udon is the direction that development is going so it might be a good idea to start on it now so you don't have to change way later down the road

sly pollen
#

Ty, the first problem seems to worry me less than the second one. I guess as long as it doesn't break things when support is added for those things

#

Yeah I think it'll also be helpful bc I'm no stranger to programming in general but I am somewhat new to programming in unity so I think Udon might be useful there too

ionic crest
#

@unreal helm That Udon tutorial does actually work it's just you need to change one of the nodes to fix it.

#

In the video it shows "Transformation get local rotation" instead of "transformation get rotation", you're supposed to use "transform get rotation" for it to work.

unreal helm
#

Hm... well, I teleport now, but It's either to the spawn, or the world origin depending on whether I use localPosition or position

#

Step in the right direction though

flint urchin
#

@unreal helm if you have it enabled at load, then in start you just disable it, then OnEnable will work

fiery yoke
#

I think TCL said at some point that he might change the way that programs are loaded so they are loaded even when disabled. But who knows when or if thats gonna be the case

flint urchin
#

Exactly

frozen matrix
#

Question everyone

#

Does anyone know how to actually build jukebox

#

I need answer for that

#

Bit I'm going nuts over here

zealous mason
frozen matrix
#

Well yeah this could work

#

I just hope it is my answer though

#

If anyone in here have already knows the answer or efficient way builded Ping me

unreal helm
#

Question: I got teleporting working reliably, but it only teleports me back to spawn. How would I get this to teleport me to the location of the object that the udon behavior is attached to?

zealous mason
#

I'm not familiar with U#, is this all the code? I'm not seeing where the destination is called out

unreal helm
#

the spot that says (transform.position, transform.rotation) is the location, and I was told that those variables are the location and rotation of the object that the U# is attached to. It's attached to an empty object at my teleport location

zealous mason
#

I can only speak with my experience with the graphical nodes, that yeah, if it's not specifically called out, it should be attached to the object that owns the udon behavior. But since you're getting brought back to spawn, I'm thinking those are all zeros instead. Perhaps its a difference between graphical nodes and U#? Sorry man, wish I could be more help

unreal helm
#

Dang, thanks anyway

vernal phoenix
#

so when i publish an udon world i gotta go through community labs?

#

does my trusted user status bypass that at all?

fiery yoke
#

No. All worlds go through community labs.

unreal helm
#

I had to go through community labs and Im also trusted

vernal phoenix
#

k

#

haven't published a world since that came out

vernal phoenix
#

So what’s the process once it’s on community labs?

#

Does it eventually get moved to regular world status?

zealous mason
hushed gazelle
#

I'm trying to create a box collider that will destroy anything within it on button press, but I'm not sure how to get at the collision[] value to pick up everything currently within its area. This is as far as I've gotten;

sly pollen
#

does anyone know how i would go about doing a compare tag? Im currently working Udon Sharp and it gives me a compile error saying that CompareTag is not exposed to Udon (same with gameobject.Tag as well) :/

zealous mason
#

@hushed gazelle I'd recommend making a list of game objects that are 'recyclable' so then the for loop would go through that list, then if those items are within the bounds of the recycler, then they'd get deleted. That way if a player jumps in the recycler, it doesn't break the player or the script. Side note tho, my experience with these arrays so far has shown me that if I remove from an array, I need to make a new array while deleting form the old one and when I'm done removing, transfer the new array into the spot of the old one.

hushed gazelle
#

@zealous mason I've got the detection area set to only detect pickups, so it won't be able to see players at all.

scarlet lake
#

I am trying to make a version of deal or no deal where each box has a different dollar value in them. I want to be able to mix up the values before the the game so each box has it's own different, random value. I am not sure where to start. Any suggestions would be very helpful.

zealous mason
#

Haven't done random before, however that works sounds cool and I'd want to see it when it's done!

scarlet lake
#

Me too! 😅 What I currently want it to do is to scramble up the values that are in each box to a different value but at the same time, have only one value in each box. Not sure if I could do that or just make a button that will change it's position then press another to change it again

hushed gazelle
#

You'd need an array of game objects, with each box being an object in the array as well as an array of textures for the money values, and another with the int or float values of the money. Cycle through the boxes with a random value applied to each, applying the equivalent slot of that random value in the texture and int/float arrays to that box's own udon script and mesh.

scarlet lake
glossy hornet
#

stupid question, but is it possible to use udonsharp in order to spawn a prefab as a child of an existing prefab? udon doenst support the as gameobject parameter

unreal helm
#

Any U# savy peeps here?

fiery yoke
#

@glossy hornet I have no idea what youre even trying to say, but to instantiate GameObjects you use the VRCInstantiate method

glossy hornet
#

im doing

#

var newButton = VRCInstantiate(myPrefab);
newButton.transform.parent = ParentObjectStuff;

#

but it wont fit to the scale of the parent object and im not even sure if its added as a child correctly

fiery yoke
#

use SetParent

#

But it should also work like that

#

Maybe you have to manually adjust/reset the scale

glossy hornet
#

im using a size of 1000 with a scale of 0.005 on the parent but the child doesnt fit

#

oh wait youre right its newButton.transform.SetParent(ParentObjectStuff, false); instead of parent

#

thanks ❤️

vernal phoenix
#

How to get my world in udon alpha spotlight?

fiery yoke
#

If the VRChat team likes it enough.

unreal helm
#

Goals (If I can ever finish my portal before it comes out of alpha)

vernal phoenix
#

do i need to tag my world with udon or anything?

floral dove
#

@vernal phoenix you can submit it to the forum and the World category with the Udon tag and/or tweet it with the hashtag #madewithudon

vernal phoenix
#

just tweet the world and say made with udon?

floral dove
#

Yes!

fiery yoke
#

Maybe with some info what your world is about

ancient spindle
#

im stuck. xD im trying to make an area trigger to set gravity to "0" using a game objects trigger colliders. iv got as far as enabling it when entering, but how do i go about setting it back to normal when player exits the area? the little snippet at the top is the default value for gravity in unity. buuut i can't just copy and paste the bottom row and add another update node cuuz it wont let me? xD im not too sure how this works. i was kinda building off of Pillazo's graph. >.> any ideas?

fiery yoke
#

Why not hook it up to the false of the branch? :P

#

You can only have one Event node per Graph

#

otherwise, how should it know which one you want to go first?

ancient spindle
#

i tried that. but it still kept the settings of the true value, which is what i didn't understand.

#

maybe something didn't compile right? ill try again quick

zealous mason
#

First problem was copying pillazo 😛

#

but yeah, helper's idea should work, perhaps its just an issue of the old cache again

#

I get around that by compiling, hitting the play, then compiling again

fiery yoke
#

Also checking if the player transform is inside of bounds is generally a meh idea, since that will only check if the bottom-center of your feet is inside the bounds.

zealous mason
#

its true

#

could also use the 'get bone position' and tie it to hips or head

ancient spindle
#

@fiery yoke yes it did work. must of been a compile issue i suppose!

@zealous mason i was desperate ok? lol

zealous mason
#

lol

ancient spindle
#

yea i could of just used a On Trigger Enter/Exit node, but only wanted it to work with players, not having objects interfere. but thanks again for the help !

zealous mason
#

udon makes things happen in your world

#

its a vrchat programming language to have cool stuff happen

ancient spindle
#

it evolved from SDK2

#

lol

ancient spindle
#

to expand on my last help contraption, how would i go about changing gravity to player only? iv noticed objects around me started floating as well. lol like having some sort of superpower. might make that a button actually 🤔

tropic canyon
#

vrcplayerapi.setgravity?

fiery yoke
#

Unitys Physics.gravity is for all rigidbodys. Thats why VRChat has that ^

#

also its SetGravityStrength

#

as you already used it in your graph...

ancient spindle
#

SetGravityStrength didn't keep the player going up when a player jumps. its in there cuz i was experimenting with it. lol

#

it kinda made it seem like players were light weight when set to -1 or even -100. and then normal when set at 1 >.>

fiery yoke
#

Yes that is the sad reality.

#

Setting the Players Gravity Strength to 0 does not actually set it to 0

ancient spindle
#

big oof

vernal phoenix
#

people are having a hard time in my world with pickups

#

if they are using VR

#

is there something i need to change on this?

zealous mason
#

is there a rigidbody component too?

fiery yoke
#

Pickups require a rigidbody. Meaning there must be one.

zealous mason
#

and collider?

#

(collider not required but I think it helps)

fiery yoke
#

Without a collider they couldnt pick it up at all

#

Usually not being able to pickup something in VR means that youre inside a collider or that something is blocking the raycast

#

Its been an issue forever.

vernal phoenix
#

yes there is a rigid body and collider

#

but its almost like vr users have to point an invisible cursor at it

zealous mason
#

show us the collider and rigid body?

vernal phoenix
#

ok its building rn

#

so i have a really large trigger on the player

#

like a huge bubble

fiery yoke
#

Yeah

#

thats it

vernal phoenix
#

that's blocking the pickup?

fiery yoke
#

Put it on the MirrorReflection layer. If you need it to be on a specific layer then...thats gonna be more complicated

vernal phoenix
#

i can try that

#

but the bubble needs to trigger other colliders

#

when the player is near them

#

will that still work in the mirror layer?

vernal phoenix
#

FUCK

fiery yoke
#

Depends

vernal phoenix
#

ok

#

well that's a good insight

fiery yoke
#

If the collision detection depends on the layer

vernal phoenix
#

well yeah i mean i have the scripts checking for certain layrs

fiery yoke
#

Yeah then that wont work.

vernal phoenix
#

and of course the physics are set so these layers only collide with each other

#

i mean i can change stuff to point to the mirror layer

#

that isn't a problem

#

i just need to know what are the specific properties of the mirror layer

fiery yoke
#

Then your only option would be offsetting the colliders.
Practically moving all colliders up or down. But ofcourse that brings its own problems with it.

#

The MirrorReflection layer is not visible in the normal player view. And you can look up the collision detection on it in the collision matrix in the Physics settings

vernal phoenix
#

if something is on the mirror layer, with it still hit stuff as expected?

#

or is it in some alternate universe?

#

i guess if i put both colliders in the mirror realm they could hit eachother

fiery yoke
#

You really have the wrong image of how collision detection works

#

Lookup "Unity Collision Matrix"

vernal phoenix
#

i understand the matrix

#

but is the mirror layer just like all the other layers

#

or does it have some wierd properties

fiery yoke
#

A layer is a layer

#

The thing that makes it special is that VRChat excludes the layer from the Raycast detection

#

Meaning that the normal pickup and other raycasts pass through it

#

Plus that it is masked from the Player Camera

vernal phoenix
#

i'll give it a shot

#

what does ignore raycast layer do?

fiery yoke
#

Nothing

vernal phoenix
#

if i checked that box on my other layers it wouldn't help?