Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ScanConnections() causes heavy load in play mode, even with all Curvy objects removed
#5
Hi again.

1- After digging in this subject, I see that ScanConnections is not set to be executed every frame. It is supposed to execute only when the hierarchy changes. Does your hierarchy change every frame?

2- I tested with 20k cubes, and ScanConnections did not show any significant CPU usage. Maybe it is because your game objects are way more complex?

3- Here is an optimization to ScanConnections:
replace
CurvyConnection[] o = GameObject.FindObjectsOfType<CurvyConnection>();
with
CurvyConnection[] o = CurvyGlobalManager.Instance.GetComponentsInChildren<CurvyConnection>();
Since I couldn't reproduce the issue, I wasn't able to test how efficient this optimization is, but it is theoretically efficient. Can you please apply it on your project and tell me what was the result? Thanks
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
RE: ScanConnections() causes heavy load in play mode, even with all Curvy objects removed - by _Aka_ - 07-23-2021, 12:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Play() does not cause SplineController to produce expected behaviour ConCat 8 1,343 02-08-2026, 11:54 AM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 7 6,203 07-13-2025, 07:11 PM
Last Post: _Aka_
  Method of scattering objects along spline joebain 1 1,390 11-26-2024, 03:20 PM
Last Post: _Aka_
  making objects solid cielpandapie 1 1,319 10-18-2024, 12:17 AM
Last Post: _Aka_

Forum Jump: