Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable the Update of the CurvySpline
#1
Hello,

I have some profiler spikes from the CurvySpline.Update() in play mode.
(I have checked CheckTransform to false).

But I haven't found any Update methode in the CurvySpline, weird ?


When I am in play mode, I would like to set the script CurvySpline to disabled. But when I do that, my SplineController stop to move along the path. Why ? A Spline, When calculated, is just datas stored, no need to do an update for the Spline, right ?


I don't want any new change in the Spline when I am in build. I just want SplineController moving along this Spline.





EDIT: oh, I found out the script CurvySPline_private, and I found yours function Update, FixedUpdate and LateUpdate.
So at each frame, unity goes in the Update, FixedUpdate and LateUpdate methode (even if it doen't go in your the doUpdate function).
I would like to disable the script CurvySpline completly, but still be able to move along this spline with the SplineController. Is it possible ?

I Have managed to add in the enum a None Property:

Code:
public enum CurvyUpdateMethod
   {
       Update,
       LateUpdate,
       FixedUpdate,
       None
   }

And then it works, in the CurvySpline_private, we don't go into your Update method.

I guess it's resolved Smile, I suggest you to add this None to this enum
Reply


Messages In This Thread
Disable the Update of the CurvySpline - by UsernameHed - 05-20-2019, 09:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  NullReferenceException when enable and disable curves with followups phaix 6 3,394 05-15-2025, 07:55 AM
Last Post: phaix
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 1,742 02-03-2025, 09:34 AM
Last Post: _Aka_
  Update and Black Friday sale _Aka_ 2 1,771 11-23-2024, 11:58 AM
Last Post: _Aka_
  Destroying curvyspline instances jmh1804 5 2,953 09-18-2024, 07:52 AM
Last Post: _Aka_

Forum Jump: