Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable the Update of the CurvySpline
#6
Thanks you again for your answer about INterpolateByDistance, it works Smile

For my usecase: there were several thinks I didn't do right for my mobile build:
- I was activating and desactivating objects with your Spline inside (the Spline.OnEnable() was apearing in the profiler). My solution for that: I just active the Spline at start, and let it like that, with the UpdateIn: None.
- 200 of yours SplineController every Update is too much. Because: 
200 object with Update() inside is bad for unity, because it's mean 200 different calls to C++ to C#. With one only Update(), who call 200 custom function, it's way better for mobile application. (so it's not your plugin, but my specific usecase).

Try to put 200 of your SplineController moving aloing a very long SPline (more than 3000 of lengh), and build with the profiler connected to the android phone (a bad android phone if possible^^). With a Profiler.BeginSample("SplineController Update"), Profiler.EndSample() between the update methode of the SplineController.

I know you have a lot of trigger & option to manage for everyone. Options I don't realy need. But with your code I have managed to create customs script who are doing just what I need. I have managed to have 60 fps with more than 200 custom SplineController, with position, rotation and offset, it's way enought for me.

And sorry for bothering you so much with everything ahah, i'm trying to first search into your documentation & the code before asking you something.

(for exemple, I discovers the Abstract class in C#, I was searching for your Update() method in the CurvySpline.cs, And I took 1 hour to find your CurvySpline_private, and unnderstanding what it was ahah x))
Reply


Messages In This Thread
RE: Disable the Update of the CurvySpline - by UsernameHed - 05-22-2019, 09:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  CG documentation update _Aka_ 0 267 06-19-2026, 11:13 PM
Last Post: _Aka_
  NullReferenceException when enable and disable curves with followups phaix 6 4,111 05-15-2025, 07:55 AM
Last Post: phaix
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 2,048 02-03-2025, 09:34 AM
Last Post: _Aka_
  Update and Black Friday sale _Aka_ 2 2,151 11-23-2024, 11:58 AM
Last Post: _Aka_

Forum Jump: