Table of Contents

Class CurvyConnection

Connection component

[ExecuteInEditMode]
public class CurvyConnection : DTVersionedMonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
DTVersionedMonoBehaviour
CurvyConnection

Constructors

CurvyConnection()

public CurvyConnection()

Properties

ControlPointsList

The list of connected control points

public ReadOnlyCollection<CurvySplineSegment> ControlPointsList { get; }

Property Value

ReadOnlyCollection<CurvySplineSegment>

Count

Gets the number of Control Points being part of this connection

public int Count { get; }

Property Value

int

this[int]

Gets a certain Control Point by index

public CurvySplineSegment this[int idx] { get; }

Parameters

idx int

index of the Control Point

Property Value

CurvySplineSegment

a Control Point

Methods

AddControlPoints(params CurvySplineSegment[])

Adds Control Points to this connection

public void AddControlPoints(params CurvySplineSegment[] controlPoints)

Parameters

controlPoints CurvySplineSegment[]

the Control Points to add

AutoSetFollowUp()

public void AutoSetFollowUp()

Create(params CurvySplineSegment[])

Creates a connection and adds Control Points

public static CurvyConnection Create(params CurvySplineSegment[] controlPoints)

Parameters

controlPoints CurvySplineSegment[]

Control Points to add

Returns

CurvyConnection

the new connection

Delete()

Deletes the connection

public void Delete()

OnAfterDeserialize()

Implementation of UnityEngine.ISerializationCallbackReceiver Called automatically by Unity, is not meant to be called by Curvy's users

public void OnAfterDeserialize()

OnBeforeSerialize()

Implementation of UnityEngine.ISerializationCallbackReceiver Called automatically by Unity, is not meant to be called by Curvy's users

public void OnBeforeSerialize()

RemoveControlPoint(CurvySplineSegment, bool)

Removes a Control Point from this connection

public void RemoveControlPoint(CurvySplineSegment controlPoint, bool destroySelfIfEmpty = true)

Parameters

controlPoint CurvySplineSegment

the Control Point to remove

destroySelfIfEmpty bool

whether the connection should be destroyed when empty afterwards

SetSynchronisationPositionAndRotation(Vector3, Quaternion)

Synchronise all the connected control points to match the given position and rotation, based on their synchronisation options, namely ConnectionSyncPosition and ConnectionSyncRotation. Will update the CurvyConnection's game object's transform too.

public void SetSynchronisationPositionAndRotation(Vector3 referencePosition, Quaternion referenceRotation)

Parameters

referencePosition Vector3
referenceRotation Quaternion

Remarks

Can dirty the splines of the updated control points