10-04-2022, 10:46 PM
Hi
The solution I thought of right away is a variant of your solution: having a game object in the prefab that would do the operation on all the generated meshes. The difference between both our solutions is that mine would reference the Create Mesh module itself, and iterate through all its children, instead of referencing the children one by one.
If you want a behavior close to the old one, here is a solution. But I have to advise you: I do not recommend to rely on that old behavior, because it relies on the fact that edit mode was running before play mode, which will not be the case when you will build your project. There are also other scenarios were the old behaviour you described would not appear, even in Curvy 7. This being said, here is the solution: go to CGMeshResourceLoader.Destroy (in CGResource.cs). There, find this line:
obj.StripComponents(typeof(CGMeshResource), typeof(MeshFilter), typeof(MeshRenderer));
and replace it with
obj.StripComponents(typeof(CGMeshResource), typeof(MeshFilter), typeof(MeshRenderer), typeof(your_script));
I hope this helped
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
The solution I thought of right away is a variant of your solution: having a game object in the prefab that would do the operation on all the generated meshes. The difference between both our solutions is that mine would reference the Create Mesh module itself, and iterate through all its children, instead of referencing the children one by one.
If you want a behavior close to the old one, here is a solution. But I have to advise you: I do not recommend to rely on that old behavior, because it relies on the fact that edit mode was running before play mode, which will not be the case when you will build your project. There are also other scenarios were the old behaviour you described would not appear, even in Curvy 7. This being said, here is the solution: go to CGMeshResourceLoader.Destroy (in CGResource.cs). There, find this line:
obj.StripComponents(typeof(CGMeshResource), typeof(MeshFilter), typeof(MeshRenderer));
and replace it with
obj.StripComponents(typeof(CGMeshResource), typeof(MeshFilter), typeof(MeshRenderer), typeof(your_script));
I hope this helped
If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.