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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
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 will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  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_

Forum Jump: