12-09-2024, 07:45 AM
(This post was last modified: 12-09-2024, 07:48 AM by josemendez.)
Hi!
Your code doesn't do anything, since it's incomplete: you're not providing a particle group for the attachment to attach. As a result, the attachment doesn't know which part(s) of the cloth it should act upon.
See the manual's page on scripting attachments:
http://obi.virtualmethodstudio.com/manua...ments.html
As a side note, calling GetComponent() every time you want to access a component in Unity is quite expensive. Since you're adding the component yourself, a much better option is to just store it in a variable when you add it.
kind regards
Your code doesn't do anything, since it's incomplete: you're not providing a particle group for the attachment to attach. As a result, the attachment doesn't know which part(s) of the cloth it should act upon.
See the manual's page on scripting attachments:
http://obi.virtualmethodstudio.com/manua...ments.html
As a side note, calling GetComponent() every time you want to access a component in Unity is quite expensive. Since you're adding the component yourself, a much better option is to just store it in a variable when you add it.
kind regards