确认到内存溢出发生在Note模板(SplineArchor的ScriptUpdate内部)

This commit is contained in:
2025-10-10 23:52:27 +08:00
parent 9ab8b8ba0b
commit 80a39dd71d
4 changed files with 4 additions and 5 deletions

View File

@@ -198,7 +198,6 @@ MonoBehaviour:
BPMFraction: 1 BPMFraction: 1
SongOffset: 0 SongOffset: 0
BPM: 60 BPM: 60
IsDisableGC: 0
ToolSongTimeButton: {fileID: 8680706935683541890} ToolSongTimeButton: {fileID: 8680706935683541890}
CameraPositionButton: {fileID: 8665890749222113748} CameraPositionButton: {fileID: 8665890749222113748}
CameraRotationButton: {fileID: 8233090674995911520} CameraRotationButton: {fileID: 8233090674995911520}

View File

@@ -355,6 +355,7 @@ namespace Demo.Game
{ {
try try
{ {
Stop();
yield return MainObject.UnloadScript(); yield return MainObject.UnloadScript();
} }
finally finally

View File

@@ -4,7 +4,7 @@ using UnityEngine;
namespace Demo.Game namespace Demo.Game
{ {
public class SplineAnchor : ScriptableObject,IDependOnSplineCore, IDependOnSplineRenderer public class SplineAnchor : ScriptableObject, IDependOnSplineCore, IDependOnSplineRenderer
{ {
public static SplineAnchor Make() public static SplineAnchor Make()
{ {
@@ -77,8 +77,7 @@ namespace Demo.Game
Updater = () => Updater = () =>
{ {
var result = MySplineRenderer.EvaluateClipTo(MySplineOffset); var result = MySplineRenderer.EvaluateClipTo(MySplineOffset);
transform.position = result.position; transform.SetPositionAndRotation(result.position, result.rotation);
transform.rotation = result.rotation;
}; };
} }
else if (bIsFollowPosition) else if (bIsFollowPosition)