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
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
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.
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Method of scattering objects along spline joebain 1 3 11-26-2024, 03:20 PM
Last Post: _Aka_
  Curvy Line Renderer for UI Spline? gekido 5 13 10-29-2024, 10:19 AM
Last Post: _Aka_
  Nested Spline Volume Spot Instantiation merobbins5 3 7 07-26-2024, 09:58 AM
Last Post: _Aka_
  Left-right movement, and spline follow shihaya 3 10 07-12-2024, 12:50 PM
Last Post: _Aka_

Forum Jump: