Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add Component to created mesh?
#1
Question 
Hi,

So, the problem I have is hopefully straightforward. I'd like to add a component to the generated mesh object of a curvy spline. The trouble is, if the spline then updates again, the generated mesh is recreated and I'd then need to add the component again.

Is there a way to set up the generator so that a component gets added to the mesh gameobject? 

Thanks in advance!

Cheers
Reply
#2
(05-25-2022, 05:11 PM)HarvesteR Wrote: Hi,

So, the problem I have is hopefully straightforward. I'd like to add a component to the generated mesh object of a curvy spline. The trouble is, if the spline then updates again, the generated mesh is recreated and I'd then need to add the component again.

Is there a way to set up the generator so that a component gets added to the mesh gameobject? 

Thanks in advance!

Cheers
Hi
Use CurvyGenerator.OnRefresh to execute custom code when a generator is update. In that custom code, attach the components you want to the generated mesh gameobjects.
Did this answer your question?
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


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Squash To Fit Option for Deform Mesh? richard_firehose 1 8 11-05-2022, 02:25 PM
Last Post: _Aka_
  Scale Deform Mesh Along Spline? / aligning colliders MamasToast 9 61 10-31-2022, 03:44 AM
Last Post: tairoark
  Gap between spline mesh segments Beaver_Boy 13 66 10-24-2022, 09:37 AM
Last Post: dromo
Question Including scripts on created meshes lewsk55 1 11 10-04-2022, 10:46 PM
Last Post: _Aka_

Forum Jump: