Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
StackOverflowException on large spline network
#5
(03-17-2016, 01:03 PM)Nalle Wrote: To remove the update calls I've wrapped the three update methods in CurvySpline.cs in a conditional define so that they are only run in the Unity editor (i.e. #if UNITY_EDITOR). On scene load I then manually call update on each spline a single time to initialize them which allows the SplineController to navigate the spline network.

I used a similar work around on CurvySpline.cs.

Additionally: This make sure the SplineControllers start to work
Code:
void Start() {
            doUpdate();
        }
}

Each of the UpdateXX Method includes:.
Code:
void Update() {
(!CheckTransform ) return;
........
}


Disabling CheckTransform on any spline separately eliminates the CPU overhead drastically.
But this is not all btw. The CurvyConnection Update() cause another trouble on my configuration because of the Update() method too.

Code:
    public void Update() {
            bool syncPos = TTransform.position != transform.position;
            bool syncRot = TTransform.rotation != transform.rotation;
            if (syncPos || syncRot) {
                SynchronizeINTERNAL(transform);
            }
        }

This seems, it's used to hold the connection points over each other. Therefore I wrote about "permanently animated feature". All this required updates methods are use to perform changes or animations if they eventually used. If using some splines only, it doesn't matter. Try to use #if UNITY_EDITOR on CurvyConnection.Udpate() Perhaps this change the call stack resizement for the Build previously.
(Henry Ford) Each hour more of searching is each hour less of your live time.

Reply


Messages In This Thread
RE: StackOverflowException on large spline network - by Trainzland - 03-18-2016, 04:23 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Curvy Line Renderer for UI Spline? gekido 3 6 04-04-2024, 12:56 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 14 03-04-2024, 11:06 AM
Last Post: _Aka_

Forum Jump: