Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find connections
#1
Hi, how could I get a list of connections ?

Regards
Reply
#2
Hi,
You can use the FindObjectsOfType method from Unity's API (https://docs.unity3d.com/ScriptReference/Object.FindObjectsOfType.html) to find all objects of type CurvyConnection.
You can also use GetComponentsInChildren (https://docs.unity3d.com/ScriptReference/Component.GetComponentsInChildren.html) on the _CurvyGlobal_ object.
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
#3
Thanks, actually I think what I should have asked is how can I tell if a control point is a connection
Reply
#4
Hi,
yourControlPoint.Connection is the property you need. If the control point does not have a connection, that property will return null
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
#5
Thanks, that was a lot easier than I thought It would be
Reply
#6
You are welcome
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
  Error when recreating splines / connections jh092 3 3 07-25-2022, 09:58 AM
Last Post: _Aka_
  How to find out whether the spline is self-intersected. mydayz 1 229 10-19-2021, 12:08 PM
Last Post: _Aka_
Question Working with Connections burn0815 3 931 05-28-2021, 11:24 AM
Last Post: _Aka_
  SplineController slows down approaching connections jh092 5 2,538 08-07-2020, 03:56 PM
Last Post: _Aka_

Forum Jump: