Attach Event Instance to object without rigid body

Hi there,

I would like to have some 3D event instances playing in some parts of the environment, and I need to use event instances instead of the event emitter component, since I have one script that needs to play different events (as far as I know the emitter component can only play one event, right?).

However the function AttachInstanceToGameObject takes a RigiBody or RigidBody2D, can I pass NULL if I am not using a rigid body? or there are any alternatives?

Many thanks

It would be great to have some light on this. On my side I’ve tried to pass a null RigidBody and it works just fine.

The AttachInstanceToGameObject function is overloaded with three possible parameters - Rigidbody, 2DRigidbody, and indeed no Rigidbody. You don’t need to pass any rigidbody and it should work fine.

Thanks for your answer. Perhaps I don’t have the latest version, in my case if I don’t pass anything I get an error. I’ll update to the latest version and try it again.
Thanks for the explanation :slight_smile: