1.解决了Track面向的问题2.新增Surface类型的Spline渲染器3.新增with后缀表达式
This commit is contained in:
22
Assets/Scripts/MoreSpline/SplineSurfaceRenderer.cs
Normal file
22
Assets/Scripts/MoreSpline/SplineSurfaceRenderer.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Convention;
|
||||
using Dreamteck.Splines;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Demo.Game
|
||||
{
|
||||
public class SplineSurfaceRenderer : BasicSplineRenderer<SurfaceGenerator>
|
||||
{
|
||||
public static SplineTrackRenderer Make()
|
||||
{
|
||||
return new GameObject().AddComponent<SplineTrackRenderer>();
|
||||
}
|
||||
|
||||
public override IEnumerator LoadScript(string script)
|
||||
{
|
||||
MyLineMaterial = Resources.Load<Material>("Line/Default");
|
||||
yield return base.LoadScript(script);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user