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
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
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
  Create Game Object Renaming Options rickgplus 1 708 09-23-2025, 09:33 AM
Last Post: _Aka_
  Morph game object along curve. mikechr2000 5 2,591 02-04-2025, 09:30 PM
Last Post: _Aka_
  Updated package in 2022 LTS resulted in multiple errors scr33ner 2 1,449 01-13-2025, 09:32 AM
Last Post: _Aka_
  Bug: Save Generator Outputs still saves outputs if object is disabled curvymesher 1 1,461 08-30-2024, 09:19 AM
Last Post: _Aka_

Forum Jump: