WuhuIslandTesting/Library/PackageCache/com.unity.splines@1.0.1/Samples~/Runtime/DisplayCurvatureOnSpline.cs

32 lines
776 B
C#
Raw Normal View History

2025-01-07 02:06:59 +01:00
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Splines;
namespace Unity.Splines.Examples
{
[RequireComponent(typeof(SplineContainer))]
public class DisplayCurvatureOnSpline : MonoBehaviour
{
[Serializable]
public struct CurvatureConfig
{
public bool display;
public float time;
}
public List<CurvatureConfig> m_CurvatureTimes = new List<CurvatureConfig>();
SplineContainer m_Container;
public SplineContainer container
{
get
{
if(m_Container == null)
m_Container = GetComponent<SplineContainer>();
return m_Container;
}
}
}
}