Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change default settings when adding a point
#1
Hello ! I would like to know if i could change the default settings when i'm drawing a spline.

I would like to have the SerializedOrientationAnchor and the AutoBakeOrientation option set to true by default for exemple.

Ty !
Reply
#2
Hi,
There is no UI based way to defined the value at creation of those properties. You will have to modify this in code:
\Curvy\Base\CurvySplineSegment_private.cs
line 63
bool m_AutoBakeOrientation;
line 69
bool m_OrientationAnchor;
add a "= true;" to these declarations
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
Oh thanks, that _private class I didn't saw again x)

I heard from my mentor of the industry that partial class is not recommanded to use for a good architecture. Only for code generation.
Reply
#4
You mentor is probably right. If I had designed CurvySplineSegment from scratch, I would probably not made it a partial class. But the thing is that the class was 2900 lines of code. Discovering the class could be overwhelming for newcomers. I decided to subdivide the file in two, one with the publicly available code, and the rest in another file. This way you have a smaller file to look at if you just want to take a look at what members are available to you when using a CurvySpline (besides reading the API reference or using autocompletion).
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_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
  Connection "next' control point jh092 3 15 11-22-2023, 11:47 AM
Last Post: _Aka_
  Spline.Length not updated unless I add a point to spline (or modify it) first. _RicO 3 6 08-26-2023, 08:41 AM
Last Post: _Aka_

Forum Jump: