11-29-2022, 06:59 PM
Hi
ConnectedControlPointsSelector is an abstract class, which means you can't instanciate it directly. You need to inherit from it. To inherit from an abstract class, you need to implement its abstract method, namely SelectConnectedControlPoint in this case. That method's parameter and goals are explained in the documentation.
In that method, you are free to do whatever you want, as long as it is doable with the method's inputs. So yes, you can reproduce exactly the preset connection handling logics (Current Spline, Random Spline, ...) from spline controller if you want to. It will not be by simply doing a copy/past, you will need to format the code to use the SelectConnectedControlPoint inputs.
The preset connection handling logics have their parameters, such as "Reject current spline". From the moment you don't use a preset connection handling logic, those parameters are not used anymore. That's why they disappear from the UI. So in your example of reproducing a preset handling logic via a ConnectedControlPointsSelector instance, you will need to have your own parameters.
An example of a custom logic would be to check the junction script associated with the current connection, and based on its boolean either choose the spline that is diverging or not.
I hope this helped
Have a nice day
ConnectedControlPointsSelector is an abstract class, which means you can't instanciate it directly. You need to inherit from it. To inherit from an abstract class, you need to implement its abstract method, namely SelectConnectedControlPoint in this case. That method's parameter and goals are explained in the documentation.
In that method, you are free to do whatever you want, as long as it is doable with the method's inputs. So yes, you can reproduce exactly the preset connection handling logics (Current Spline, Random Spline, ...) from spline controller if you want to. It will not be by simply doing a copy/past, you will need to format the code to use the SelectConnectedControlPoint inputs.
The preset connection handling logics have their parameters, such as "Reject current spline". From the moment you don't use a preset connection handling logic, those parameters are not used anymore. That's why they disappear from the UI. So in your example of reproducing a preset handling logic via a ConnectedControlPointsSelector instance, you will need to have your own parameters.
An example of a custom logic would be to check the junction script associated with the current connection, and based on its boolean either choose the spline that is diverging or not.
I hope this helped
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.