Files
Convention-Unity-Demo/Assets/Scripts/MoreSpline/PointBaseRenderer/SplineTrackRenderer.cs

26 lines
649 B
C#
Raw Normal View History

2025-09-25 19:04:05 +08:00
using Convention;
2025-12-12 15:19:10 +08:00
using Demo.Attr;
2025-09-25 19:04:05 +08:00
using Dreamteck.Splines;
2025-12-12 15:19:10 +08:00
using System;
using System.Collections;
2025-09-25 19:04:05 +08:00
using UnityEngine;
namespace Demo.Game
{
2025-12-12 15:19:10 +08:00
[Scriptable]
public class SplineTrackRenderer : BasicSplineRenderer<PathGenerator>
2025-09-25 19:04:05 +08:00
{
public static SplineTrackRenderer Make()
{
return new GameObject().AddComponent<SplineTrackRenderer>();
}
protected override IEnumerator DoSomethingDuringApplyScript()
{
if (MyDefaultMaterial == null)
MyDefaultMaterial = StaticCacheDefaultMaterial;
yield return base.DoSomethingDuringApplyScript();
}
2025-09-25 19:04:05 +08:00
}
}