同步
This commit is contained in:
@@ -45,6 +45,8 @@ namespace Ichni.RhythmGame
|
||||
this.trackDisplay = UnityEngine.Object.Instantiate(EditorManager.instance.basePrefabs.trackDisplay, track.transform).GetComponent<SplineRenderer>();
|
||||
this.trackDisplay.spline = path;
|
||||
this.trackDisplay.size = 0.1f;
|
||||
// 与 TrackRendererSubmodule 保持一致:LateUpdate 模式消除一帧延迟
|
||||
this.trackDisplay.updateMethod = SplineUser.UpdateMethod.LateUpdate;
|
||||
|
||||
this.SetDisplay(isShowingDisplay);
|
||||
|
||||
|
||||
@@ -27,7 +27,9 @@ namespace Ichni.RhythmGame
|
||||
this.splineRenderer.doubleSided = true;
|
||||
this.splineRenderer.clipFrom = 0;
|
||||
this.splineRenderer.clipTo = 1;
|
||||
this.splineRenderer.updateMethod = SplineUser.UpdateMethod.Update;
|
||||
// LateUpdate 模式保证 MeshGenerator 在 SplineComputer.Update() 重采样之后才重建网格,
|
||||
// 消除 Update 模式下因 MonoBehaviour 执行顺序不确定导致的一帧延迟。
|
||||
this.splineRenderer.updateMethod = SplineUser.UpdateMethod.LateUpdate;
|
||||
this.meshRenderer.material = renderMaterial;
|
||||
this.splineRenderer.color = Color.white;
|
||||
this.uvRotation = 0f;
|
||||
|
||||
@@ -24,7 +24,9 @@ namespace Ichni.RhythmGame
|
||||
this.pathGenerator.doubleSided = true;
|
||||
this.pathGenerator.clipFrom = 0;
|
||||
this.pathGenerator.clipTo = 1;
|
||||
this.pathGenerator.updateMethod = SplineUser.UpdateMethod.Update;
|
||||
// LateUpdate 模式保证 MeshGenerator 在 SplineComputer.Update() 重采样之后才重建网格,
|
||||
// 消除 Update 模式下因 MonoBehaviour 执行顺序不确定导致的一帧延迟。
|
||||
this.pathGenerator.updateMethod = SplineUser.UpdateMethod.LateUpdate;
|
||||
this.meshRenderer.material = renderMaterial;
|
||||
this.pathGenerator.color = Color.white;
|
||||
this.uvRotation = 90f;
|
||||
|
||||
@@ -24,7 +24,9 @@ namespace Ichni.RhythmGame
|
||||
this.surface.doubleSided = true;
|
||||
this.surface.clipFrom = 0;
|
||||
this.surface.clipTo = 1;
|
||||
this.surface.updateMethod = SplineUser.UpdateMethod.Update;
|
||||
// LateUpdate 模式保证 MeshGenerator 在 SplineComputer.Update() 重采样之后才重建网格,
|
||||
// 消除 Update 模式下因 MonoBehaviour 执行顺序不确定导致的一帧延迟。
|
||||
this.surface.updateMethod = SplineUser.UpdateMethod.LateUpdate;
|
||||
this.meshRenderer.material = renderMaterial;
|
||||
this.surface.color = Color.white;
|
||||
this.surface.uvRotation = 90;
|
||||
|
||||
@@ -27,7 +27,9 @@ namespace Ichni.RhythmGame
|
||||
this.tubeGenerator.doubleSided = true;
|
||||
this.tubeGenerator.clipFrom = 0;
|
||||
this.tubeGenerator.clipTo = 1;
|
||||
this.tubeGenerator.updateMethod = SplineUser.UpdateMethod.Update;
|
||||
// LateUpdate 模式保证 MeshGenerator 在 SplineComputer.Update() 重采样之后才重建网格,
|
||||
// 消除 Update 模式下因 MonoBehaviour 执行顺序不确定导致的一帧延迟。
|
||||
this.tubeGenerator.updateMethod = SplineUser.UpdateMethod.LateUpdate;
|
||||
this.meshRenderer.material = renderMaterial;
|
||||
this.tubeGenerator.color = Color.white;
|
||||
this.tubeGenerator.uvRotation = 90;
|
||||
|
||||
Reference in New Issue
Block a user