02-20-2020, 01:25 AM
Hi,
about that line of code, it depends on what other code executes before that. You are using _buildVolumeMesh.InVolume.GetData<CGVolume>().Length, so make sure the generator is initialized and up to date before using that data (see Initialize and Refresh methods in the CurvyGenerator class)
Make sure Length returns the right value by using Debug.Log. Compute the value manually and set it in the generator manually to see if the desired result is there. If so, see if the automatically computed value is the same than the manually computed one. By following those steps you should be able to find what went wrong
Yes, [ExecuteInEditMode] is to make that code execute in edit mode
about that line of code, it depends on what other code executes before that. You are using _buildVolumeMesh.InVolume.GetData<CGVolume>().Length, so make sure the generator is initialized and up to date before using that data (see Initialize and Refresh methods in the CurvyGenerator class)
Make sure Length returns the right value by using Debug.Log. Compute the value manually and set it in the generator manually to see if the desired result is there. If so, see if the automatically computed value is the same than the manually computed one. By following those steps you should be able to find what went wrong
Yes, [ExecuteInEditMode] is to make that code execute in edit mode
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.