05-22-2019, 09:49 AM
(This post was last modified: 05-22-2019, 09:49 AM by UsernameHed.)
Thanks you again for your answer about INterpolateByDistance, it works
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))
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))