Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable/Enable ObiSoftbodySkinner at runtime?
#4
(06-04-2024, 12:10 PM)kodra Wrote: 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:


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.

I've been unable to reproduce this so far. Will try some more cases and get back to you.
Reply


Messages In This Thread
RE: Disable/Enable ObiSoftbodySkinner at runtime? - by josemendez - 08-04-2024, 01:33 PM