Udon is being frustratingly inconsistent

Maybe I just have a bad SDK? I don’t know if that is possible. But it feels like the rules of what works and does not work keep changing each time I run a test. I don’t mind figuring out the quirky rules of a system vie trial and error, but it is like the puzzle pieces keep changing shape every time I look away for a second. I build up a node structure one piece at a time until the most recent addition does not work. Then I strip away the most recent non-functional edition to find that the portions I built before that stopped working for some reason. Example:

Simple setup like this works fine:

This is illegal of course and does not work:

But setup using a block like this works:

Then I try to complicate things like the following picture and not only does this not work, but deleting it and resetting it up like in the previous picture ALSO does not work anymore:

After that I tried rebuilding the node structure using a constructor for the Vector3. That resulted in me not even being able to use the object in game. Unless I copy pasted the exact node setup to a new object.


Are these issues everyone else is dealing with or is my SDK just cursed?

Other issues I have encountered:

Changing IsKinematic tends to break things.
Vector3 and String variables that I have removed from the node system somehow persist and effect the program.
I am not allowed to string the flow from one node to another, can only used block nodes else things break.
Copying a node structure from one object to another shuffles the variables in GetVariable nodes.

Ok so for anyone who has stumbled upon this thread and has similar issues, I found a workaround that is making things function for me so far. After any changes I have to copy all the nodes, delete, then re-past them. Keep in mind that all the GetVariable nodes default to the first option so you have to go and change the GetVariable nodes each time. I will let you know If this stops working and if I can find another workaround at that point.

1 Like

In my experience a lot of the inconsistent behaviour is just the graph not refreshing correctly/graph changes not being saved. If you ever get behaviour that seems weird, or just straight up broken always try a refresh before anything else.

Regarding isKinematic, toggling this seems to be broken right now

I’m seeing this problem too. So far the only way I’ve seen to reliably get the program to compile more-or-less correctly is to restart unity.
The issue seems to be that once the code compiles it gets cached or something and reuses parts of the program even if it’s been changed.
I tried the copy node thing and I had to change the variables before the auto compile happened, otherwise it would get stuck on that first variable in the get node.

Yeah I am getting these issues too!

Another solution I have seen via @Vowgan was to duplicate the graph asset in the project panel, drag that identical duplicate onto your Behaviour component(s), delete the old graph and rename your duplicate back to the original.

Still though even that seems to sometimes fail.

Hopefully this particular bug is fixed soon :smile:

1 Like

Same here, I’m not even able to get a “toggle mirror” button to work. I tested it out in the example “Prefabs” scene, exact same script, and it works… Move that script over to my scene and it doesn’t work. I’ve tried to restart Unity, duplicate/paste the nodes, duplicate/delete the file in Project, etc. I can’t get this working at all and I’m really frustrated.

Kind of at a loss here, I was really excited to start working with Udon a lot more too.

EDIT: while you still occasionally have to do these duplicate/delete/etc workarounds, my scripts failing was completely user error–a few files were lingering from an older SDK that I was not aware of (I thought I followed the guide :frowning: ) beware your own shortcomings