#udon-general

59 messages · Page 5 of 1

floral dove
#

@fiery yoke well, I'm on Quest+Link so I just have to pop out the USB cable. I usually leave it out while I'm doing most of my development and just plug it in for a final check after I've tested everything on desktop.

fiery yoke
#

Plugging the USB in and out, probably isnt good for the connector in the long run tho. Its still nice to have that option, wish it would just come with the SDK 🙃

floral dove
#

It's a good feature request - a checkbox to launch in VR or Desktop mode could easily append the right flag to the batch file that's kicked off by Build+Test, I think.

serene moat
fiery yoke
#

I think it was put off till the 2018 update...sooooo yeah

hazy galleon
#

hey, it's time

solid cairn
#

oh someone made a script for it. I've been using an extreeemely hacky .bat file I put together..

floral dove
#

@vast nimbus - there's not a specific tutorial for making avatar pedestals, but you can start with the VRC Avatar Pedestal component.

storm copper
#

how do i make an object activate like an animation?

#

is there something like hide or unhide function?

#

something that is this cube

floral dove
#

@storm copper you can enable/disable the MeshRenderer on the cube

storm copper
#

not mesh

#

but the object

floral dove
#

you can switch GameObject.SetActive

storm copper
#

thanks

#

how i can connect the game object node on the plane i want it to hide?

floral dove
#

Make a public variable of type GameObject on the controlling UdonBehaviour, and link it to the target GameObject in the inspector.

#

@storm copper I highly recommend you take a look at the readme in Assets/Udon/Examples and go through the example scenes. It shows how to do the above and much more!

solid cairn
#

also, anyone come across some weird behavior where your stuff just doesn't get compiled? I had to delete the udon component and add another before it'd register my changes.

floral dove
#

@solid cairn yep - if you find a particular node or connection that's causing compilation to fail, please let me know! I'm tracking them to fix in the future.

delicate hazel
#

@floral dove I figure it out.I make a own little program to recive the command and add --novr in the end and run vrchat.

floral dove
#

@delicate hazel cool - while you're at it, add --enable-udon-debug-logging to allow udon Debug.Log commands to show up in your logs for debugging things that happen in the client.

solid cairn
#

@floral dove it was pretty much by random, only just starting on the most basic of basic scripts right now. I put my udon component on the same object that had the scene descriptor, added onPlayerJoined stuff for jumping, compiled... nothing. Added the setRunSpeed node, compiled... and the jump worked but the run speed didn't (didn't even appear in the assembly).

floral dove
#

oh yeah - there's an issue right now that you can't use the same node output to two different places like that unless it's a public variable.

solid cairn
#

ah okay. I was looking up how to do standard jump stuff and that was the example posted a little while back so I had assumed that bug was fixed.

#

though it does seem to be working at the moment.

delicate hazel
#

Why is doent work

#

I dont get it

#

@floral dove Good to know

floral dove
#

@delicate hazel questions about U# should go to the U# Discord, can't help with that here, sorry.

#

@solid cairn glad to hear that's working! It's been one of my top sources of non-working programs at the moment, but maybe it's not an issue with all nodes.

delicate hazel
#

@floral dove OK Then. By the way i add --enable-udon-debug-logging . Where can i find the debug.log

floral dove
#

@delicate hazel they're relative to your user folder in Windows. Something like:
C:\Users\Hammer\AppData\LocalLow\VRChat\VRChat
They'll be timestamped with when the Client was launched like output_log_1-33-13_AM.txt

delicate hazel
#

@floral dove OK Big thank!

solid cairn
floral dove
#

@solid cairn - yes, that's the issue I'm referring to. The symptoms may have changed but I 've observed the issue of Graphs just not compiling when node outputs are reused.

solid cairn
#

gotcha, thanks for the heads up then

obsidian furnace
#

probably a really basic question but like when i write this with udonsharp i get this error

floral dove
#

@obsidian furnace questions about U# should go to the U# Discord, can't help with that here, sorry.

obsidian furnace
#

oh my bad my bad

floral dove
#

no worries 🙂

storm copper
#

still not working

#

i have no idea

flint urchin
#

@cedar cairn chairs work just fine, there is a little issue with how they're seated however, but hopefully that'll get sorted soon

storm copper
#

how do i make the plane appear

jagged crow
#

can an object have multiple behaviors?

fiery yoke
#

Yes.

solid cairn
#

so, if we cannot reuse outputs from nodes for the time being, what's the current 'best practice' method of setting run and jump values for a world?

fiery yoke
#
  1. You dont want to do it in OnPlayerJoined
    thats a global event whenever a player joins. You want that to happen on Start
  2. Use Networking.GetLocalPlayer
solid cairn
#

sounds good, thanks!

storm copper
#

i dont know what im doing wrong

#

why does the plane dont appear aaaaaaaaa

jagged crow
#

oh start fires when somebody loads up the world, not when the world is first initialized?

fiery yoke
#

Yes.

#

Technically you are initiliazing the Scene for yourself for the "first time"

jagged crow
#

hmm

solid cairn
#

still had to delete the old object entirely for it to update, just switching to start and getLocalPlayer didn't fix the issue.

jagged crow
#

is there an event to do the latter? or would I have to implement it myself

fiery yoke
#

There is no event for that, as it doesnt really make sense. It doesnt have many use cases due to technical reasons

#

@solid cairn You can put the Local Player into a Variable, and then Get Variable

storm copper
#

does anyone have an appear cube desapear cube program already made?

jagged crow
#

when would you want it to appear and disappear?

meager dove
#

For some reason, it seems that vrc_pickup scripts work normally when testing locally, but disappear as soon as I upload a world. Is this a bug, or am I doing something wrong?

fiery yoke
#

Sounds like someone forgot to change something in the Script stripper.

meager dove
#

I'm gonna try updating to the suggested version of unity, and trying again

fiery yoke
#

I was assuming that you are on the correct version yeah

storm copper
#

im trying to make the mirror with udon

#

like to appear and desapear

delicate hazel
#

How can i get VRCPlayerApi when who interact something?

meager dove
#

updating to latest version didn't fix it!

#

when I build and test locally, pickups work

#

but uploading seems to just remove pickups, even if I upload a previous build

storm copper
#

ok i guess ill do it another day

#

no help here

jagged crow
#

is there any way to disable the udon watermark

solid cairn
#

not right now. there's a ticket for it but it seems to be on the backburner

jagged crow
#

kinda hurts readability when it draws on top of nodes

#

lol

jagged crow
#

ahh ye

#

How does the game decide who to pass master to when the master leaves?

tame matrix
#

join order iirc, could be wrong though

cunning mist
#

@jagged crow While you can't disable the watermark itself, you can edit the image to be entirely transparent. It's UdonLogoAlpha in Udon/Editor/Resources.

proper nexus
#

Anyone know a way to grab a VRCPlayerAPI from a collision or something similar?

flint urchin
#

Not right now no. You got to create your own "player" tracking and use that to detect if it's a player or not

jagged crow
#

ooh thanks vowgan

storm copper
#

did someone manage to do the mirror hide/unhide in udon?

#

i still having problems

jagged crow
#

what have you got so far

storm copper
#

i tried to do the old way

#

and i tried to make it on the rotate cube script

#

the only problem is that it makes the cube itself desapear

#

the old way dont work anymore

fiery yoke
#

@meager dove I suspect that the VRC Pickup Script is getting stripped. My guess is that they removed it from the whitelist when first introducing Udon and forgot to put it back in...

jagged crow
cunning mist
#

👌

jagged crow
#

😂

fiery yoke
#

When your Udon Graph doesnt want to compile...Somebody toucha my S P A G E T T

meager dove
#

@fiery yoke I see! Hope that gets fixed soon!

placid night
#

Is there a sense of documentation on udon atm?

cunning mist
#

Any chance someone could pin this link?

flint urchin
#

Wouldn't really help when people don't read the #udon-info channel either 🤷‍♂️

storm copper
#

how do i call i value of a variable from another cube

#

like

#

have the same value return for both

jagged crow
#

video 4

storm copper
#

i already did that

#

still

#

dont work

#

ok now i have an error

#

@jagged crow

#

i want to mirror the actions from progam 1 to program 2

#

program 2 will not be interactable

jagged crow
#

what is the click count for?

storm copper
#

im trying to make a buy system in vrchat

#

like a tycoon game

jagged crow
#

oh I thought this was for your mirror haha

storm copper
#

the mirror is something else im trying to make

#

looks like im having problems with both

jagged crow
#

hmm

#

not sure what the problem with it is

#

I'm still a total noob to udon xD

#

I'm working on a mirror script tho, will share it if I get it working

floral dove
#

@meager dove does the PickupCube in Assets/Udon/Examples/MultiExample work when you Build & Test? That worked last time I checked.

jagged crow
#

do public variables require unique names

#

or are they namespaced to their behaviors

storm copper
#

i dont know mine dont work as it should

meager dove
#

@floral dove well build and test always works, my issue is when I upload

floral dove
#

oh @meager dove, I missed that part. Any clues in the logs?

meager dove
#

which logs should I check?

floral dove
#

@meager dove you'd need to enable udon logging by starting VRChat with --enable-udon-debug-logging and then look for timestamped logs under C:\Users\YourUserName\AppData\LocalLow\VRChat\VRChat

flint urchin
#

@jagged crow you can have the same public names in multiple behaviours

meager dove
#

alright, gonna be trying that in a bit!

jagged crow
#

Ooh right I've been confusing public with global

#

Globals aren't a thing in udon are they

floral dove
#

@jagged crow - nope, communication is 1 to 1. to do something kinda-like globals, you can do GetComponents and loop through UdonBehaviours that all have a particular public program variable you can set or event you can fire.

meager dove
#

@floral dove nothing that jumps out in the logs, no exceptions or anything

flint urchin
#

Debug Log everything!

jagged crow
#

how would a behaviour get a reference to itself

#

or to its parent

flint urchin
#

if it's related to a custom event, just leave the instance blank and it will reference itself

#

For parents you need a public variable or get the parent then the behaviour on it

jagged crow
#

nah trying to get the mirror reflection object for the mirror a behaviour is running on

#

I should be able to pass a self reference to the first param there to get the component I'm after

floral dove
#

@meager dove can you verify that you can upload the MultiExample scene and that works in the client?

meager dove
#

sure, let me try uploading that

fiery yoke
#

@floral dove Can you check if the script is actually whitelisted really quick?

meager dove
#

the pickup in the multiexample scene does seem to work!

fiery yoke
#

Then its "spot the difference" time...

meager dove
#

I will try to make another scene with just a single pickup and see if it happens there too

jagged crow
#

getting TypeResolverException: Type referenced by 'VRCSDK3ComponentsVRCMirrorReflection' could not be resolved.

#

frustrated haha gonna go play alyx for a bit, somebody ping me if you can see what I'm screwing up c:

meager dove
#

ok so this is really weird, it just started working again randomly as soon as I've added a second pickup

#

I will try uploading it a few more times to see if that's actually the case

floral dove
#

@jagged crow it looks like VRCSDK3ComponentsVRCMirrorReflection is not supported in Udon right now, I get the same thing on my side.

#

@meager dove that's strange indeed - it could just be a recompilation thing. Sometimes it looks like things have refreshed but they don't actually recompile until you make a bigger change.

meager dove
#

I will try removing the second pickup to see if it keeps working

#

akso I'm guessing any script in instantiated objects doesn't work right now?

#

the pickup now works also after disabling the second pickup btw

fiery yoke
#

@meager dove UdonBehaviour had some problems with being instantiated in the past, dont know if that has been fixed, other than that scripts should generally be fine.

zealous aspen
#

I'm using Udon# and OnTriggerEnter isn't working for me. I have one collider set to trigger. OnColliderEnter works fine. Is there any special way to do it?

floral dove
#

@zealous aspen you'll want to head to the Udon# Discord for that 😄

zealous aspen
#

Alright.

north carbon
#

soooo, i want to add the "mod" thing so I can jump im my world, im super new to udon and have no clue what so ever on anything about it, any help would be highly appriciated! 😄

#

please @ me if you can help me with this 🙂 since i might be alseep and i dont wanna miss the message 😄

scarlet lake
tiny otter
#

is udon only for your own worlds or can you affect your avatars in different public worlds?

spare dust
#

How to play?

floral dove
#

@north carbon - here's how to make Jump work in your world!
https://ask.vrchat.com/t/how-to-jump/527

#

@spare dust - please visit #vrchat-support for general support, this forum is for people making things with the new Udon system.

#

@tiny otter Udon enables you to build worlds with new functionality. It does not yet integrate with the make-your-own avatar system

tiny otter
#

thanks for the answer 🙂

scarlet lake
#

Is vrchat going to make documentation for their main components?

floral dove
#

@scarlet lake there are some docs, definitely a wip: https://docs.vrchat.com/docs/event-nodes

#

apologies for the double-post but this gets asked a lot so I want to pin it without the user mention:

#

Here's how to make Jump work in your world: https://ask.vrchat.com/t/how-to-jump/527

scarlet lake
#

is there any for networking yet?

floral dove
#

sure, a few of the components on that page have to do with networking

#

there's also quite a few networking + sync examples that come with Udon in Assets/Udon/Examples

north carbon
#

Thanks alot momo! :D

floral dove
#

@scarlet lake - what are you trying to do with that Get VRC Players graph?

glossy hornet
#

i wonder how that one guy did the third party cam trick with udon cannot see any way to access main camera

scarlet lake
#

i want to make it so when i get into the game i can have a custom menu and be able to have like button commands

#

by game i mean my world

floral dove
#

@scarlet lake sounds like a cool project! You could make a VRCPickup that has all sorts of commands on it that control your world, sure. Then you could grab it and use the buttons, sliders, whatever. I recommend you start by taking a look at the MultiExample and SyncUI example scenes that come with Udon. The Readme explains how everything works. If you can get that WorldSpace Canvas working the way you want, then you can shrink the whole thing down and make it something you can carry around your world.

scarlet lake
#

okay that sounds like a plan

#

thanks for info

#

🙂

sturdy wasp
#

Just upgraded my project and installed the SDK and am getting this error continually:
Assets/Udon/Wrapper/ExternVRCInstantiate.cs(37,57): error CS1644: Feature `interpolated strings' cannot be used because it is not part of the C# 4.0 language specification

flint urchin
#

For messages about something not being part of the C# 4.0 Language, do the following;

Go to Edit -> Project Settings -> Player find Scripting Runtime Version and Api Compatibility Level and set those to .NET 4

long sentinel
#

how do I destroy something "synced" ? so everyone sees its gone

floral dove
#

@long sentinel I'd recommend you just deactivate the object instead - instantiate/destroy is not fully implemented on the network. You can use SendCustomNetworkEvent to All to fire off an event on them.

long sentinel
#

well instantiate works fine, locally, dont see a reason to have it over the network for me.

Im just to confused with events and stuff like that, isthere any example ?

sturdy wasp
#

I'm not seeing the builder menu in the VRC SDK drop down, just Udon Graph and clear prefs

floral dove
#

@long sentinel there's some event examples in the MultiExample scene in Assets/Udon/Examples

long sentinel
#

ah yes, ive been neglecting that, just browsing the ask page, il lcheck it out

floral dove
#

Have fun! I'm out for the night.

long sentinel
#

gn

sturdy wasp
#

Where is the login window for the SDK now/ or the build menu? Also dynamic bones script isn't registering.

hard wraith
#

reimport dynamic bones from the asset store @sturdy wasp

sturdy wasp
#

I did, it hasn't fixed it

#

And I still can't login or find the Build menu

dawn plover
#

Someone knows if the getKeyDown/getKeyUp is working? I'm trying to use it for like an hour but it seems it doesn't activate in any way

#

Nevermind, now it's working and I didn't do anything different, I'm so confused

deep raptor
#

Hi, is there any way to disable the ownership of objects so every player can interact with them using colliders (foot colliders)? Right now you have to pick the object up to be able to collide with it

zealous aspen
#

I've created an interact and it works as it should in local testing, but when I publish it to a live world, it doesn't work at all. Are there any known bugs with interacts?

scarlet lake
#

how can i use UI Button for Udon?

fallen prawn
#

Simple VRC Ui Shape?

fair bough
#

UI Button usage.... First add VRC UI Shape and Udon on canvas
Then... in Udon Script set CustomEvent and back to your button at onClick() set object function to canvas (have vrc ui shape and udon)
set function UdonBehaviour.SendCustomEvent and put CustomEvent Name

scarlet lake
#

thanks

fair bough
#

It like Trigger version usage 🙂

#

you can put multiple customevent in single Udon for your many button 😉

scarlet lake
#

Just my mistake lol XD

fair bough
#

don't mind 🙂

oak jungle
#

Hi all, I have two buttons, for turning a mirror on & off, I'd like to combine the buttons into one but for the life of me it is not working. They work separately. Any help is appreciated.

long sentinel
#

Any idea on how to show text/images etc on VR users UI? it appears for desktop, but blocks the VRChat menu :/

flint urchin
#

@oak jungle you need to get the current active state of the game object then unary the bool and use that value to set the active state

oak jungle
#

I believe I did try that and it didn't work. Using the Boolean Unary right?

flint urchin
#

Yes

#

Gameobject isActive -> unary -> GameObject setActive

#

But do mind that there is a bug that if you’re using the same variable node it will not work (this will be fixed at some point, but keep that in mind)

oak jungle
#

There isn't a isActive, but there is an activeSelf?

#

It works, I swear that was one of the things I tried yesterday. (^u^)/ Thanks for helping PhaxeNor.

#

The next thing I am looking into is a video player, are there any tutorials/guides for Udon's way of doing it?

flint urchin
#

Video players aren’t supported yet

oak jungle
#

Ah okay, that would explain mine not working lol

#

Sorry for being a bother, one more question: How do I enable jumping? In videos they show how to do it in the old SDK and it doesn't seem similar from when I have investigated...

flint urchin
#

VRCPlayerApi SetJumpImpulse (normal value is 3)

oak jungle
#

Okay, so correct me if I am wrong, I would add that into a Udon on the VRCWorld with Start > setJumpImpulse?

flint urchin
#

You can add that anywhere.

#

Just add it to Start and set it there

#

I create a manager object and do all the stuff there

oak jungle
#

Oh okay, that's fine, thanks for clearing that up. You've been a big help!

flint urchin
#

It’s made so you can update the value at any time

oak jungle
#

Yeah, it'll be useful in some cases I imagine

glossy sky
#

So do worlds now have to use Udon or do we have an option to stick with the old triggers? I'm still learning Udon but right now, it's way beyond me and taking me a long time to learn personally as I'm a nursing student who only makes maps as a side hobby etc. x_x

distant ore
#

is there any node for "or" "and" in Udon?

ionic minnow
#

why when I import my VRCSDK3 + UDON in the VRchat SDK windows I only get utilities windows ?

scarlet lake
#

How can i Jump with udon...?

acoustic delta
#
scarlet lake
#

solved!

acoustic delta
#

@glossy sky You now get to choose between SDK2 and SDK3. SDK2 is the legacy version which contains triggers, use this if you want to have triggers in your world or if you are making an avatar. SDK3 is the Udon version and does not work on avatars. You must choose one or the other as they are not compatible with each other.

glossy sky
#

Lovely, thank you!

acoustic delta
#

@distant ore Yes, for booleans you can use And, Or and Xor. These also exists for other primitives such as ints.

distant ore
#

Ahh thanks !

acoustic delta
#

@ionic minnow If you cannot see "Show Control Panel" then there most likely are compilation errors in console. First try restart Unity. Secondly try right-click the VRCSDK folder in Unity and select "Reimport All". If that also doesn't fix it then close Unity, delete the VRCSDK and Udon folders, download the latest SDK from the website, open Unity and try import it. If none of that helps then please screenshot any errors you see in the console. Make sure you have errors being shown as in the picture. You can also find Unity errors by scrolling to the bottom of your "Editor Log" which you can find by the green arrow:

ionic minnow
acoustic delta
#

@ionic minnow Those lines of code should only run if you are on SDK2... Are you making an avatar or a world? Could you please try close unity, delete the VRCSDK and Udon folders and re-import the SDK? You should have version VRCSDK3+UDON-2020.04.01.10.20

ionic minnow
#

Im making a world and im using VRCSDK3+UDON-2020.04.01.10.20

vague agate
#

Hello, I have a question, shouldn't we use udon behavior in the vrc world when making jumps using udon? I remembered using player mods and put udon behavior in the vrc world, but the jump didn't work. Is this an error? Or shouldn't udon behavior be used in the vrc world?

acoustic delta
vague agate
#

@acoustic delta Thank you so much for your answer ~! When writing small script activating, shouldn't we put this udon behavior into the VRCWORLD prefab? Shouldn't it be like using playermods? Does any udon behaivor not work on VRCworld prefab?

ionic minnow
#

@acoustic delta I tried to reupload but I still got this error

fallow mural
#

is there a reason I can't save the clone into a game object variable? each time I do this link when it compiles it gives me the error ```Failed to refresh program 'Spawner Udon Graph Program Asset 2' due to exception 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e1319b7195c343e79b385cd3aa43f5dc>:0

acoustic delta
#

@vague agate You are right, such script could definitely be made into a drag-and-drop Prefab. I think various reasons I haven't seen such prefab yet is 1) it's such a tiny script and easy to recreate, 2) Udon hasn't existed for a long time, and 3) it's a good way of yourself getting started working with Udon.

tardy trellis
#

how do you like, actually do "get" from a list? like from this thing, or do length?

acoustic delta
#

@tardy trellis As of now we only have access to Arrays, and we can't do anything with Lists. That is a known bug.

tardy trellis
#

then.. how do you get an array of all players?

fallow mural
#

@acoustic delta yes it goes away if I remove the link, it seems if I link ANYTHING to that clone it will rip, even a debug. I remade all nodes from scratch, seems that fixed it O_o thanks

#

I enter playmode, test it, doesn't do anything, when in playmode I get these, don't know if they are normal.

When I exit play mode, I get that error again 😐

Already created the program from scratch on a new file, no luck

vague agate
#

@acoustic delta Thank you very much for the answer.
But my question wasn't about it.
I'm not good at my English so I'm asking a question while using a translator. Sorry.
I tested the link about the jump you sent me a while ago.
When I tested it before, I made the script in vrcWORLD. But the jump didn't work. And when I made it inside empty instead of vrcWORLD it worked.
So I thought the udon script didn't work in vrcWORLD (prefab-add component-udon).
So I was asking if I was right.
And I tested it again after rebooting the computer. And the jump worked well. I think it was just an error.
Now the problem is solved. I'm really sorry for the misunderstanding. And thank you very much for your help🙂

distant ore
#

Is there a way to parent an object to the head bone of a local player?

west plover
#

^ would also like to know this

#

Wrong channel

#

Avatars don't use Udon

fallow mural
#

anyone has some udon sharp examples? I'm stuck at finding the instantiate a prefab

west plover
#

Dig around in there

fallow mural
#

thanks!!

west plover
#

Look for the VRCInstantiate function

#

I literally just put it up 😄

#

I think Merlin added some examples to their repo too

meager dove
#

@distant ore you can just get the head tracking data with the vrcplayer api get tracking data node

west plover
#

Cardmanager.cs::285

meager dove
#

from that you can get position and rotation and apply the necessary transforms have an object follow the head

west plover
#

Can you do that with hands?

meager dove
#

yes, the same node lets you get head and hands data

west plover
#

neat.

distant ore
#

Would it be the same as using VRCplayer API Get Bone?

meager dove
#

I would guess that the tracking data is exact controller and headset tracking data, while bone position is going to depend on the armature!

tardy trellis
#

i tried doing tracking data thing, but it doesn't work.. am i doing something wrong?

#

by logic the object should just lock onto my left hand?

#

but it floats there, possibly the thing doesn't even tick

#

halp ;-;

#

oh oof

#

there's an error when i use tracking data

ivory thorn
#

Did someone already make any basic udon tutorials like recreating triggers etc?

lusty lintel
#
flint urchin
#

Working on it

ivory thorn
#

Thank you for your service, udon cannot be less user friendly imo 😛

flint urchin
#

Oh, I’m aware 🙂

tardy trellis
#

udon reminds me a bit of unity bolt tbh

flint urchin
#

Also for your issue, multiple output from a node can cause issues currently until the bug has been fixed

#

You should also use the combined set transform and rotation node when updating it like that

vast nimbus
#

Can anyone make a exemple of who to make a avatar pedestal on Udon, i try but not work

flint urchin
#

That node is better to use in terms of performance

#

At some point during the day I will william

tardy trellis
#

okedoke

#

but also, i figured out that tracking data is just not working and bone position and rotation works, but now i want to also display bone position... it doesn't work for some reason D: am i doing something wrong? (reference to uitext is set in the editor)

flint urchin
#

Is this object a child object by any chance?

tardy trellis
#

yeah

flint urchin
#

Okey, then until that bug has been fixed you either need to have it as root, or have a behaviour on all objects up including the root

tardy trellis
flint urchin
#

So the behaviour is root

#

Hmm

#

I’d suggest you do debug log and see if it’s being fired in game

tardy trellis
#

how do i see logs from inside vrchat tho?

flint urchin
#

—enable-debug-gui —enable-udon-debug-logging

#

Then press eighth shift + \ + 3 if you’re using US keyboard

#

You can see this in both desktop and vr

#

Just be sure to remove those launch options when you play normally

tardy trellis
#

uhm, i press build & test in the unity and not sure i can really change launch options while doing that? or is that automatically done by that button?

flint urchin
#

You can, but requires some extra stuff.

#

Don’t have the url or code for it here now (on mobile)

#

So recommend you upload and start from either steam (if that’s what you use) or a shortcut with those launch options

tardy trellis
#

oke

cedar cove
#

Anyone know how to open multiple udon graph windows?

robust summit
#

Are objects able to make collisionchecks with the player? I tried this and it does not work https://ask.vrchat.com/t/player-collision-in-udon/428

oak jungle
#

Do I need to do any Udon for VRC chairs?

fiery yoke
#

@robust summit I wrote that guide a few weeks ago, and I tested it. It was working back then. Might have changed, but I dont think so. Theres potentially a much better way by just using "OnControllerColliderHit" but I havent gotten around to testing that yet

boreal flower
#

Hello, I'm really new to Udon and i'm trying to figure out how getting components from other objects work without setting them as public, any reference to a video or a push in the right direction would help, thank you!

acoustic delta
#

@cedar cove At the moment, you can't. Opening one graph will close the other.

cedar cove
#

Ah ok, thanks!

flint urchin
#

@boreal flower GetComponent can do that for you

boreal flower
#

Thanks, but it looks like it uses components that already exist on the object to get other components? I don't have any of those components on the object already

#

I have a child on the object i'm using, and there's an audio source on the child. I want to get that AudioSource component without setting it as public

#

I thought about using GameObject.find(name) but I don't know where to go from there even if I found the object

robust summit
#

@fiery yoke will try and figure it out later. It apears to work while in the editor but not when you test it localy in vrc

fiery yoke
#

That might be unrelated

mystic lodge
#

Hey! I would like to ask you for help with my card, I am modifying it and I would like to play games and if you could tell me how we make beer pong please

distant ore
#

Can we somehow figure out a player's height ?

flint urchin
#

Get the player position and the position of the players head, that will give you a rough estimate of their height

fiery yoke
#

@robust summit I can confirm that collision with the player still works

distant ore
#

So if a player is crouching then the height wouldnt be accurate?

#

is there a way to check if a player is crouching or not then ? 🤔

fiery yoke
#

You essentially just get the difference between their base height (between the feet) and the Headset height. This can be any number, because of physical moving (crouching, jumping) and Playspace mover.

#

There is no way to get the "actual" height, because there is no "actual" height. The only fixed values are the "User Real Height" and each Avatars height when in T-Pose. But even then it depends if youre just measuring the armature, or the mesh.
For what exactly do you need the height?

oak jungle
#

Is it just me that is having a weird bug with Chairs? Sitting on them then your avatar like stretches their legs

flint urchin
#

They are a bit weird atm, you tried the default example chair too?

lilac mountain
#

I've been trying to use GameObject.GetComponent to get the UdonBehavior off of an object, then I'd like to send a custom event to that UdonBehavior. When I do this, I get an error.

The generic node '__GetComponent__T' doesn't support the type VRC.Udon.UdonBehaviour; Consider using the non-generic form of this node if it's available
#

I've tried using the other forms of GetComponent, but I can't connect the output noodle (which should be an UdonBehavior) to send custom event.

flint urchin
#

post image of how you have it now

floral dove
#

@lilac mountain - I ran into this bug myself. I had to connect the noodle using one mode and then switch it. I'll try it again and see if I can reproduce.

floral dove
#

@lilac mountain - ok, it's a bit silly, but this works:
Set your GameObject.GetComponent node to use (T) in the dropdown, connect the output to the SendCustomEvent node, then swap the GetComponent node to use (Type). It should stay connected and work now.

lilac mountain
#

it works, thanks!

oak jungle
#

@flint urchin Yeah the default chair is messed up lol

solid cairn
#

I currently have a script using onTriggerEnter on several like objects to teleport the player when the object enters a trigger cube I have set up. This means I have multiple objects each with a script on them.

Are there events that would allow me to instead listen for collision/triggers from the trigger cube instead? I tried a few different ways with no luck.

fiery yoke
#

Well you could setup a system to do that.
So what exactly is your goal?

solid cairn
#

but I need to place that on each of the objects. (I have multiple objects able to fire off a given event when entering the cube).

#

That results in quite a few objects with udon script components, and I was wondering if there was an event I can use from the cube's side instead to listen for objects entering it, so I won't have to have, say , 10 objects with scripts, and instead only have 1.

fiery yoke
#

You pretty much already have that logic tho dont you? Just invert it

solid cairn
#

yeah, I had that on the cube, but it wasn't firing

#

so I was thinking I was just missing something basic

fiery yoke
#

Well collision like this is always two way. It causes a OnTrigger/CollisionEnter on both GameObjects.

#

You might want to read up on Collisions and when they happen

solid cairn
#

hmmm maybe

lusty lintel
#

what parts about vrcstations work? the default chair work for entering. but on my end it clears the controller, and setting it with udon will render the station in unusable.

solid cairn
#

oh god.

#

I didn't have a trigger on the other object. that's why. 🤦‍♂️

gaunt fern
#

I need some help. I keep getting this error whenever I try to compile a graph. The graph used to compile, but when Unity2018 and Udon hit the live servers, I updated the world and now it won't work. I thought it was a bug with just that graph. So I completely recreated the graph from scratch and still got the same error. Everything in the error was the same. I did a few things and found that it's being caused by a branch node. The node before it is another branch node. At one point I put a SetVariable in-between them as a buffer, but still got the error. If anyone has any ideas on how to fix this, please let me know.

fiery yoke
#

@gaunt fern Most "KeyNotFoundExceptions" are currently caused by a bug that has to do with nodes and using their output for multiple node inputs. You could try to avoid doing that, wait for a fix, or use other compilers like U#

solid cairn
#

that bug's making me miserable :/

meager dove
#

how does object syncing work exactly? just adding an empty udon behaviour script with synchronize position works?

floral dove
#

@meager dove - that's right! Synchronize position will update position and rotation.

meager dove
#

is it supposed to work with instantiated objects right now? they don't seem to sync

floral dove
#

I've seen the system be a little unhappy about completely empty Udon Behaviours, though. There's an 'Empty' Udon example program in the SDK you can use to avoid that.

fiery yoke
#

Instantiated objects are not networked rn, syncing is a network thing. So that
statement doesnt make much sense.

floral dove
#

Sorry, @meager dove - Instantiation does not sync right now.

meager dove
#

oh, I see!! thanks for the help!!

fiery yoke
#

Also momo, you still need to join the Team Member group on the Ask forum ;P

placid musk
#

Is it worth me reporting a bug if I get an error before I even open the Udon Graph?

#

It gives me a UnityException when I try to create a new program.

floral dove
#

@placid musk possibly, but let's try to work through it first. Is this issue happening in a new project or an existing one?

placid musk
#

new project

#

unity 2018.4.20f1 and the latest sdk3+udon

floral dove
#

oh wow, super-clean. I have no insights, then, other than the usual suspects - try restarting your machine, making a new project etc. Make sure you've saved your scene before trying to make the new program.

placid musk
#

it says "UnityException: Creating asset at path failed."

#

it doesnt seem to have a folder to place files in

#

theres 2 spaces inbetween 'path' and 'failed'

floral dove
#

aha. Try opening up one of the example scenes in Assets/Udon/Examples and making a new Behaviour there.

placid musk
#

yeah that worked

#

i dont know how to go back to the other scene though vrcVPoorThinking

floral dove
#

@placid musk where did you save that first scene?

mortal pelican
#

just started learning Udon and thought to build a couple instances of the demo UI scene, but nothing seems to be syncing so wondering if I just didnt set it up right or something?

placid musk
#

@floral dove i didnt. im not going to worry about it though, it didnt have anything in it except a cube

floral dove
#

@mortal pelican most of the values will only sync from master > others. Did you go through the Readme for this scene? It explains what's going on with each item.

#

@placid musk - ah! That's the problem then. You can only create Udon Programs in saved scenes, that's how Unity knows where to save them.

placid musk
#

ooooooohhhh

grizzled shuttle
#

I've just jumped into udon, I've found this Vrcplayer API Get All Players node, which gives a List'1 which I assume is a List<Vrcplayer>. The problem is this isn't a Vrcplayer[] so I'm not sure how I'd go about iterating over it.
https://owo.sh/6mqTTPW.png

placid musk
#

lol okay ty

grizzled shuttle
#

(i'm trying to get the display name of the instance master)

floral dove
#

@grizzled shuttle on a call right now, but I think this could work:

fiery yoke
#

Does anyone know what Networking.GetUniqueName() does?

floral dove
#

@grizzled shuttle just tested and it works. Instead of getting a list of all players (lists don't work right now), we just call this method on Start, which means it runs on everyone in the world when they first join and checks if they're master. You could have this on a world object instead, fire it off with a custom event, and whoever is master would have their UdonBehaviour report 'True' in that Branch node.

ionic minnow
#

Someone get a udon graph for a trigger button to activate/deactivate a props ?

floral dove
#

@ionic minnow the example scene at Assets/Udon/Examples/MultiExample shows how to use a Button to send a custom event to another object, you could use that to activate/deactivate another object. Check it out, and the Readme that goes with it in that same directory.

ionic minnow
#

hoooo I didnt see it thx a lot !

#

I try but I dont see what I need to do for its working ^^"

glossy tartan
#

How do you do a simple onTriggerEnter > Teleport To > Object kind of thing? I'm still a bit new to this

rotund needle
#

@glossy tartan Check this out. PhaxeNor outlined how to do most of the old basic stuff with the new Udon system. https://ask.vrchat.com/t/phaxenors-examples/273/3

glossy tartan
#

@rotund needle Thank you very much

rotund needle
#

NP! Anyone have an example or know what node I'd need to update text in the world (via any working text system)?

flint urchin
#

To a ui text?

rotund needle
#

Sure!

#

I see a node for that, I think. But I'm not sure how to 'get' the component. Can I just make a var for the Game Object that has a UI Text component attached?

#

Might have found a post about it on ask.vrchat

solid cairn
#

that forum's organization is a little weird. Guides, Examples, Tips & Tricks are pretty close to being the same thing.

boreal flower
boreal flower
#

The page isn't loading at all but I guess I should check for nodes with multiple output flows besides the get variable ones?

wind atlas
#

How would I go around making a global timer? Is it even possible?

#

As far as I understand it, Synced Variables are on the server, but you can only trigger them when somebody joins?

flint urchin
#

Global timer, as count up/down?

wind atlas
#

Yeah, kinda.

#

A timer that is the same for everyone, like a cooldown.

flint urchin
#

Just have a synced INT variable and update that on the master side

wind atlas
#

OH

#

I'm dumb, I forgot about the checks for master and stuff.

#

Thanks.

flint urchin
#

Then you use the OnDeserialization to update the value on remote clients

wind atlas
#

What does that do? I only read a bit about it.

#

When is it called?

flint urchin
#

It’s the event that is fired when a synced variable is updated

#

It doesn’t tell you what variable though

wind atlas
#

Hmm. I thought variables are synced automatically.

flint urchin
#

They are

#

But you can use that event to do stuff

#

Instead of doing it on Update

wind atlas
#

Ah, so each tick it gets called?

flint urchin
#

It get called when there is a update to the variables

#

OnPreSerialization is before the variable is synced.

#

Master updates the timer in Update

#

Remote clients in Deserialization

#

Can be done in update too but

#

Yeah

wind atlas
#

Thanks a lot.

jagged crow
#

@floral dove Sorry for the delayed answer haha I went to bed. (I beat Alyx! :D)

Do I need to wait for an udon update to make a mirror toggle then? Or is there some other way of going about this

glossy hornet
#

is there any way to access the player cam? ive seen a world with different camera perspectives made with udon cant figure out how it works 😮

floral dove
#

@jagged crow no worries - and congrats on beating Alyx! I've only played a few hours so far, too busy with 2018 launch :P
I think you could get around the issue by just turning on and off the GameObject the mirror component is on, or even just the renderer component.

sour pendant
#

im wondering when the performance issues will be patched

#

I have no idea why but i mentioned this a couple days ago aswell

#

i have a 9900k with a 5.2ghz oc on all cores an rtx2080 and 32gigs of ram

#

my game is locked to 45 or 30 randomly with mirrors OFF

#

i really dont understand why

rotund needle
#

in VR?

sour pendant
#

yeah

#

locked to that when the vive is 90hz

#

so idk

rotund needle
#

Sorry if I'm repeating something you've already discussed, but if it is a single frame under 90, it drops to 45

sour pendant
#

it worked before the update

#

that isnt the case

#

ive never had problems running the game

#

or any game with this pc

#

it seems to just be some bug

#

another friend has his game locked at 15

#

no clue as to why

floral dove
#

@sour pendant support questions can go to #vrchat-support , this channel is for people learning to make things in Udon.

sour pendant
#

it wasnt really a support question

#

was asking if there was a patch in the works

#

but i understand

scarlet lake
#

anyone figured out client side hit detection a la steel n gold on guns yet?

slow coyote
#

Anyone have an idea on how to detect if the local player is colliding with a mesh collider (and if you can get the object it's colliding with)? Like is there a known way to get access to the player's avatar's bounding box?

I was trying to make some kind of wall kick/jump mechanic and was aiming to just do some ray or spherecast with the tracked hand data, but then I realized that wouldn't work with desktop users.

jagged crow
#

Hey so if I leave an instance input null, will it always automatically fill in the instance of the running program?

#

or will it only do that if the type is UdonBehaviour

floral dove
#

it will do that for GameObject, Transform and UdonBehaviour

#

for anything else, you'll want to set a variable or do a GetComponent

jagged crow
#

ahh gotcha

#

I guess all I really need is the GameObject anyway, everything else can be grabbed from there

iron shuttle
#

I was curious is its possible to force a avatar on a player

floral dove
#

@iron shuttle doesn't sound like a very nice thing to do

iron shuttle
#

i would be for a gamemode

jagged crow
#

if not abused it could be cool, but it'd 100% be abused lol

#

maybe a feature to preemptively give permission for specific avatars 🤔

iron shuttle
#

i would be nice not to see anime in a world for once

jagged crow
#

pff

floral dove
#

@iron shuttle - you could offer up a pedestal and ask that users switch to play the game, or give them a good reason to do so.

iron shuttle
#

maybe but then i would need to make a indicator that they are a curtain role if they dont

floral dove
#

@slow coyote - you can't get collisions from player avatars with Udon, but I think you could have a player hold an object and look for collisions on that.

jagged crow
floral dove
#

yay @jagged crow

iron shuttle
#

or check if the avatar is being used by the player so they can do something that other players cant

#

is its even possible i really need to read up on the documentation for it

floral dove
#

@iron shuttle Udon doesn't currently interact with Avatars

jagged crow
#

I'm confused though, the way I did this shouldn't have worked. Deactivating a GameObject disables each component, including attached renderers, colliders, rigidbodies, and scripts. For example, Unity will no longer call the Update() method of a script attached to a deactivated GameObject. (from https://docs.unity3d.com/2018.4/Documentation/ScriptReference/GameObject.SetActive.html)

Shouldn't it have stopped listening for my custom events after it was deactivated the first time?

slow coyote
#

Thanks for the answer, momo. Was hoping to avoid doing something like holding an object, but oh well.

jagged crow
#

or do udon behaviours keep running while deactivated

floral dove
#

sorry @slow coyote - support for making Avatars with Udon programs is down the road, maybe there will be some more straightforward options then.

slow coyote
#

okay, I apparently have a new question already 😓

I don't know what I clicked on, but instead of seeing the normal udon behavior component.. I'm.. seeing this and I don't know how to switch it back.

iron shuttle
#

thats kinda weird that you cant do anything for changing avatar of course it would be abused but i think you could see alot of cool things from it.

jagged crow
#

@slow coyote remove the component and add a new one I guess haha

#

then put the behaviour back on it

slow coyote
#

Happens everywhere in the project

jagged crow
#

oh

#

weird o.O

slow coyote
floral dove
#

@jagged crow - Custom Events will still fire on Deactivated Gameobjects! The usual suspects like Update, FixedUpdate, LateUpdate etc will stop firing but CustomEvents will get through so you can safely use an event to reactivate the object.

jagged crow
#

ohh interesting!

floral dove
#

@slow coyote - looks like the SDK is not loaded properly in that project. I suggest you reimport the unitypackage.

jagged crow
#

so if I'm throwing custom events at an object on Update, deactivating that object won't help performance

#

good to keep that in mind

slow coyote
#

Oof. Alright, thank you.

floral dove
#

@jagged crow - yep, that's right.

jagged crow
#

I guess whatever logic I'm using to deactivate the object could also set a flag to make it stop sending events

#

now I just need to figure out what I want to do for my first proper project 🤔

floral dove
#

@slow coyote - I got a helpful tip regarding PlayerCollision from @fiery yoke! Take a look at this article they wrote: https://ask.vrchat.com/t/player-collision-in-udon/428

slow coyote
#

👍

fiery yoke
#

@slow coyote You also somehow managed to get the Debug Inspector information in the normal Inspector. I have never seen that before lol

iron shuttle
#

has anyone attempted a inventory system yet?

slow coyote
#

I don't know what I did exactly to have that happen, Helpful. I had just did a build and test thing, then clicked on a public variable checkbox, and suddenly it transformed

fiery yoke
#

That is definitely strange. As I said, Ive never seen that happen before. Try going in and out of the debug mode of the inspector

slow coyote
#

Tried it a few times. Nothing changes

#

(well, other than how it looks when inspector's in actual debug mode)

fiery yoke
#

You must be cursed then. No idea how that happened.

slow coyote
#

Curse you, curses!

#

May as well report that reimporting the SDK does bring back the proper udon behavior component functionality

floral dove
#

@slow coyote - I've seen this happen when I'm messing with SDK importing a lot. Exit Unity, delete Udon and VRCSDK Folders, reimport package. You should be good to go.

#

oh good 🙂

slow coyote
#

👍

fiery yoke
#

Good to know.

grizzled shuttle
#

Is setting animator triggers broken in udon?

glossy hornet
#

how to access player camera on udon?

fiery yoke
#

Short answer: You cant.

glossy hornet
#

ive seen a udon world that is selling the script for third person view so there must be a way

flint urchin
#

It’s a shader and a render texture

glossy hornet
#

but its enabled with different keys and positions

fiery yoke
#

I think they are using an extra Camera that is rendering to a RT. Essentially the actual player camera is not used.

flint urchin
#

Because it’s using a second camera in the world that sends the images to the render texture, which is displayed in full screen with the shader

glossy hornet
#

the world is called Udon (Desktop) - Third Person Camera maybe you want to take a look at yourself when you got some time

flint urchin
#

We know how it works, that’s what we’re telling you

glossy hornet
#

so its just a shader with hotkeys bind to it?

flint urchin
#

No, the keys move the camera position around

#

That’s just basic transform

glossy hornet
#

so its made with a second game aplied a shader to it and make the cam move with udon on keypress

flint urchin
#

It’s a bit more complicated than that but essentially yes

glossy hornet
#

sounds like very bad performance because the game has to rander 2 cams instead of 1?

#

render*

flint urchin
#

That all depends on your world and what type of avatars are being used

glossy hornet
#

would like to have some kind of rts camera for my project idea

#

but i guess maybe with a shader thats a pretty bad idea, cause it will propably not work on vr headsets and cost a lot of performance

#

i was hoping i can controll the main camera inside udon itself

flint urchin
#

It will, just got to write support for it

#

But don’t recommend using third person for VR

floral dove
#

@grizzled shuttle Animator Triggers work if you use the name of the trigger instead of the index.

glossy hornet
#

i was thinking some kind of vr support like that minecraft one while you basically sit on some kind of cinema while staring on a tv to play the game to prevent motion sickness

#

special room for vr users

fleet blade
#

how do you make that you could jump in your world?

#

can't find VRC_PlayerMods : (

fleet blade
#

oh thanks 😄

grizzled shuttle
#

wait no

floral dove
grizzled shuttle
#

this should work?

fiery yoke
#

That depends on which Triggers you have.

#

Also I really dont know why you have that Branch at the start...

grizzled shuttle
#

This is my first 2 hours with udon so I don't know best practices yet

fiery yoke
#

Ahh sorry yeah that should work. But you dont need that branch at the start.

floral dove
#

@grizzled shuttle Udon doesn't like sending one output to two places right now - I see you've got that twice in your graph.

#

that may not have anything to do with your issue, but not knowing what else is going on, it's a decent place to start.

fiery yoke
#

Thats not always the case momo. There is a few cases where it wont compile, but then there is other cases where it does.

floral dove
#

@grizzled shuttle are you getting the logs you expect?

grizzled shuttle
#

I was getting the logs I expected, but the sending one output to two places is what was doing it

#

I made everything have one input and one output and it worked

floral dove
#

yay!

#

FYI I think a fix for that issue is coming soon

fiery yoke
#

Thank god

floral dove
#

haha fix is here @fiery yoke ! This unholy mess now works just fine.

jagged crow
#

how do I update the sdk, do I just import the new one and itll overwrite the old? or do I need to remove the old one first somehow

prime quest
#
jagged crow
#

Thanks! :D

#

Got it updated

#

oh dammit the udon watermark is back lol

#

gotta edit that again

storm copper
#

how do i make a static variable?

distant ore
#

I am trying to find the position of the Right Hand tracking data relative to the Head tracking data. Is this possible?

echo steeple
#

I see alot of people asking about making Avatar Pedestals. But no actual replies. Anyone got the rundown on how to do this in UDON? I've been able to make teleporters, doors, mirrors enable on trigger enter/exit, spawn notifications, etc. But can't get Pedestals working in any meaningful way. I'm honestly a tad surprised they didn't at least include code for all the basic things to help people with growing pains instead of a spinning cube.

floral dove
#

Here's how to make an Avatar Pedestal:

  1. Add a VRC Avatar Pedestal Component to a GameObject in your scene and fill in the fields - Set the Blueprint Id to the Avatar you want to display, and turn on ChangeAvatarsOnUse.
  2. Make a new UdonBehaviour with the attached graph.
  3. Build & Test your scene to see it working.
solid cairn
#

hrm, the reusing variable thing seems to be fixed, but I still have to ctrl+x and ctrl+v to have my changes compile.

floral dove
#

@solid cairn - event after the coutndown completes?

solid cairn
#

yeah

floral dove
#

what about if you press 'Reload Graph'?

solid cairn
#

lemme try that

floral dove
#

I find sometimes I have to do that after recovering from a weird state in the graph

solid cairn
#

this issue's been haunting me for the last 2 hours, but of course now it's refreshing properly :/

#

I'll try that next time it acts weird though, thanks

echo steeple
#

Hey, Thanks again, Saw you post this on the forums too. Amazingly quick reply man and super appreciated

floral dove
#

sure thing @echo steeple - I figured more people would find it in the forum over the long run. It's a popular request.

#

now I'm off to sleep!

solid cairn
#

Had it happen again, and reloading graph didn't fix it, cut/paste still did tho.

placid night
#

Is there a way to set auto compile off?

scarlet lake
#

how can i upload my world to use sdk3?

oblique sand
#

Does Udon Behaviour Send Custom Network Event not work? I have the target set to All. When I use the non-network variant it works.

worn hare
#

im having a hard time with udon, been trying to make a toggleable mirror with it, does anyone know how to make it work?

acoustic delta
#

@scarlet lake Just upload your world like normal. Which SDK your world uses depends on which one you import into your world. It is not possible to use SDK3 together with SDK2.

scarlet lake
#

@acoustic delta thanks a lot ♥️♥️

acoustic delta
#

@oblique sand Are you testing in-game or in Unity? Networked events does not work in play-mode in Unity.

oblique sand
#

I was testing in Unity but I did try a few hours back in-game and it didn't work. Also I updated my SDK from the April 1st version to latest if that changes anything.

acoustic delta
#

@placid night Why do you want to disable auto-compile? Go to Assets > Udon > Editor > UdonEditorManager.cs, search for REFRESH_QUEUE_WAIT_PERIOD (line 52) and change it from 5.0 to 9999.0.

urban pivot
#

Possible to print Display Name of Master of world into a UIText or other 'display' in world realtime?

  • When 'Host' of world Joins their name is displayed on a (billboard, poster, etc).

Would this involve setting gameobject(s) active with alphabetical or numerical statements, etc. OR a simple 'print' function to text document in world.
^^

fiery yoke
#

@urban pivot Yeah you would want to do that with the UIText.set text node

urban pivot
#

Okay, when doing this where would I plug it into for it to appear in scene for instance. --

I have a canvas with UI Text currently.

#

@fiery yoke

fiery yoke
#

You probably want a UIText variable, that you put your UIText object in. Then you use that as a reference.

urban pivot
#

Okay, I would create a 'UIText' variable in the Node. Would I name this especially something? Would I throw the entire Behavior Script under the Canvas?

ionic minnow
#

someone get a udon graph for jump in world ?

urban pivot
#

Try this?

#

If you only want jump just plug start into the Jump and PlayerAPI in to instance

ionic minnow
#

where I put the scrip
in the VRCWorld ?

urban pivot
#

I believe on an empty game object

#

Not entirely sure however

ionic minnow
acoustic delta
#

@ionic minnow Yes, @urban pivot is right, the jump impulse script you can just put on an empty game object in your world. If you set it to 0 they will not be able to jump.

ionic minnow
#

so I set it to 1 or 2 ?

urban pivot
#

yup

acoustic delta
#

I have seen recommendations on anything between 1-3, it changes how high you jump, and is up to personal preference.

ionic minnow
acoustic delta
#

That looks right

urban pivot
#

@fiery yoke I plugged the Text from the Canvas into this Variable, will this give the desired result?

fiery yoke
#

Probably not quite. Im not at my pc right now, I might show you how to do it properly later. Otherwise youll have to ask someone else

urban pivot
#

Okay!

hallow moon
#

Is making a dungeon hak n slash world with monsters realistic with Udon? with sword/bow (maybe more) did anyone do it yet?

acoustic delta
#

@urban pivot To update UIText objects you need the "UIText set Text" node:

#

The UdonBehaviour script does not need to be under the canvas, it can be anywhere, on an empty game object. Just assign the UIText object to it's public variable.

urban pivot
#

Okay! thankyou

ionic minnow
#

It dosent work
I cant jump il my world

hazy galleon
#

how can I do a remainder operation on a long...

acoustic delta
#

That seems to be missing, please make a canny about it. @hazy galleon

hazy galleon
#

booo

acoustic delta
#

Meanwhile you can do like we did with int before remainder was implemented, where:

a % b
# i.e. 5 % 4 = 1

# can be written as:
a - (a / b)
# i.e. 5 - (5/4) = 1, because (5/4 are both ints and therefore always round down and become 4)

@hazy galleon

hazy galleon
#

a - ((a / b) * b)

urban pivot
#

@acoustic delta When recreating what you've shown above it creates this; Correct? Then would I plug the Text from the Canvas into this to complete it? I'm not understanding the connection between code and scene.

acoustic delta
#

Yes.

hazy galleon
#

what I'm actually trying to get is fraction of day though, maybe I don't need to do this

#

.NET just has such bad APIs for time

acoustic delta
#

We are also limited to which classes we can access, for security reasons. I know some Timezone stuff were missing last time I checked at least.

urban pivot
#

It's plugged in, but when I check the Text on Canvas it doesn't populate with 'hello world' like defined.

hazy galleon
#

so far so good about getting the time zone, the only problem is that .NET has a dumb idea of what time zone IDs should look like

#

so you have to go digging in the registry to find the time zone

acoustic delta
#

@urban pivot What do you mean with "but when I check the Text on Canvas"? Did you press play for it to run? Are you getting any errors in console?

hazy galleon
#

...and I guess you have to hope that the user will have that zone on their computer too

#

the good news is that when running on non-windows, it does use the standard olson time zone IDs

urban pivot
#

I did press Play yes, I am getting errors. I'm getting the same [UdonBehaviour</color>] An exception occurred during Udon execution, this UdonBehaviour will be halted. VRC.Udon.VM.UdonVMException: The VM encountered an error!

acoustic delta
#

@hazy galleon Seems we have access to both SystemDateTime.ToLocalTime and SystemDateTime.ToUTCTime

#

@urban pivot Please press on the error in your unity console and copy/screenshot the full error.

hazy galleon
#

neither of which is the one I chose to use 🙂

urban pivot
hazy galleon
#

currently I'm at TimeSpan wondering how to get it as a float

acoustic delta
#

It complains that the myText variable is not set, or not connected. Can you please screenshot your graph?

urban pivot
#

I attempted to replicate your template as best as possible.

acoustic delta
#

@hazy galleon We don't have access to the TimeSpan class at all. You can't use any of it's functions.

hazy galleon
#

lame

#

shelving project for another month I guess

acoustic delta
#

Although what you can do is pipe the TimeSpan object into a "Object To string" node and get a string representation of its value, that's something you can at least work with. @hazy galleon

hazy galleon
#

and then I'd have to parse it :/

acoustic delta
#

Yes.

#

I used a similar approach when measuring how long my graph took to run:

#

By setting measure to a DateTime.Now at the start of the graph, and then running the above code at the end of it. Even though we don't have access to TimeSpan class it's still possible to pipe it to an Object input.

hazy galleon
#

problem is that I want the actual value of the span as a float

#

so it's annoying

#

there's another annoying way to get it, where I get the hour, minute, second, millisecond, etc. and build it up manually

#

at this point it's easier to stick with SDK2 and using a panorama to get the time

urban pivot
#

This is what I'm attempting to do- Grab the display name and Push it onto a UI Text in scene / world.

acoustic delta
#

That graph should work. Make sure the public variable DisplayNameOnJoin is set. The "Object reference not set to an instance of an object" means it was trying to perform an operation but the "instance" input node was null i.e. not set.

urban pivot
#

And then when it's done grabbing both, how would this than be put into the UI Text

#

Okay ' Hello World' is now printing.

#

And is printing the welcome message! 😄

acoustic delta
#

Good job!

urban pivot
#

Final step, way to convert Int to String

#

🤔

hazy galleon
#

so the dumbest thing here is manually casting int to float when not even C# makes me do that

#

but other than that I really don't think there's much more I can trim off

#

it would have been nice if addition let me put in more than 2 inputs

urban pivot
#

@acoustic delta Is it possible to convert a Int to a string? Should I use a Get Value function; or how would I convert the int to readable string?

fallow mural
#

are stations not firing OnStationExited OnStationEntered?

2020.04.04 13:46:13 Log        -  [Seat] -> Interact()
2020.04.04 13:46:13 Log        -  [VRC_StationInternal3] Occupant is now "kafeijao"
2020.04.04 13:46:17 Log        -  [VRC_StationInternal3] Occupant is now "null"

It detects my interact but doesn't fire the OnStationEntered O_o

using System;
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
using VRC.Udon.Common.Interfaces;

[AddComponentMenu("")]
public class Chair: UdonSharpBehaviour {
    public override void OnStationEntered() {
        Debug.Log("[Chair] -> OnStationEntered()");
    }
    public override void OnStationExited() {
        Debug.Log("[Chair] -> OnStationExited()");
    }
    public override void Interact() {
        Debug.Log("[Chair] -> Interact()");
        Networking.LocalPlayer.UseAttachedStation();
    }
}

am I doing something wrong? or are stations bugged?

queen panther
#

I had the same issue. I don't think they're working

winter gust
#

does anyone know if pickup events are firing?

#

tryign to make an item snap to whole number coordinates and they don't seem to be triggerign at all or i'm donig it wrong

#

this is my current graph, it should take the existing position and round the X and Z values to whole numbers. I added the Update looop just to see if it was donig anything.

#

i may have it setup wrong or something, i'm not sure

#

i have these on the parent object, and the object itself is extra simple:

fallow mural
#

the pickup events seem to be firing, at least in undon sharp @winter gust

winter gust
#

do you think my graph is wrong then? maybe i'm usign the wrong order of operations here

#

or do i need to manually set the transform now? i understood from the intro videos the transform and object tuff should referrence itself

fallow mural
#

I haven't really used the graph it was giving me problems, do u get the log on the debug log?

winter gust
#

no, nothing in the console

#

unless it writes to a file somewhere

#

this shows up in console sometimes while i'm editing:

#

"Failed to refresh program 'NiteEengale (1) Udon Graph Program Asset' due to exception 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary."

fallow mural
#

idk if this is the issue, as i said didnt try much with udon. try creating a public variable, but dont drag anything to its slot, it defaults to the transform of the same object, then Get that variable and link to the first block, the transform get position

winter gust
#

i think it's failnig to compile

#

some node seems to be preventing it

#

after i added the public variable it didn't show up in the inspector

wheat grove
#

I'm not sure if this is the right place to ask, but I noticed that in Udon worlds such as the Foobar Udon Arcade, the games, objects and text don't show up in the Stream Camera. Is that by design?

winter gust
#

ok

#

so apparently i can't use events at all

#

putting one in the graph, compiles ok, as soon as i attach it to anything, compile error in console

#

"Failed to refresh program 'NiteEengale (1) Udon Graph Program Asset' due to exception 'System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
"

#

yeah it's just broken entirely for me

#

i can't connect any event nodes are it fails to compile with that Dictionary error

#

cool

acoustic delta
#

@urban pivot Yes, just do "int To string" node. You can always cast anything to a string in Udon/C#.

winter gust
#

i will double-check that in a moment

#

version is old, updating

#

i'll seeif the issue remains, otherwise i'm swtichnig to udonsharp for now

#

welp, i'll try it some other time i guess

#

the graph doesn't load and i have to remake it

#

ok i'm finally to a point where i can test

#

had to update the udon sdk, and the restart unity

floral dove
#

@winter gust you can't connect two flow nodes to one input like you have. Flow decides the order of execution.

winter gust
#

ah i see

#

well i had tried it with only one as well

floral dove
#

You can check out the examples in Assets/Udon/Examples to see the graphs for some working pickups. We don't have anything working with OnDrop but maybe it will give you some clues about how things are set up in the scene .

normal lichen
winter gust
#

@normal lichen check your sdk is updated

#

i just had that issue, but haven't been abl to verify it went away after i updated

#

VRCSDK3+UDON-2020.04.03.13.19

#

you can check current version in your Assets/Udon/version.txt

peak mason
#

Hello, I'm trying to put a gameobject active for everyone when I press a button, it doesn't seem to work globally, am I doing this wrong ?

normal lichen
#

@winter gust thank you i updated the sdk and it dosent do it anymore

winter gust
#

good to know

#

it invalidated my graph so i would have had to make it again

#

@floral dove so @fallow mural and i have discovered that the stations aren't triggering onenter and onexit events

#

of the exposed event aren't named correctly

#

*or

floral dove
#

@winter gust yes, that's a known issue. Working on it!

winter gust
#

cool thanks for your hard wrok

#

keep it up and we'll have some cool stuff to build here

scarlet lake
#

Hello. Does anyone have a good guide/tutorial for Udon? I'm trying to make an item respawn to it's initial location on the press of a button, something that I did very easily with the old trigger system, but I don't know how to find the proper components for the graph and I'm stuck...

floral dove
#

@scarlet lake I recommend you check out the examples and readme in 'Assets/Udon/Examples'.
You want to:
On Start, save the position of a Transform to a Vector 3 variable.
On Interact with Button, set Position of Transform to this saved variable.

fallow mural
#

what am I doing wrong :C ?

floral dove
#

Hm - your graph looks pretty good from here, no clear issues off the bat. I can try to replicate this later today. It's possible that triggering the Exit Station event doesn't currently work. There's a known issue that the onEnter/onExit events don't fire, could be related.

deft dawn
#

I'm trying to get the bone position of a hand, and display it in a text box and I've tested everything except that the part I circled in red doesn't work even when testing with a build, would anyone know why?

grand temple
#

Have you updated to the most recent sdk? There was a problem with pulling multiple noodles from one node like that, but apparently this update has fixed it

deft dawn
#

I haven't, I'll try that now

#

Works now, thanks for the help

plain elbow
#

Does anyone know a way of getting an int with the number of players currently in the instance?

flint urchin
#

We will be able to get it via the list of players when that has been fixed. But for now you got to do the math in Player Joined and Player Left

plain elbow
#

So something like OnPlayerJoined add to number and OnPlayerLeft subtract said number.

#

im a dummy

#

thats so simple

#

Also separate question; how do i access a public variable from a different udon graph?

flint urchin
#

GetProgramVariable

plain elbow
#

Thanks!

astral knot
#

Hello, I couldn't find this info online, but is there any way to apply a udon behaviour on all the players that join a world?

storm copper
#

yes

#

i have a prefab you want it?

astral knot
#

Sure, thanks a lot!

storm copper
#

what alternatives i have for enum?

autumn scroll
#

this may sound like a stupid question, but are there any guides for udon explaining how to replicate simple programming commands such as a = !a?

floral dove
#

@autumn scroll look for Unary Operator

autumn scroll
#

"Unary Negation"?

fallow mural
autumn scroll
queen panther
autumn scroll
#

@autumn scroll you may also be interested in the Udon C# compiler https://github.com/Merlin-san/UdonSharp
@queen panther didn't realise that was ready for prime time already, I'll give that a go too then, many thanks folks!

astral knot
#

Is there any way to add a directional impulse force to players? Do they have a RigidBody?

fiery yoke
#

@astral knot PlayerApi.SetSpeed

#

If you want forces, you have to make your own Physics :P

astral knot
#

Ok, thanks a lot!

fiery yoke
#

Also Im working on a Custom Controller that uses a Rigidbody.

astral knot
#

That would be so cool!

#

I'm trying to make a vrc world with planet gravity and orbits, and so far it works perfectly with unity objects, but it's a pain to apply to players x)

plain elbow
#

anyone know how to make a line break in a string?

floral dove
#

@plain elbow not yet - I've tried so many things.

plain elbow
#

I figured out another way to try to make line breaks, its pretty janky but it works--just add a boatload of spaces and the next word will move to the next line.

jagged crow
#

haha

#

That's one way to do it

floral dove
#

Haha that's exactly what I do in the SyncValueTypes example @plain elbow. Didn't want to recommend it because it's JANK

wind atlas
#

What is the difference between OnSpawn and Start when you join?

west plover
#

I'm getting a multi-minute freeze on "Bundling and compressing data"

#

When trying to upload

scarlet lake
#

@scarlet lake I recommend you check out the examples and readme in 'Assets/Udon/Examples'.
You want to:
On Start, save the position of a Transform to a Vector 3 variable.
On Interact with Button, set Position of Transform to this saved variable.
@floral dove Thanks for the advice, but I'm having a hard time in finding the proper block. I've managed to find Start, but how do I get the positions of a transform? By using "transform get local position"? I can't link the start block to that, which probably means that I'm doing this wrong. It seems to be asking for an instance as an input. I guess that instance is the item that I wish to respawn, but how do I input it to the block? Do i need to copy some string into the inspector tab when clicking on a block?

I'm sorry for these noobish questions, but sadly I have 0 experience with coding. I could manage myself in the old system because stuff like "spawn" was self explanatory, but Udon's block's names are rather cryptic for a guy with 0 experience in programming like me 😅 If i type "transform" into the search bar, I get a very long list of results, and I don't know exactly what is that I should be looking for.

Could someone be so kind to upload at least a picture of what am I supposed to do? I have a friend who runs language learning gatherings on VRChat, and I made a simple cozy world for him where he could play basic language games with his students. He asked me to make an update for the upcoming Easter, for being in theme with the festivities. I had a button that could respawn a dice that we used for a conversation game. But if was able to do that by myself with the trigger system, Udon is on a level I can't access, so I can't "rebuild" my world with the new SDK or I'll loose that button and the chair toggles I had 😅

Thanks in advance for who can spare some time to help me.

floral dove
#

@scarlet lake have you gone through all the examples? I think if you follow the readme and go through the example scenes and graphs, you'll learn a lot about what blocks are available and how the program flow works. If you do all of that and you are still having a problem, I will help make your graph for you in a couple of hours when I've got some free time.

scarlet lake
#

I've read the readme and tried to open some examples, and then I felt... not qualified enough for understanding it 😅 I loved the video tutorials found in the readme, but they take for granted that the watcher knows a lot of stuff... I don't think I do. Either that or I'm dumb. 😅
For instance, in the tutorial video they show that using a node called "transform" they can store the data of a cube in variable. The thing is, I sense this is what I'm looking for, but I don't get how to decide which object that node is taking data from. And what data exactly. Does it reference to the object I've attached the "udon behaviour" component? Or do I have to input it manually somewhere?

God, I feel so dumb 😅

#

@floral dove You know what, I just realized that I don't have only a spawner to recreate in Udon, I also need to recreate a toggle that disabled/enabled some chairs, and I would feel very bad asking someone else to waste so much time in helping me. And then again, if I had a problem with it I wouldn't be able to fix it or even try, because I don't get how it works. That can't be a solution.
Nevermind. The world I've made wasn't affected by any negative effect in the recent updates, it still works 100% perfectly, so I guess I'll just keep it that way until the old trigger system is definitely gone lol.
Sorry for clogging the chat with the wall of text ^^

floral dove
#

@scarlet lake I understand. Udon is in Alpha and a little better suited for people that know something about scripting and the way Unity and C# work at the moment. We'll have some features and tutorials coming that will be friendlier to complete beginners. We all start somewhere!

scarlet lake
#

Yeah, VRChat already made me discover a passion for 3D modelling, which I used to make avatar and worlds. The trigger system was way out of my league, but I could do basic stuff like toggles. Udon feels so great and powerful, and honestly, I'm very exited about what it can do and what others will do but... now I feel a little powerless lol. My friend had big ideas for this gathering world I've made for him, and now I have to be the bearer of bad news lol.

I guess I'll advise him to hire a programmer or something lol

#

If you want to hear the opinion of a random idiot with no programming experience: don't dumb down the system for us. It will only make it more limiting. Just make it more easy to basic stuff for us. Add some "pre built" script like a spawner or a toggle with a simple readme and we'll be fine. ^^

floral dove
#

Thanks for the feedback! We'll definitely add more examples and premade stuff.

#

Also @scarlet lake you can still use triggers for your new world, there's no "end date" right now for SDK2 (the old triggers, etc system) going away.

vagrant coral
#

maybe a silly question and i may have missed something while reading up on udon. im trying to set the jump strength in the world. is there any info somewhere on how to set that up?

#

i found the set jump impulse, and gravity... but not sure how to implement these

fiery yoke
#

@vagrant coral look in pins

queen panther
#

This should have what you're looking for

vagrant coral
#

thanks!

green plinth
#

Could anyone tell me why the heck when i use the identical script to others and likewise when i make a fully working script, that when i test it, IT DOES NOT WORK!!!!

#

I am so fed up with this BS it was the same issue with the old system, things that should work DOES NOT!

#

Seems i found the issue, apparently when a null object occurs it refuses to compile (ever). Even if it is no longer null...

#

Anyhow for some reason the compiler refuses to compile and does not tell you it failed...

worn hare
#

how do you fix this issue?

green plinth
#

Beats me, it should not happen in the first place.

#

And if i rename public variables they do not change name for same reason.

#

both the auto and manual compiler refuses to function

worn hare
#

i also dont understand how a udon script works perfectly fine in playmode but refues to workon the test client and published world.

civic vale
#

What says that an action is triggering locally or globally =o?

#

like getting local player position then setting an object to that position

#

what says that the object is setting its position for everyone or just you

green plinth
#

Hi @civic vale Udon giving you a headache as well?

civic vale
#

Kinda

#

just trying to go from old triggers to this xD

worn hare
#

likewise.

civic vale
#

I got the player api stuff working

#

like putting colliders on each bone

green plinth
#

Im just trying to get anything working period, just like in the old system the updates are not being saved properly, so regardless what i do it's hopeless.

civic vale
#

I'm just curious if the object will attach to each person that joins locally or will it attach to the first person that comes

#

or do I need to set up a whole different thing for this event happening per person 🤨

green plinth
#

Btw you might wana set it for when player joins.

#

Might make it a whole lot simpler for you @civic vale , as player joined gives a player object for you to add that to

#

But yea i am trying to make this advanced toggle work. but it refuses to budge. https://ask.vrchat.com/t/phaxenors-examples/273/4

worn hare
#

im just an actual dum dum, got my issue solved.

floral dove
#

@green plinth do the examples in Assets/Udon/Examples work for you?

green plinth
#

Seems i found the issue, for some reason the compiler hates when i use multiple events to trigger with so it fails to compile....

#

Odd thing is that i have used complex 3 event triggering before and no issues...

floral dove
#

Ok, if you have any specific issues you can post them here for someone to try and help!

green plinth
#

Anyhow it seems the only easy way to verify that the compiler updated the code is to have a public variable that you change name on and then confirm the compiler updates it in the inspector....

civic vale
#

Ok its local

#

poggers

floral dove
#

@green plinth you can take a look at compiled code and see that it updates as well.

green plinth
#

Yes @floral dove but with larger code it can be a real pain to check if the code altered at all.

floral dove
#

I've gotten in the habit of pressing reload and then compile, usually triggers a compile for me unless I have an error.

green plinth
#

Btw how you zoom the Graph mode?

floral dove
#

@green plinth no zoom yet.

green plinth
#

Anyhow @floral dove this is just ridiculous. I been trying to replicate the advanced version this guy made. https://ask.vrchat.com/t/phaxenors-examples/273 but it refuses to even compile. 😢

#

Fact is that i seemed to be having the same issue with the old system, when i changed triggers and tested it, the changes did not set in at all.

storm copper
#

how i can make an void buttononclick() ? so thats activate a method in my main program

#

im using udonsharp

flint urchin
#

@green plinth what's the error you get when trying to compile it?

green plinth
#

thats the most annoying thing about it @flint urchin it does not give errors it just leaves the old script and does not update it.

flint urchin
#

Then it could be the bug with using Get Variable on multiple nodes

floral dove
#

@flint urchin that's fixed in the latest SDK!

green plinth
#

there a new one?

flint urchin
#

Then update to that one

#

Was one on Friday

green plinth
#

@flint urchin i tried split the get variable into 2 seperate ones and no change.

#

maybe i have to dosaem for object [] get?

#

Ok @flint urchin i simplified the code to the point where it no longer does it's task but should still compile, yet no change...

flint urchin
#

Give me a min

green plinth
#

Anyhow, i am gonna update the SDK and hope, but is it the same procedure as for the old non-udon?

turbid vortex
#

how do i make sure the action done in the udon script is user local not effecting everyone ?

flint urchin
#

Everything is local by default

green plinth
#

And that leads me to my question @flint urchin how you make the changes global?

flint urchin
#

Make variables synced and send networked events (not fully working)

#

@green plinth yeah, in the new SDK it's working

halcyon rock
#

new to udon, i think i figure out the graphs part but idk how to apply it to objects or im just dumb

green plinth
#

@halcyon rock use a global variable to fetch a object to alter.

halcyon rock
#

not using an object to alter, just use it to interact to make other objects disappear and other reappear

green plinth
#

Basically a mirror button, the interact will only function on the object it's used on, for the script to know what object you wana alter you need a global variable in order to tell it what object you talking about.

floral dove
#

@halcyon rock check out the examples in 'Assets/Udon/Examples'

halcyon rock
#

time for some testing

green plinth
#

@floral dove seems the compiler still freaks out if you use 2 events on same connection

#

Also @floral dove seems the code as @flint urchin said works fine in the new SDK. So ty.

#

Also i have a second issue, apparently when i have a regular pickup object, for some reason it is local, meaning if someone moves it you do not see it happen, what is the new system for it?

flint urchin
#

Check the Synchronize Position

green plinth
#

so you just use a empty udon behaviour script then @flint urchin instead of the old system?

flint urchin
#

Yeah, but the Udon Behaviour will need a Udon asset assigned to it. Can just be empty if you're not doing anything in it

halcyon rock
#

my brain is fried

green plinth
#

so simply a None Source will do @flint urchin ?

flint urchin
#

No, you need a empty udon graph

green plinth
#

Dang how annoying....

flint urchin
#

¯_(ツ)_/¯

halcyon rock
#

wheres the other material where its gonna swap to in the example on the in interact?

green plinth
#

@halcyon rock in the script or in the files? Because if it files it is your choise.

halcyon rock
#

theres nothing to swap to in the example?

green plinth
#

if it the one im thinking of there is 2-3 of them, just find the source in the inspector and click on it and the file gets marked.

halcyon rock
#

can i swap a game object in the hierarchy?

green plinth
#

any changes in the hierarchy are tracked so any refferences are altered to the new position.

#

but yes if you drag and drop a opbject from hierarchy into the inspector if it's valid it adds it in

halcyon rock
#

like if i made a game object for the sake of turning multiple things off or on

#

and its not mesh

green plinth
#

well if you have a root with branches and the root is turned of the brances turn off to

halcyon rock
#

yea

green plinth
#

same as in the old system

halcyon rock
#

whats the udon code thing for it?

green plinth
#

game object set active

halcyon rock
#

whats the difference between Game object and Game object[]?

flint urchin
#

[] is array (multiple)

green plinth
#

[] is a "array" meaning it holds multiple objects.

#

to use it you must call the object according to it's index value (starting at 0 for the first one)

halcyon rock
#

so i use array if i do the list of objects in a hierarchy?

green plinth
#

yup, and you read it like a book with numbered pages

halcyon rock
#

thats cool

green plinth
#

and practical to, currently working on a random teleporter on that principle

floral dove
#

Btw @green plinth I know this was a little while back but there's an Udon Program called 'empty' in the Examples folder for using as a nice blank graph. The examples Readme explains this 😜

green plinth
#

no problem i already made my own @floral dove thanks tho, i should look a bit more into it.

#

One thing i need to ask tho @floral dove regarding teleport player on interact, i noticed that the interact event does not have data attached to it (like who interacted with it), is "networking get local player" supposed to be a substitute for that?

storm copper
#

is there a way i can call a method from other script?

#

interact(){
buy();
}

green plinth
#

I believe Tupper made a video about that.

storm copper
#

do you have it?

green plinth
storm copper
#

o i think when i tried to watch that video it was offline

#

episode 3 right?

green plinth
#

try 4

storm copper
#

nope

#

thats not it

#

im talking about methods not variables

#

he is importing variables

green plinth
#

well it does a simular thing, also is there methods in Udon? I am a bit unsure now

storm copper
#

i want an event to triguer another custom event in other script

#

as udon language

green plinth
#
storm copper
#

nope

#

im trying to go around the no static variables thing

flint urchin
#

@storm copper I'd recommend you join the U# discord for help with C# scripts

storm copper
#

is there such thing?

flint urchin
#

Yup, link at the bottom of the github page

west plover
#

Will get better answers there

green plinth
#

github page?

flint urchin
oak jungle
#

Can anyone help me with Udon for muting and unmuting an audio effect?

green plinth
#

is not that like 0 volume? or is there a actual mute?

oak jungle
#

I have buttons I want to toggle the audio of a fireplace and water fountain

#

How do I target a specific audio source?

green plinth
#

does a audio source have a volume you can target? Because are not volume handeled by what plays it?

oak jungle
#

Eh, most likely but I am having trouble targeting the audio source

green plinth
#

in what way what for?

oak jungle
halcyon rock
#

need a graph to toggle multiple objects on and off

green plinth
#

maybe try get/set mute @oak jungle

oak jungle
#

The main trouble I am having is targeting the specific AudioSource, public variable isn't working

green plinth
#

I feel like trying this for the heck of it give me a while (got to find a audio clip to test with lol).

oak jungle
#

Okay, if you have an update for me, please tag me!

halcyon rock
#

i wanna make it so that an object stays toggleable when i push a button but set an object to inactive at the same time

green plinth
#

PhaxeNor made a good toggle button example

halcyon rock
#

for multiple object function?

green plinth
#

if you wan toggle off multiple at same time yes

halcyon rock
#

multiple off and multiple on

#

wait

#

udon is different

#

if set of objects is on already when i push a different button, i want that same set off and toggle the next set

#

basically

green plinth
#

basically if it's off then on and on then off, not all off and not all on

halcyon rock
#

wha

green plinth
#

if mirror A is on and B is off you click one button and they effectively swap their state on/of

halcyon rock
#

if set 1 is on from a button that toggles set 1 on/off and when i push button 2 it toggles set 1 off and toggles 2nd set on/off

green plinth
#

@oak jungle good news i made a working mute

#

Ahhh

halcyon rock
#

dont wanna leave sets on like pictures and stuff hehe

green plinth
#

Simply use public variables just like in the toggle example but modify it so a specific portion is always turned off by the same action

halcyon rock
#

hmm

green plinth
halcyon rock
#

wonder why a game object have a value checkmark but the sets of game objects doesnt have checkmarks

green plinth
#

nani?

halcyon rock
#

indexes?

green plinth
#

you know how a "for" works?

halcyon rock
#

just started to mess with udon today xd

green plinth
#

you know object oriented coding?

halcyon rock
#

uhh

green plinth
#

the variables with [] are arrays, they contain multiple objects like a book with pages, a "for" function is often used to browse thru each page, they start at 0 step 1 at a time and the index is a refference to what "page" you on.

halcyon rock
#

so the position of an object in the book is important

green plinth
#

if you got a array with 10 objects, you can tell the code that anything with index 5 or less is to be always turned off.

halcyon rock
#

how about all of a list?

green plinth
#

yes they got their corresponding index

#

hum

#

not sure what you reffering to, sometimes a array is mentioned as a list.

halcyon rock
#

i mean turning the whole book on and off and idk how to set that to true or false

#

isnt it exit for for?

green plinth
#

exit is what it does after it's done with it all

#

not mandatory but sometimes practical