Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom connection controller help
#2
Hi,

There is a class called ConnectedControlPointsSelector. You inherit from this class, and override its unique abstract method. Here is an example:

Code:
   using System.Linq;
   using UnityEngine;

   class Example : ConnectedControlPointsSelector
   {
       public override CurvySplineSegment SelectConnectedControlPoint(SplineController caller, CurvyConnection connection, CurvySplineSegment currentControlPoint)
       {

               return connection.ControlPointsList.Last();         

       }
   }

This example selector always chooses the last control point in the list of connected control points.

Then, you create an object in your scene having the Example script attached to it.
Finally, in your controller's inspector, you set "At connection, use" to "Custom", and then select the object created earlier in the field "Custom Selector"

Please let me know if you still have any 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


Messages In This Thread
Custom connection controller help - by dazz777 - 11-19-2018, 02:02 PM
RE: Custom connection controller help - by _Aka_ - 11-19-2018, 02:12 PM
RE: Custom connection controller help - by _Aka_ - 11-21-2018, 10:11 AM
RE: Custom connection controller help - by _Aka_ - 11-21-2018, 11:26 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
Thumbs Up Can't delete connection lacota 3 6 03-16-2024, 11:34 AM
Last Post: _Aka_
Question How to attach custom components to output Sacryn 3 7 02-23-2024, 09:42 AM
Last Post: _Aka_

Forum Jump: