Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting a curve make me very slow
Hello every one,

I have an issue when i want to delete a CurvySpline i've created at runtime. When the spline have many controlPoints the destroy function is kinda heavy to
run. it even some times forced me to shut unity process because the editor don't answer anymore. Do you guys have any idea why ?


I got some questions:

- what is "many ControlPoints" for you? 50? 100? 1000?
- Do you delete the spline by calling GameObject.Destroy()?
- If you call CurvySpline.Clear() before deleting the spline, does this make a difference speed-wise?

The only performance issue in deleting splines *should* be the destroying of the CP's GameObject.


Thanks for your answer.
It is around 50 points and less.
To delete the spline i use CurvySpline.Destroy()
I've tried with adding Clear() but it did not changed anything.
The Odd one is that i've exported my code in an other project and it worked perfectly fine.
Hm, then I assume it's something weird in the Unity project. One thing you can always try is to disable the Spline and delete it's CP's continously over a certain amount of frames (e.g. one CP GameObject each frame), much like pooling managers would do it.

Possibly Related Threads…
Thread Author Replies Views Last Post
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 PM
Last Post: _Aka_
  how to make fast moving controller go all the way to linear points?(curvy8) hawken 7 12 06-06-2023, 09:47 AM
Last Post: _Aka_
  Can Curve Spline be used for an in game level editor. Lupos 30 71 06-03-2023, 10:58 AM
Last Post: _Aka_
Brick Extending Curvy to make a Hallway editor. JacobSL 5 396 02-13-2023, 09:29 AM
Last Post: _Aka_

Forum Jump: