26-01-2022, 12:38 AM
Im trying to generate an array of blue prints with obi cloth and im running into a problem where the obi cloth coroutine to generate a garment is returning a null value error.
// generate blueprint:
ObiClothBlueprint[] blueprints = new ObiClothBlueprint[meshData.Length];
for(int i = 0; i < blueprints.Length; i++)
{
blueprints[i] = ScriptableObject.CreateInstance<ObiClothBlueprint>();
blueprints[i].inputMesh = meshData[i].GenerateMesh();
//Debug.Log(blueprints[i].inputMesh.vertexCount);
yield return StartCoroutine(blueprints[i].Generate());
}
I know the input mesh being provided is not null, so im confused as to what is happening.
any help would be much appreciated.
// generate blueprint:
ObiClothBlueprint[] blueprints = new ObiClothBlueprint[meshData.Length];
for(int i = 0; i < blueprints.Length; i++)
{
blueprints[i] = ScriptableObject.CreateInstance<ObiClothBlueprint>();
blueprints[i].inputMesh = meshData[i].GenerateMesh();
//Debug.Log(blueprints[i].inputMesh.vertexCount);
yield return StartCoroutine(blueprints[i].Generate());
}
I know the input mesh being provided is not null, so im confused as to what is happening.
any help would be much appreciated.