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
  Curvy 8.2.0 is live _Aka_ 0 5 04-26-2022, 02:09 PM
Last Post: _Aka_
Bug Severe bug with some types of Prefabs/meshes studentloan 15 29 04-25-2022, 01:17 PM
Last Post: _Aka_
Exclamation Runtime error when using Curvy Generator with Game Object Deform studentloan 3 10 04-22-2022, 09:00 PM
Last Post: _Aka_
Bug No demos running without exception with IL2CPP with Curvy Spline 8 studentloan 10 14 04-22-2022, 08:52 PM
Last Post: _Aka_

Forum Jump: