Posts: 13
Threads: 7
Joined: Feb 2022
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
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.
Posts: 2,110
Threads: 92
Joined: Jun 2017
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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 13
Threads: 7
Joined: Feb 2022
03-12-2022, 01:41 PM
(This post was last modified: 03-12-2022, 01:42 PM by niuage.)
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
Posts: 2,110
Threads: 92
Joined: Jun 2017
You are welcome. Thanks for sharing your solution.
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 13
Threads: 7
Joined: Feb 2022
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.
Posts: 2,110
Threads: 92
Joined: Jun 2017
Hi
Does the Combine option in the Create Mesh module fix this issue?
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Posts: 13
Threads: 7
Joined: Feb 2022
(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
It does indeed, thanks!
Posts: 2,110
Threads: 92
Joined: Jun 2017
You are welcome
Please consider leaving a
review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.