GPU优化
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Ichni.RhythmGame.Beatmap;
|
||||
using Sirenix.OdinInspector;
|
||||
using UniRx;
|
||||
|
||||
namespace Ichni.RhythmGame
|
||||
@@ -26,6 +27,7 @@ namespace Ichni.RhythmGame
|
||||
return track;
|
||||
}
|
||||
|
||||
[Button]
|
||||
public override void SetDefaultSubmodules()
|
||||
{
|
||||
transformSubmodule = new TransformSubmodule(this);
|
||||
@@ -34,7 +36,7 @@ namespace Ichni.RhythmGame
|
||||
trackTimeSubmodule = null;
|
||||
trackRendererSubmodule = null;
|
||||
}
|
||||
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!GameManager.instance.audioManager.isUpdating)
|
||||
@@ -56,7 +58,7 @@ namespace Ichni.RhythmGame
|
||||
public override void AfterInitialize()
|
||||
{
|
||||
base.AfterInitialize();
|
||||
|
||||
|
||||
if (trackPathSubmodule != null && trackPathSubmodule.pathNodeList.Count > 3)
|
||||
{
|
||||
trackPathSubmodule.ClosePath();
|
||||
@@ -64,17 +66,27 @@ namespace Ichni.RhythmGame
|
||||
|
||||
if(trackRendererSubmodule != null)
|
||||
{
|
||||
//var path = trackPathSubmodule!.path;
|
||||
|
||||
trackRendererSubmodule.meshGenerator.autoUpdate = false;
|
||||
/*path.ResampleTransform();
|
||||
path.Subscribe(trackRendererSubmodule.meshGenerator);
|
||||
path.EditorUpdateConnectedNodes();
|
||||
path.RebuildImmediate(true, true);*/
|
||||
//path.EditorAwake();
|
||||
}
|
||||
}
|
||||
|
||||
public override void BeforeStart()
|
||||
{
|
||||
switch (trackPathSubmodule.trackSpaceType)
|
||||
{
|
||||
case Track.TrackSpaceType.CatmullRom:
|
||||
trackPathSubmodule.GenerateCatmullRomSpline();
|
||||
break;
|
||||
case Track.TrackSpaceType.Linear:
|
||||
trackPathSubmodule.GenerateLinearSpline();
|
||||
break;
|
||||
case Track.TrackSpaceType.BSpline:
|
||||
trackPathSubmodule.GenerateBSpline();
|
||||
break;
|
||||
}
|
||||
base.BeforeStart();
|
||||
}
|
||||
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user