Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I extract prefabs from Curvy's generated meshes?
#1
[Image: ydCzpYM.png]

When I try to drag and drop a chunk of track to the Project window, to create a prefab out of it, the "Mesh" disappears Sad
Is there a way to create prefabs without having the generator as a prefab? I'm thinking about using Curvy to create a bunch of different pieces, like in trackmania.

Thanks.
Reply
#2
Hi

In your Create Mesh module, under the Export tab, you can either:
  • export your mesh to a mesh asset
  • export your mesh to a game object in the scene
If the first solution is fine for you, then problem solved.

If you want to use the second solution, making a prefab out of the exported scene game object will create a prefab without a mesh. This behavior seems to not be present in older Unity versions. I still have to investigate thoroughly this issue, then open a Unity bug ticket if this ends up being really a Unity bug.
Regardless of the origin of the issue, this issue can be worked around by exporting the mesh asset, then assign that mesh asset to the prefab. This can be time consuming if you want to create a lot of prefabs. If this is the case, please let me know and I will come up with a workaround that would scale better.

Did this help?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Thanks!

Ok, this seems like it would work for me. I can just export the whole thing with "Save to scene", then I can use the following editor script and just right click on the Mesh Filter component to save the meshes I want as assets, and just used that for the prefab.

https://github.com/pharan/Unity-MeshSave...rEditor.cs

Thanks for being so responsive, it's very much appreciated Smile
Reply
#4
You are welcome. Thanks for sharing your solution.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#5
No problemo.

I'd be nice if the volume caps could be exported into the same mesh when both the volume mesh and the volume caps are going into the same Create mesh node, but that seems like an edge case you probably dont need to support.
Reply
#6
Hi
Does the Combine option in the Create Mesh module fix this issue?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#7
(03-14-2022, 10:05 AM)_Aka_ Wrote: Hi
Does the Combine option in the Create Mesh module fix this issue?

I should really pay closer attention to those options Big Grin It does indeed, thanks!
Reply
#8
You are welcome
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 0 0 4 hours ago
Last Post: ShiroeYamamoto
Exclamation Extending Curvy Generator for Advanced Lofting - Feasibility Check amutp 2 4 Yesterday, 07:25 AM
Last Post: amutp
  8.8.0 is live, and it improves Curvy Generator greatly _Aka_ 0 6 Yesterday, 03:23 AM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 3 03-26-2024, 01:12 PM
Last Post: _Aka_

Forum Jump: