11-03-2019, 07:45 PM
(This post was last modified: 11-03-2019, 07:46 PM by josemendez.)
(11-03-2019, 10:20 AM)Richard Wrote: "cloth component" means obi cloth or obi tearable cloth?
Hi,
It means ObiTearableCloth, as regular ObiCloth cannot be torn.
About the null ref issue:
- It is happening in two lines where the only thing that can be null is the "cloth" variable, of type ObiTearableCloth.
- If the RequireComponent attribute is being used (which it is in the original code), then cloth cannot be null, since Unity guarantees a ObiTearableCloth component is present.
So either you're removing the component programmatically in some other script (only way to trigger a null ref exception in this situation), or things aren't set up as you described.