示例#1
0
        /// <summary>
        /// helper for drawing gizmos in the editor
        /// </summary>
        public static void drawGizmos(Vector3[] nodes, float resolution = 50, bool isInEditMode = false)
        {
            // horribly inefficient but it only runs in the editor
            var spline = new Spline(new List <Vector3>(nodes));

            spline.drawGizmos(resolution, isInEditMode);
        }
示例#2
0
		public void OnDrawGizmosSelected()
		{
			// the editor will draw paths when force straight line is on
			if( !forceStraightLinePath )
			{
				var spline = new Spline( nodes, useBezier, forceStraightLinePath );
				if( closePath )
					spline.closePath();
				
				Gizmos.color = pathColor;
				spline.drawGizmos( pathResolution, isInEditMode );
			}
		}
示例#3
0
        public void OnDrawGizmosSelected()
        {
            // the editor will draw paths when force straight line is on
            if (!forceStraightLinePath)
            {
                var spline = new Spline(nodes, useBezier, forceStraightLinePath);
                if (closePath)
                {
                    spline.closePath();
                }

                Gizmos.color = pathColor;
                spline.drawGizmos(pathResolution, isInEditMode);
            }
        }
示例#4
0
		/// <summary>
		/// helper for drawing gizmos in the editor
		/// </summary>
		public static void drawGizmos( Vector3[] nodes, float resolution = 50, bool isInEditMode = false )
		{
			// horribly inefficient but it only runs in the editor
			var spline = new Spline( new List<Vector3>( nodes ) );
			spline.drawGizmos( resolution, isInEditMode );
		}