I did stumble on this code to initialize the rope during runtime. After my rope is created, I would call InitTheRope();
private IEnumerator InitRope()
{
yield return rope.GeneratePhysicRepresentationForMesh();
}
public void InitTheRope()
{
StartCoroutine(InitRope());
}
To get this to work, I had to update some code, ObiBoneEditor.cs
change line 150 & 159 from
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
to
if (!Application.isPlaying) EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
To get the rope to update will the application is running, I used this code.
public void RefreshTheRope()
{
ObiRope rope = gameObject.GetComponent<ObiRope>();
rope.OnEnable();
}
private IEnumerator InitRope()
{
yield return rope.GeneratePhysicRepresentationForMesh();
}
public void InitTheRope()
{
StartCoroutine(InitRope());
}
To get this to work, I had to update some code, ObiBoneEditor.cs
change line 150 & 159 from
EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
to
if (!Application.isPlaying) EditorSceneManager.MarkSceneDirty(EditorSceneManager.GetActiveScene());
To get the rope to update will the application is running, I used this code.
public void RefreshTheRope()
{
ObiRope rope = gameObject.GetComponent<ObiRope>();
rope.OnEnable();
}