This commit is contained in:
2025-09-01 00:04:29 +08:00
parent 2c784ff343
commit 5365ab6441
2 changed files with 3 additions and 19 deletions

View File

@@ -6,7 +6,7 @@ using UnityEngine;
namespace Convention.VFX namespace Convention.VFX
{ {
public class DreamTeckSplinePointBuilder : MonoAnyBehaviour, ILoadedInHierarchy public class DreamTeckSplinePointBuilder : MonoBehaviour, ILoadedInHierarchy
{ {
public enum InjectType public enum InjectType
{ {
@@ -15,7 +15,6 @@ namespace Convention.VFX
Broken = SplinePoint.Type.Broken, Broken = SplinePoint.Type.Broken,
SmoothFree = SplinePoint.Type.SmoothFree SmoothFree = SplinePoint.Type.SmoothFree
}; };
[Setting, InspectorDraw] public PerformanceIndicator.PerformanceMode performanceMode = PerformanceIndicator.PerformanceMode.Speed;
[Content] public List<LinePoint> childPoints = new(); [Content] public List<LinePoint> childPoints = new();
[Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineComputer m_splineComputer; [Resources, SerializeField, HopeNotNull, InspectorDraw] private SplineComputer m_splineComputer;
@@ -100,23 +99,6 @@ namespace Convention.VFX
m_splineRenderer = GetComponent<SplineRenderer>(); m_splineRenderer = GetComponent<SplineRenderer>();
} }
private void LateUpdate()
{
if ((int)performanceMode >= (int)PerformanceIndicator.PerformanceMode.L6)
{
RebuildAll();
m_splineRenderer.Rebuild();
}
else if ((int)performanceMode >= (int)PerformanceIndicator.PerformanceMode.L6)
{
if (childPoints.Count != knots.Count)
RebuildAll();
else
ResetPoints();
m_splineRenderer.Rebuild();
}
}
public static void SetKnot([In, ArgPackage] ref SplinePoint point, [In, ArgPackage] LinePoint linePoint) public static void SetKnot([In, ArgPackage] ref SplinePoint point, [In, ArgPackage] LinePoint linePoint)
{ {
point.position = linePoint.transform.localPosition; point.position = linePoint.transform.localPosition;

View File

@@ -34,6 +34,8 @@ MonoBehaviour:
- Assembly-CSharp-firstpass - Assembly-CSharp-firstpass
- Cinemachine - Cinemachine
- CW.Common - CW.Common
- Dreamteck.Splines
- Dreamteck.Utilities
- EasySave3 - EasySave3
- LeanCommon - LeanCommon
- LeanGUI - LeanGUI