I'd like to disable ObiSoftbodySkinner at runtime and make the mesh deformation controlled by SkinnedMeshRenderer again, and reenable it at some condition.
The first time disabling it works. However, if I enable ObiSoftbodySkinner again after disabling it, I get this error:
I get this with Obi 7. I didn't test if it happens with 6.4.
Changing influence seems to be impossible either at runtime?
My guess (not a very educated one) is that it has something to do with Obi 7's new asynchronized mode. In synchronized mode this error doesn't happen. In asynchronized mode it happens sometimes.
The first time disabling it works. However, if I enable ObiSoftbodySkinner again after disabling it, I get this error:
Code:
InvalidOperationException: The previously scheduled job BurstShapeMatchingConstraintsBatch:ShapeMatchingConstraintsBatchJob writes to the UNKNOWN_OBJECT_TYPE ShapeMatchingConstraintsBatchJob.restComs. You are trying to schedule a new job BurstShapeMatchingConstraintsBatch:ShapeMatchingCalculateRestJob, which writes to the same UNKNOWN_OBJECT_TYPE (via ShapeMatchingCalculateRestJob.restComs). To guarantee safety, you must include BurstShapeMatchingConstraintsBatch:ShapeMatchingConstraintsBatchJob as a dependency of the newly scheduled job.
Unity.Jobs.LowLevel.Unsafe.JobsUtility.ScheduleParallelFor (Unity.Jobs.LowLevel.Unsafe.JobsUtility+JobScheduleParameters& parameters, System.Int32 arrayLength, System.Int32 innerloopBatchCount) (at <cb81df0c49c643b1a04d9fc6ccca2433>:0)
Unity.Jobs.IJobParallelForExtensions.Schedule[T] (T jobData, System.Int32 arrayLength, System.Int32 innerloopBatchCount, Unity.Jobs.JobHandle dependsOn) (at <cb81df0c49c643b1a04d9fc6ccca2433>:0)
Obi.BurstShapeMatchingConstraintsBatch.CalculateRestShapeMatching () (at Assets/ThirdParty/Obi/Scripts/Common/Backends/Burst/Constraints/ShapeMatching/BurstShapeMatchingConstraintsBatch.cs:147)
Obi.ObiShapeMatchingConstraintsBatch.RecalculateRestShapeMatching () (at Assets/ThirdParty/Obi/Scripts/Common/Blueprints/Constraints/Batches/ObiShapeMatchingConstraintsBatch.cs:232)
Obi.ObiSoftbody.RecalculateRestShapeMatching () (at Assets/ThirdParty/Obi/Scripts/Softbody/Actors/ObiSoftbody.cs:194)
Obi.ObiSoftbody.UpdateParticleProperties () (at Assets/ThirdParty/Obi/Scripts/Softbody/Actors/ObiSoftbody.cs:243)
Obi.ObiSoftbodySkinner.BindBoneParticles () (at Assets/ThirdParty/Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:261)
Obi.ObiSoftbodySkinner.Softbody_OnBlueprintLoaded (Obi.ObiActor a, Obi.ObiActorBlueprint blueprint) (at Assets/ThirdParty/Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:199)
Obi.ObiSoftbodySkinner.OnEnable () (at Assets/ThirdParty/Obi/Scripts/Softbody/Rendering/ObiSoftbodySkinner.cs:130)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I get this with Obi 7. I didn't test if it happens with 6.4.
Changing influence seems to be impossible either at runtime?
My guess (not a very educated one) is that it has something to do with Obi 7's new asynchronized mode. In synchronized mode this error doesn't happen. In asynchronized mode it happens sometimes.