Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Spline.Length not updated unless I add a point to spline (or modify it) first.
#1
I create a spline and add two points to start. Then in another function I move the "last point" to make a "straight" spline. But when I call spline.Length right after moving the point, it's always "0". I tried doing a spline.Refresh() and it still says 0. Only way I got it to work is by adding a temporary point right after moving the last point with InsesrtAfter(), then instantly deleting it. This seems to refresh the spline and then ".Length" works.

Any idea?
Reply
#2
Hi
This seems odd. Can you please send me a reproduction case please?
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
#3
Sounds good. Will do after the weekend.

How would I send you this? Do you want a simple project? And where do I send it to you?
Reply
#4
The best way would be in my opinion to include only the Assets folder, plus the packages file and the project settings file. That way Unity will know what version to use and what packages to install. No need to include Curvy Splines, just tell me what version you are using.
If you are ok with it the project being shared publicly, you can post the link here. If the files are confidential, then you can send me the link via PM.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  12_Train junction point richardzzzarnold 5 237 04-16-2025, 02:19 PM
Last Post: _Aka_
  Filling a closed spline dynamically rickgplus 1 119 04-16-2025, 08:56 AM
Last Post: _Aka_
  OnAfterControlPointAdded - Control Point is null jh092 5 526 02-04-2025, 09:31 PM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 217 02-03-2025, 09:34 AM
Last Post: _Aka_

Forum Jump: