08-12-2020, 01:13 PM
(This post was last modified: 08-12-2020, 01:14 PM by josemendez.)
Thinking a bit more about your use case, came up with a relatively simple fix that will allow you to deactivate the ObiCloth component while leaving the mesh visible.
Open up ObiClothRendererMeshFilter.cs, and remove or comment out line 48:
This will prevent the mesh from being removed from the mesh filter when disabling cloth, effectively allowing you to keep the mesh visible while disabling simulation. I'm thinking of including this small change in next updates.
Open up ObiClothRendererMeshFilter.cs, and remove or comment out line 48:
Code:
protected override void OnBlueprintUnloaded(ObiActor actor, ObiActorBlueprint blueprint)
{
clothMesh = null;
//filter.sharedMesh = null; //<--- remove or comment this
}
This will prevent the mesh from being removed from the mesh filter when disabling cloth, effectively allowing you to keep the mesh visible while disabling simulation. I'm thinking of including this small change in next updates.