09-06-2019, 09:39 PM
(08-22-2019, 02:19 PM)spedepasanen Wrote: Hello,
I came across issue with prefabs and curvy just now, and I dont quite get what this means:(06-28-2019, 07:13 PM)_Aka_ Wrote: So the solution is to not include the generated objects in your prefab, which is the right thing to do anyway, to avoid having huge prefabs.
I tried removing the created mesh from the prefab(I just deleted the created mesh and then saved the prefab), but that results a multiple meshes when I run the game on Editor. What would be the correct way to do this so I dont end up with multiple duplicate generated meshes?
Hi
I find a solution: Add this line
r.gameObject.hideFlags = HideFlags.DontSave;
just before this one
r.Renderer.shadowCastingMode = CastShadows;
in the method getNewMesh from the CreateMesh class.
This solution is not perfect, because when applied and you try to compute global illumination, Unity will display the following message:
Some MeshRenderers cannot contribute to global illumination, because their HideFlags are set to DontSaveInEditor, HideAndDontSave or DontSaveInBuild.
So I will keep looking for a better solution, but you can use this one for now
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.