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
  Adding Begining and End Mesh to Spline velikizlivuk 2 4 08-02-2023, 11:10 AM
Last Post: velikizlivuk
  Fading in/out extrusion mesh of a spline? _RicO 3 5 07-25-2023, 09:40 PM
Last Post: _Aka_
  How to generate mesh on spline at runtime? _RicO 8 12 07-19-2023, 08:55 AM
Last Post: _Aka_
  CurvyGenerator not refreshing until next frame when created. Lupos 2 4 06-08-2023, 12:12 PM
Last Post: _Aka_

Forum Jump: