private void BakeMesh() { ObiRopeExtrudedRenderer extruded = rope.GetComponent <ObiRopeExtrudedRenderer>(); ObiRopeMeshRenderer deformed = rope.GetComponent <ObiRopeMeshRenderer>(); if (extruded != null && extruded.extrudedMesh != null) { ObiEditorUtils.SaveMesh(extruded.extrudedMesh, "Save extruded mesh", "rope mesh"); } if (deformed != null && deformed.deformedMesh != null) { ObiEditorUtils.SaveMesh(deformed.deformedMesh, "Save deformed mesh", "rope mesh"); } }
public void OnEnable() { renderer = (ObiRopeMeshRenderer)target; }