Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add On Control Point Reached (CurvySplineMoveEventArgs) during runtime?
#1
Hi Jake,

I'm using the default Spline Controller script on a game object with a Spline assigned.

I'm looking to add an On Control Point Reached (CurvySplineMoveEventArgs) at runtime via code, so that the Spline Controller object triggers this event when it hits every control point.  

The event is a function within the CurvyEventHandler, which is also being added to the same Spline Controller game object at runtime.

I'm having a heck of a time figuring this out.  Any advice?

Thanks much,
Michael
Reply
#2
Out of my head: SplineController.OnControlPointsReached.AddListener() should bind a callback to that event.
Reply
#3
This led me to the right solution. Thanks so much for the help!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Wink Modifying Splines at Runtime artsung 1 7 01-30-2024, 09:40 AM
Last Post: _Aka_
  Is it possible to create a road texture at runtime? artsung 1 4 01-30-2024, 09:30 AM
Last Post: _Aka_
  Cant Generate Meshes At Runtime alms94 5 22 01-26-2024, 11:27 AM
Last Post: _Aka_

Forum Jump: