From 5fc74d2f6a87280d1608c63536f2bc75fcd216a4 Mon Sep 17 00:00:00 2001 From: Riccardo Di Nuzzo Date: Thu, 4 May 2023 14:38:38 +0100 Subject: [PATCH] add default constructor to initialise bezierpath instance --- .../PathCreator/Core/Runtime/Objects/BezierPath.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Assets/PathCreator/Core/Runtime/Objects/BezierPath.cs b/Assets/PathCreator/Core/Runtime/Objects/BezierPath.cs index dbff8b6..10147ac 100644 --- a/Assets/PathCreator/Core/Runtime/Objects/BezierPath.cs +++ b/Assets/PathCreator/Core/Runtime/Objects/BezierPath.cs @@ -46,14 +46,15 @@ public enum ControlMode { Aligned, Mirrored, Free, Automatic }; [SerializeField, HideInInspector] bool flipNormals; - #endregion + #endregion - #region Constructors + #region Constructors + public BezierPath() : this(Vector3.zero, false, PathSpace.xyz) { } - /// Creates a two-anchor path centred around the given centre point - /// Should the end point connect back to the start point? - /// Determines if the path is in 3d space, or clamped to the xy/xz plane - public BezierPath(Vector3 centre, bool isClosed = false, PathSpace space = PathSpace.xyz) + /// Creates a two-anchor path centred around the given centre point + /// Should the end point connect back to the start point? + /// Determines if the path is in 3d space, or clamped to the xy/xz plane + public BezierPath(Vector3 centre, bool isClosed = false, PathSpace space = PathSpace.xyz) { Vector3 dir = (space == PathSpace.xz) ? Vector3.forward : Vector3.up;