Idk if its still relevant, but I think what you want is
It allows you to change the variable of another Udon Graph.
So if I understood it right - the thing you are trying to achieve is something like this:
- You have an integer variable
- You update that integer variable from a different object, for example, if the player clicks on it
- When that variable reaches a certain value - you disable the object
How I would approach this:
- Add a new custom event, e.g. “CheckValue” to your main UdonGraph that has the integer (make sure it is marked as public).
- That custom event would be wired to the logic that checks if the integer reached the value
- In a different UdonGraph (the one you want to change that integer from), add a new variable of type UdonBehaviour, make it public, save the graph and drag and drop the first graph into it in the inspector
- Add a
SetProgramVariable node and plug in that UdonBehaviour variable into the
- Select your integer variable from the dropdown
- Pass the new value into the
SendCustomEvent node and plug the same UdonBehaviour variable into the
instance and select
CheckValue in the dropdown
Here’s the example graphs:
Whenever you interact with the “Other Graph” object - it will set the
counter integer variable to 15 and run the
CheckValue event, which will cause the “Main Graph” object to disable itself, as the
counter value is now > 10
Hope that wasn’t too confusing!