Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to attach custom components to output
#1
Question 
Whats the recommended workflow if I need to attach custom components on the resulting mesh when doing extrusion or other mesh output generators.

Generators always removes the components if you add them manually. And going through the route of exporting and adding, doesnt really help as you probably will be changing and tweaking the splines while working with prefabs/scenes. So you end up reconstructing the output anyways.
Reply
#2
Hi
I recommend listening to the CurvyGenerator's OnRefresh event, and in it attach the custom components to the generated objects.
I hope this helped.
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
I suspected that was the only approach. Problem is its really hard to do a listener that is generic enough to add components with the values I actually need on the component. But I'll look into it.
Reply
#4
You can also modify CGMeshResourceLoader.Destroy so that the call to obj.StripComponents will include as a parameter the type of components you want to avoid being removed. But I believe this first solution is the easier one.
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
  Guide to custom placing stuff on spline Lupos 15 43 11-27-2023, 12:51 PM
Last Post: _Aka_
  Custom CurvySplineSegment prefabs Lupos 1 10 10-02-2023, 09:36 AM
Last Post: _Aka_
  Custom Control Nodes Lupos 3 15 05-27-2023, 09:05 PM
Last Post: _Aka_
  Custom Spots Filter Generator Module mercior 3 9 03-10-2023, 10:20 AM
Last Post: _Aka_

Forum Jump: