abdur.rahman.709771
2 years agoHonored Guest
Add Object Interactions During Runtime
Hello,
I'm trying to instantiate an object during runtime and need to add interactions to it. Specifically I want to add a mesh collider, rigiidbody, HandGrabInteractable, Grabbable, OneGrabFreeTransformer and TwoGrabFreeTransformer to the object. I can not create a prefab for the object as I'm importing it from a server and adding it to the scene during runtime. The issue I'm currently facing is that though I can add the components during runtime, how do I set the proper references in Grabbable for the transformers and in the HandGrabInteractable to the grabbable. I tried creating a prefab with all of the 5 components attached to it and add it as a child for the 3d object but for some reason this doesn't work.