Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hooks on node creation
#1
Hi,

Loving Curvy, it's actually become a vital component of the game engine. I have a couple of my own scripts attached to each segment and would like to know if there are any hooks attached to insert before/after so that I can automatically add my own components to these segments at creation time within specific splines.

Basically when a node/segment is added I want to be able to hook code in to customize the creation process and add additional components to that GameObject in order to remove that manual process after spline editing.

Thanks,
Clive

Example where I have my own components attached to each segment:

[Image: bb-h11-ed.jpg]
Reply
#2
Curvy 2 (which will be released very soon) will offer several events you can hook into, especially:

OnBeforeAddCP
OnAfterAddCP
OnBeforeDeleteCP

The Add... events can be canceled, so you even can prohibit adding or deleting CPs.

Cheers,

Jake
Reply
#3
(08-15-2015, 07:48 PM)Jake Wrote: Curvy 2 (which will be released very soon) will offer several events you can hook into ....

Thanks Jake,

How much impact will Curvy 2 have on our current game? Will currently created Curvy(1) splines still remain? Is there compatibility between the two in the form of an upgrade path?

There's a significant amount of work within this project making use of Curvy(1) splines as it stands and I'm loathe to break all game levels if hooks are the only benefit.

Thank you
Reply
#4
Splines are compatible, but connections aren't. Old connections will be read but not used by the system anymore. I might write a connection converter, but I doubt people are using that much connections in a scene. Old Meshbuilder/CloneBuilder is marked obsolete, but still present, so you can replace them as you see fit.
Reply
#5
I'm not using connections or mesh(clone) building so perhaps this is worth a try. I'm assuming the API has also changed though, but I think worth the experiment at least and I can make a call on whether to actually upgrade or not once I see how much breaks Wink
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing material of Volume spot at creation? _RicO 5 13 08-11-2023, 09:39 AM
Last Post: _Aka_
  Allow to control Global Illumination settings in CreateMesh node of PathGenerator RobinB 2 233 11-02-2021, 08:50 AM
Last Post: RobinB
  runtime road creation migeg 1 2,385 05-21-2019, 01:04 AM
Last Post: _Aka_
  Generator node UI toolkit? mgstauff 3 4,538 04-09-2018, 06:36 PM
Last Post: _Aka_

Forum Jump: