26-02-2020, 04:05 PM
Did you get the message "libOni.dll caused an Access Violation" in your error log? If so, I think I had a similar issue, although mine was caused by switching gameobject from active to not active, then back to active.
I think it was caused by the SortedPoints array of the SkinnedCloth component not being properly initialized before the updater/solver tried to use it to run BeginStep or SubStep. The order of operations can be a little hard to track, since LateFixedUpater uses coroutines. I don't know if this will help for your problem, but my fix was to enable/disable the gameobject with the cloth attached in a coroutine, after waiting for the end of a frame, this seemed to make sure that the skinned cloth component had time to fully run through one update/late update cycle to make sure everything was fully initialized.
I think it was caused by the SortedPoints array of the SkinnedCloth component not being properly initialized before the updater/solver tried to use it to run BeginStep or SubStep. The order of operations can be a little hard to track, since LateFixedUpater uses coroutines. I don't know if this will help for your problem, but my fix was to enable/disable the gameobject with the cloth attached in a coroutine, after waiting for the end of a frame, this seemed to make sure that the skinned cloth component had time to fully run through one update/late update cycle to make sure everything was fully initialized.