i am working on a dnd with udpn and i want to spawn a perfab when you click on a object so i watched and copyed Vowgan on youtube and the objects spawn without a pick and rigedbody when its on the perfab and it spawns with out anybody clicking it and i can click the object to spawn more anybody knows how to fix this and heres so pics of the code and perfab
So I think your issue is that you have the instantiation happening in the Start() event which gets ran the first time the GameObject with that UdonBehaviour on it is loaded into the world.
Just put the stuff in your Start() event in its own Public event named something else & it looks like it should work fine after that. Don’t forget to change the string in your graph to the new event name too!
You could also try to do it with just a graph. It would just look something like this:
As for it not putting the rigidbody & stuff on it. I don’t have an answer, BUT I do know that I’ve personally been having issues changing rigidbody values at runtime for any GameObjects, even changing the VRCPlayerAPI gravity seems scuffy.
thank you for the help it works alittle better now