Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  get sign when cloth is tore
#16
(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.
Reply


Messages In This Thread
get sign when cloth is tore - by Richard - 07-03-2019, 10:20 AM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 11:05 AM
RE: get sign when cloth is tore - by Richard - 07-03-2019, 12:27 PM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 12:39 PM
RE: get sign when cloth is tore - by Richard - 07-03-2019, 01:10 PM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 01:48 PM
RE: get sign when cloth is tore - by Richard - 07-03-2019, 02:11 PM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 02:13 PM
RE: get sign when cloth is tore - by Richard - 07-03-2019, 02:34 PM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 02:49 PM
RE: get sign when cloth is tore - by Richard - 07-03-2019, 03:08 PM
RE: get sign when cloth is tore - by josemendez - 07-03-2019, 04:04 PM
RE: get sign when cloth is tore - by Richard - 11-03-2019, 03:16 AM
RE: get sign when cloth is tore - by josemendez - 11-03-2019, 08:41 AM
RE: get sign when cloth is tore - by Richard - 11-03-2019, 10:20 AM
RE: get sign when cloth is tore - by josemendez - 11-03-2019, 07:45 PM
RE: get sign when cloth is tore - by Richard - 12-03-2019, 11:21 AM
RE: get sign when cloth is tore - by josemendez - 12-03-2019, 11:25 AM