Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Generating multiple object on changing transform
#13
(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?

[Image: Sieppaa.PNG]

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.
Reply


Messages In This Thread
RE: Generating multiple object on changing transform - by _Aka_ - 09-06-2019, 09:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  Generating GO only on CPs in Generator GameDeveloperek4123 1 7 03-04-2024, 11:06 AM
Last Post: _Aka_
  Distance travelled across multiple splines jh092 1 7 02-23-2024, 09:44 AM
Last Post: _Aka_
  Removing the objects behind an object alms94 6 6 12-06-2023, 09:31 PM
Last Post: _Aka_

Forum Jump: