Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CurvySpline Class Update() etc..
#1
Hi,

CurvySpline Class : in what case Update(), LateUpdate(), FixedUpdate() is required in build?

Thanks..
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#2
Can you clarify your question?
Reply
#3
The SplineClass is used for each Spline.

In PlayMode=true and Build doUpdate(); is called every frame for each Spline!
At last in Update().

I automatically lay spline in same quantity as my last Addon. About 1500 Splines.
Update( DoUppate() ), LateUpdate() and FixedUpdate(50 times per frame ) is now called ~7500 times per frame.

The corious thing is:
DoUpdate() calls Refresh() and Refresh() itself calls if (mDirtyCurve) permanetely. No matter of mDirtyCurve = false; before return;
All the cache points will be updated, CP's will be sorted, etc.... in every frame for each spline permanetely :-)

For my self, my spline structure is fixed in build. And I need only the SplineControllers to run.
Does it happen because of the Dev version 2.0.5 you testing some stuff?
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#4
Refresh is actually doing something when mDirtyControlPoints.Count>0 and that's only happening if there are changes to process. How do you checked that it's recalculating every frame?
Reply
#5
I used a singelton and placed it Refresh(); AnyStaticVar.Show.counter++;

Code:
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class AnyStaticVar : MonoBehaviour {
   static public AnyStaticVar Show;
   public int counter;

   void Awake() {
       Show = this;
   }
}

Hmm now it works. Very strange. I changed something on Play(), and now it didn't occur again and its not reproducible.
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply
#6
Undecided

Unfortunately for any reason Refresh() runs again permanenetly in Update() and now I cannot get rid off.

[Image: 05.jpg]
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  CurvySpline.Interpolate() returns (0,0,0) on first frame freqout 6 2,892 04-20-2018, 03:27 PM
Last Post: _Aka_
  CurvySpline.Count return 0 after build BastienCil 1 957 06-29-2017, 06:24 PM
Last Post: BastienCil
  GC.Collect in CurvyGenerator.Update mbcauley 0 654 11-15-2016, 06:37 PM
Last Post: mbcauley
  CurvySpline.Update() sorta expensive invadererik 5 3,539 04-28-2016, 02:11 PM
Last Post: Jake

Forum Jump: