Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using Create mesh in Prefab
#1
Hello,

I apologize if this question as already been answered, I did a quick search and couldn't find and answer.

I am using Curvy to generate meshes using spline (it works great!). I want to use several generators inside of a prefab, but I can't save their content.

My setup is:
PipesGenerator (this is a prefab).
I want to use PipesGenerator instances in another prefab (in the prefab stage), let's call this prefab MyRoomPrefab. 

Like so:
MyRoomPrefab
- PipesGenerator_01
- PipesGenerator_02

I can use the generator and create mesh no problem, however when I save, I get this error:
"[Curvy] Invalid operation:You initiated an operation that leads to the deletion of the Game Object 'Create Mesh_5_Mesh000', which is part of a Prefab instance.Children of a Prefab instance cannot be deleted or moved, and components cannot be reordered. You have to open the Prefab in Prefab Mode to restructure the Prefab Asset itself, or unpack the Prefab instance to remove its Prefab connection."

I am wondering if there is a way to go around this problem. I would like to avoid exporting asset manually and them using them in another gameObject. I want the source spline and the output mesh to be available in MyRoomPrefab (to enable tweaking at a later time).

Any help appreciated.

Thanks,
Reply
#2
Hi
What version of Curvy are your using? Also, what version of Curvy did you use to save the said prefabs?
Thanks
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
Also, is it possible for you to send me the files needed to reproduce the 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
#4
Hello,
Thanks for the quick reply!

I use Curvy 8, which I downloaded yesterday, so I guess the latest version, 8.0.2?

I can create a custom package with test data if you want, as I can't share my prefab at the moment (and it would be really large).

It's a great asset by the way, really well done!
Reply
#5
Thank you for the compliment, glad you are liking it.
Yes please, send me a test package, I will look it as soon as possible.
Thanks again, and have a nice day
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#6
How should I send you the folder?
Reply
#7
You can PM me a link to download it for example.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#8
Done!
Thanks!
Reply
#9
Hi
I went though the package you send me and your message.

The error message you are getting is because the generator tries to delete the previously generated object to generate the new one, and this operation (deleting an object part of a prefab) is not allowed with the (not so) new prefab system without modifying the prefab asset itself.

Before Curvy 8, Curvy only printed a console error asking users to remove manually said objects from the prefab. Starting from Curvy 8, Curvy tries to do the operation on behalf of the user when it makes sense (i.e: no risk of deleting anything valuable), and displays a message prompt otherwise. The code that defines if the operation should be automatically done seems to not take into considerations cases similar to yours (prefabs inside of prefabs).

Until I dig deeper into this, and fix the problem on Curvy's side to make the automatic solution work in your case, the manual solution is still relevant, which is to delete the generated game objects (which names are in the displayed messages) from the prefab asset. You don't have to delete them one by one, you can simply, remove all the generated GOs by using the "Clear Outputs" button in the Curvy Generator's toolbar. I did this with your package, and the problem was solved.

Let me know if you I missed something in my answer.
I hope this helped.
Have a nice day

PS: about combining the generated objects in one, it is possible if you set Combine to true and Group Meshes to false, but in your case it will not avoid the issue, since still the combined object will be deleted and replaced instead of modified.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#10
Ok, I will give that a go.
Thanks for your help and quick answer!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Incorrect mesh alignment after extrusion on curved path Thinkurvy 10 19 04-17-2024, 10:57 AM
Last Post: _Aka_
Heart Create beautiful curves ShiroeYamamoto 3 11 03-26-2024, 06:25 PM
Last Post: _Aka_
  Adjust radius of generated mesh via script? Shackman 1 4 03-26-2024, 01:12 PM
Last Post: _Aka_
  Not seeing mesh extended after following YT PaulM 1 3 02-02-2024, 12:01 PM
Last Post: _Aka_

Forum Jump: