Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Unity Splines

Discussion in 'World Building' started by gabrielw_unity, Oct 5, 2022.

  1. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @Red_Dragon69,

    Which version are you using with that error?
    I think that was fixed in 2.5.1 if I'm correct :)

     
  2. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hi @veddycent,

    Indeed, there is nothing to do that.
    It's kind of a customization of the component as I see it. You need that indeed for your usecase, but somebody else might want like, 3 different ranges alons the same spline to instantiate components ;) so just adding a Range parameter might not be a solution.

    The current solution would be to duplicate the original spline and have one that is only for instantiated elements.

    Have a good day :)

     
  3. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    111
    Hi Thomas,
    thx that fixed the problem :) I just realized that I was on version 2.4.0, but Unity wasn't showing me the possibility to update the package. May this be a current error from version 2.4.0? Not a problem for me, as I updated manually, by changing the version number in manifest.json.

    br,
    Max
     
  4. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,574
    One problem that frequently occurs here is that when people duplicate a GameObject with a SplineExtrude Component, multiple SplineExtrude Components end up modifying the same Mesh. Essentially, these components fight over the same Mesh in the project.

    In order to address this issue, I believe the correct (or more appropriate) approach would be to clear the Mesh reference in the MeshFilter when duplicating a GameObject with a Spline Extrude Component. Could you please look into this issue?
     
    TheCircadian and MUGIK like this.
  5. AntonAndev

    AntonAndev

    Joined:
    Aug 13, 2014
    Posts:
    44
    Hello, I see Spline Package is updated to 2.5.1 automatically. I tried to test without recreating native spline every frame. Spline is contructed once at a train instantiation. Spline is not changed during a moving. Again I have 1.5 FPS on a spline with 40 knots with 3 objects and 5000 calculations for 50 frames. In my game I will have many splines on a terrain with very long trains, each train's component calculates it's position and rotation independently. With such performance it seems I can't use splines in my game. I attached screenshot with performance metrics.

    Code (CSharp):
    1.  
    2.                 //using (NativeSpline nativeSpline = new NativeSpline(locomotiveAI.Path.SplinePath))
    3.                 //{
    4.                     locomotiveAI.Path.SplinePath.Evaluate(ProgressRatio, out var pos, out var dir, out var up);
    5.                     rotation = Quaternion.LookRotation(dir);
    6.                     rigidBody.MovePosition(pos);
    7.                     rigidBody.MoveRotation(rotation);
    8.                 //}
     

    Attached Files:

    Last edited: Nov 21, 2023
  6. jbooth

    jbooth

    Joined:
    Jan 6, 2014
    Posts:
    5,457
    Don't use evaluate directly and on the main thread, it's super slow, to use splines at scale you need to convert them into better data structures for mass number of lookups. Splines are not really tested at scale- they don't scale to large numbers of lookups, large numbers of splines in a scene being easily editable, etc. And it seems like the team has in fact been pulled off to other stuff, dispite assurances otherwise, so I don't see this getting fixed soon.

    For your case I'd consider caching a list of positions/quaternion for the spline at whatever resolution you need. IE: If the points you need to align are 2 meters apart, cache 1 point for every meter or so. Then you can lookup the point quickly (because they are all linearly spaced, so you can iterate forward from the last position or take a t->keyframe), then interpolate between the two point you're between. You can also move it all to a burst/job so it's off the main thread.


    Code (CSharp):
    1. [BurstCompile]
    2.     public struct CacheSplineJob : IJobParallelFor
    3.     {
    4.         public struct PosQuat
    5.         {
    6.             public float3 pos;
    7.             public quaternion quat;
    8.         }
    9.  
    10.         [ReadOnly] public NativeSpline spline;
    11.         [ReadOnly] public int numPoints;
    12.         [WriteOnly] public NativeArray<PosQuat> data;
    13.  
    14.      
    15.         public void Execute(int i)
    16.         {
    17.             float sVal = ((float)i) / (numPoints - 1);
    18.             spline.Evaluate(sVal, out var pos, out var dir, out var up);
    19.             up = math.normalizesafe(up);
    20.             dir = math.normalizesafe(dir);
    21.             PosQuat pq = new PosQuat();
    22.             pq.pos = pos;
    23.             pq.quat = quaternion.LookRotation(dir, up);
    24.             data[i] = pq;
    25.         }
    26.     }
    Code (CSharp):
    1.  
    2.                 float t = 0.5 * numPoints; // position along spline as a keyframe
    3.                 int fl = math.clamp((int)math.floor(t), 0, numPoints - 1);
    4.                 int fl1 = math.clamp(fl + 1, 0, numPoints - 1);
    5.                 var pq0 = posQuats[fl];
    6.                 var pq1 = posQuats[fl1];
    7.                 float3 pos = math.lerp(pq0.pos, pq1.pos, fr);
    8.                 // interpolate
    9.                 quaternion quat = math.slerp(pq0.quat, pq1.quat, fr);
    10.                 float2 scale = math.lerp(pq0.scale, pq1.scale, fr);
     
  7. AntonAndev

    AntonAndev

    Joined:
    Aug 13, 2014
    Posts:
    44
  8. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,111
    Last edited: Nov 20, 2023
    ThomasLopez likes this.
  9. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,111
    Created another showcase using Unity's Splines & MicroVerse

     
  10. AntonAndev

    AntonAndev

    Joined:
    Aug 13, 2014
    Posts:
    44
    VertexPath here is an array of points on a spline, we set some accuracy to calculate less or more points. Could'nt find such function, could you please add link?
     
  11. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,111
    AntonAndev and ThomasLopez like this.
  12. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @Red_Dragon69,
    Which version of Unity are you currently using ?
    This seems indeed strange that the update was not proposed by the editor directly.

     
  13. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @Peter77,

    This should be fixed in Splines 2.5.0 and after.
    The changelog says:
    [SPLB-183] Fixed a bug where duplicating the SplineExtrude component was not updating the mesh asset reference.

    Updating your splines package should to the trick!

     
    Peter77 likes this.
  14. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    @AntonAndev,

    What @jbooth is pointing to is accurate regarding creating a cache with the needed data, and that's what I was proposing to you in the previous post:
    Create a Native Spline once (in the Start function for instance) to interprete your SplinePath in world space and store this data. Then use that native representation to evaluate your result.

    The way you are doing in this last solution is not caching any data and everything needs to be recomputed at every call which is indeed costly.

     
    AntonAndev likes this.
  15. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    @AntonAndev,

    @Rowlan is pointing you to the right solution regarding what you are asking:
    https://docs.unity3d.com/Packages/c...ngine.Splines.SplineUtility.ReducePoints.html

    Plus, you can find an example of that in the Splines samples!
    Just have a look at the scene : Scenes\Path Fitting\Paint Splines

    Hope this helps!

     
    AntonAndev likes this.
  16. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    111
    I'm using 2022.3.12. It seems that 2.4.0 is still the recommended version.
     
  17. AntonAndev

    AntonAndev

    Joined:
    Aug 13, 2014
    Posts:
    44
    Hello. We should use IDisposable object in the "using" statements. if we assign nativeSpline before using it and use it in another function (FixedUpdate()), we get "ObjectDisposedException". could you show an example of how to use native object in lifecycle functions?

    Code (CSharp):
    1. using (NativeSpline nativeSpline = new NativeSpline(locomotiveAI.Path.SplinePath))
    2.                 {
    3.                     nativeSpline.Evaluate(ProgressRatio, out var pos, out var dir, out var up);
    4.                     rotation = Quaternion.LookRotation(dir);
    5.                     rigidBody.MovePosition(pos);
    6.                     rigidBody.MoveRotation(rotation);
    7.                 }
     
  18. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    111
    Tried with version 2022.3.13 today and it's working correctly now. Version 2.5.1 is the recommended version :)
     
    ThomasLopez likes this.
  19. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,111
    I created another showcase for the Unity Splines. Makes me wish the editing would be extended a bit. Like

    * extruding a spline
    * subdividing it between positions
    * creating smooth curves / circles


    I mean, I have that in my asset Genesis for MicroVerse, but it would make so much more sense if Unity could build that natively into their spline tools. One just needs that stuff :)
     
    Last edited: Nov 22, 2023
  20. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    111
    totally agree with @Rowlan !!! It took me about a week, to figure out how to create splines in a procedural way and built my own spline creation tool. Implemented a small racing car prototype too (Trackmania style due to its 20th birthday, screenshot attached ^^). Although it looks a little rough, a spline creation tool, like in rollercoaster tycoon, could be a very much needed sample for working with Unity splines.

    Improving the documentation of the scripting API would definitely help too ;)

    upload_2023-11-23_13-38-38.png
     
    Last edited: Nov 23, 2023
    ThomasLopez likes this.
  21. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hii @AntonAndev ,

    Have you tried using a different allocator ?
    Cf the doc about Natvie Spline here :
    https://docs.unity3d.com/Packages/c...plines.NativeSpline.-ctor.html?q=NativeSpline

    This code is working fine for instance:
    Code (CSharp):
    1. [RequireComponent(typeof(SplineContainer))]
    2. public class NativeSplineSample : MonoBehaviour
    3. {
    4.     NativeSpline m_NativeSpline;
    5.  
    6.     void OnEnable()
    7.     {
    8.         if(TryGetComponent<SplineContainer>(out var container))
    9.             m_NativeSpline = new NativeSpline(container.Spline, Allocator.Persistent);
    10.     }
    11.  
    12.     void OnDisable() => m_NativeSpline.Dispose();
    13.  
    14.     // Update is called once per frame
    15.     void Update()
    16.     {
    17.         if(m_NativeSpline.Evaluate(0.5f, out var middlePosition, out _, out _))
    18.             Debug.Log("Middle = "+middlePosition);
    19.         else
    20.             Debug.Log("Middle not found");
    21.     }
    22. }

     
    AntonAndev likes this.
  22. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    473
    The whole system has several static events, for example EditorSplineUtility.AfterSplineWasModified and Spline.afterSplineWasModified. But they are not cleaned during [InitializeOnLoad] which sometimes results in thrown exceptions from destroyed listeners.
     
  23. iDerp69

    iDerp69

    Joined:
    Oct 27, 2018
    Posts:
    49
    In Spline.cs, can this method be made public? We are working with Photon Quantum, and we need to bake our splines to be accessible in our Quantum simulation. To fully bake our splines, we need to use this.

    Code (CSharp):
    1. DistanceToInterpolation[] GetCurveDistanceLut(int index)
    2. {
    3.     if (m_MetaData[index].DistanceToInterpolation[0].Distance < 0f)
    4.         CurveUtility.CalculateCurveLengths(GetCurve(index), m_MetaData[index].DistanceToInterpolation);
    5.  
    6.     return m_MetaData[index].DistanceToInterpolation;
    7. }
    Now you might be asking "Couldn't you just use GetCurveInterpolation?"
    The issue with using GetCurveInterpolation is using variable distances, which we definitely don't want to cache.
     
    Last edited: Dec 4, 2023
  24. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,810
    Hi, I need to create and animate my splines at runtime. Just trying to get my head around how you'd do that.
    Is there a way to change these values through scripts? I only seem to be able to set the point positions.
    Screenshot 2023-12-06 at 9.32.50 pm.png

    Here's my code so far -
    Code (CSharp):
    1.     public List<Transform> points;
    2.     public BezierKnot[] knots;
    3.     public SplineContainer container;
    4.    
    5.     private void Start()
    6.     {
    7.         container = gameObject.AddComponent<SplineContainer>();
    8.         knots = new BezierKnot[points.Count];
    9.     }
    10.    
    11.     private void Update()
    12.     {
    13.         for (int i = 0; i < points.Count; i++)
    14.         {
    15.             knots[i].Position = points[i].position;
    16.         }
    17.         container.Splines[0].Knots = knots;
    18.     }
     
  25. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    210
    You can set those values by constructing BezierKnots and assigning them. Something like this.
    Code (CSharp):
    1.  
    2. BezierKnot curveKnot = new BezierKnot (position, tangentIn, tangentOut, rotation);
    3.  
    4. if (init) {
    5.     spline.Add(curveKnot, TangentMode.Linear);
    6. } else {
    7.     spline.SetKnot(index, curveKnot);
    8. }
    I'm not sure if you can set tangent mode when you use setKnot instead of addKnot, but from what I understand you shouldn't need to set those values if you are assigning tangentIn/Out and a rotation anyways because that would override whatever those tangent values are.

     
    petey likes this.
  26. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,810
  27. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,810
    Hey I'm running into some trouble adding the spline mesh at runtime.
    Getting this error -
    Trying to extrude a spline mesh with no valid splines.

    This is how I'm adding the component, is there something I'm missing there? The splines definitely exist...

    Code (CSharp):
    1. splineExtrude = cableMesh.AddComponent<SplineExtrude>();
    2. splineExtrude.Container = container;
     
    Last edited: Dec 7, 2023
  28. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    410
    Do the editor tools for splines only work for SplineContainer?
    If adding just a spline. The inspector UI is there but there is no scene view tools activated.

    Splines 2.5.1
     
    ThomasLopez likes this.
  29. daxiongmao

    daxiongmao

    Joined:
    Feb 2, 2016
    Posts:
    410
    Some previous posts talk about performance and using NativeSplines and Caching.

    Why do none of the built in components seem to do this?
    Spline Animate doesn't. Spline Container only generates one if scaled.

    Why are the built in tools not using the most performant ways.
    Especially as we look at them for references.
     
    ThomasLopez likes this.
  30. XJonOneX

    XJonOneX

    Joined:
    Dec 19, 2017
    Posts:
    101
    The graphics for the spline editing are messed up for me. Any ideas?
    MessedUpSplineEditing.png
     
  31. joeqnicholson

    joeqnicholson

    Joined:
    Mar 25, 2019
    Posts:
    1
    How can I access the Reverse Spline Flow function through code?
     
  32. Red_Dragon69

    Red_Dragon69

    Joined:
    Sep 7, 2015
    Posts:
    111
    You can use
    Code (CSharp):
    1. SplineUtility.ReverseFlow(splineContainer.Splines[0]);
     
    ThomasLopez likes this.
  33. SplinePhysics

    SplinePhysics

    Joined:
    Dec 14, 2023
    Posts:
    1



















    Please add the possibility to apply physics to the spline. please
     
  34. sand_lantern

    sand_lantern

    Joined:
    Sep 15, 2017
    Posts:
    210
    Just have physical objects and then calculate the spline between them. No need to complicate the spline package with something that is simple enough to do.
     
    ThomasLopez likes this.
  35. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    241
    The "Splines" property on "SplineContainer" is a "IReadOnlyList<Spline>", and the code creates a new "ReadOnlyCollection" instance every time we access it, which is not great, specially if we access it a lot, and even the package code itself accesses it in several places:

    Code (CSharp):
    1. public IReadOnlyList<Spline> Splines
    2. {
    3.     get => new ReadOnlyCollection<Spline>(m_Splines);
    4.     ...
    5. }
    6.  
    There's really no need to create a new instance at all, since the "m_Splines" array already implements "IReadOnlyList", so it can be returned just fine:

    Code (CSharp):
    1. public IReadOnlyList<Spline> Splines
    2. {
    3.     get => m_Splines;
    4.     ...
    5. }
    6.  
    (Even if you don't want to return it for any reason, at least don't create a new wrapper instance every time).
     
    ThomasLopez likes this.
  36. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    241
    Also, in the "SplineContainer.Splines" setter, if the value is null you could use "Array.Empty" as a little extra optimization, instead of creating a new array every time:

    Code (CSharp):
    1. public IReadOnlyList<Spline> Splines
    2. {
    3.     ...
    4.     set
    5.     {
    6.         if (value == null)
    7.         {
    8.             // This:
    9.             m_Splines = Array.Empty<Spline>();
    10.  
    11.             // Instead of this:
    12.             m_Splines = new Spline[0];
    13.          
    14.             return;
    15.         }
    16.  
    17.         ...
    18.     }
    19. }
     
    ThomasLopez likes this.
  37. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @daxiongmao,

    Thanks for the question.
    Answering here to both of your posts :) .
    Regarding this one:
    EditorTools can only target components and Spline is not a Unity Object and thus cannot be a valid tool target. So yes, ths inspector is handling this, but this is not possible for the tool system. There is multiple reasons for that, for instance, you could have a single Spline, a list of Spline, a table of Spline, or have your classe implementing a IList<Spline> whatever, there is so many way to embed a spline in your how custom class so you need to define your own tools for that. However, I think we made public all the needed API to do that :)


    On the second one:
    So, SplineAnimate is only referencing and using a SplineContainer (and not directly a Spline) which is under the hood using a NativeSpline when necessary! Ths SplineContainer does not need to cache the Spline in a NativeSpline because evaluating only a few values on that spline is sometime more efficient than caching the entire spline in a NativeSpline and evaluate these few values. But that depends on the usecase! If you think you'll need a lot of evaluations then caching the spline in a NativeSpline and keeping that one as long as its valid without deallocating it to make your evaluations will be better!

    Also, SplineContainer has to use a Native Spline for evaluation when the gameObject is scaled indeed. This is because the Spline (knots and tangents coordinates) is expressed in local coordinates and does not care of the gameObject scale. Even though gameObject position and rotation does not affect the evaluation, scale (and especially non-uniform scales) does affect that a lot! So we need to express that spline in the world space (using a NativeSpline) to get the right values.

    Here is a quick exemple. Consider a spline with 3 knots: A (0,0,0), B(1,0,0) and C(1,0,1) with linear tangents to keep it simple.
    - If the scale is (1,1,1), the spline length is 2, then the world space positions will be the same and evaluating the spline at t=0.5 will give you (1,0,0) which is knot B.
    - If the scale is (1,1,3), then the knots A and B positions are the same, but C is now in (1,0,3). The spline length is thus 4 (1 + 3) and evaluating the spline at t=0.5 will give you something like (1, 0, 1) which is between B anc C now. That's why the scale needs to be considered here :)

    Hope this helps :D
     
    daxiongmao likes this.
  38. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @iDerp69,

    So first, thanks @sand_lantern, this answer is valid. But I recommand not to use SetKnot method for that.

    So If you want to create a knot with a particular type of tangent, use the appropriate Add method (see the doc for more info and overrides):

    Code (CSharp):
    1. // Please set our tangents to avoid Linear mode :D
    2. BezierKnot knot = new BezierKnot (position, tangentIn, tangentOut, rotation);
    3. spline.Add(knot, TangentMode.Mirrored);
    if you want to change the tangent mode later, you can use the spline.SetTangentMode method documented here:
    https://docs.unity3d.com/Packages/c...s.Spline.SetTangentMode.html?q=SetTangentMode .For instance:

    spline.SetTangentMode(knotIndex, TangentMode.Mirrored, BezierTangent.Out);


    Hope this helps!


     
    sand_lantern likes this.
  39. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    For that one, are you adding the SplineExtrude on the same gameObject that has the splineContainer?
    That does seems like a bug indeed... I'll have a look at that !

    Edit: I actually just test that with the latest version (soon to be released 2.5.2) and that's working fine, which version are you using ?

     
    Last edited: Dec 20, 2023
  40. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    @XJonOneX,

    That seems reaaaally strange :eek:
    Are you using special scales (large or tiny?) or at the world boundaries??
    It seems something is messing up with the handles rendering here.... Also, which version of the pacakge are you using ?

     
  41. ThomasLopez

    ThomasLopez

    Unity Technologies

    Joined:
    Jun 8, 2020
    Posts:
    159
    Hey @SplinePhysics,

    Sorry, we have no plans to add you.... hmm,... sorry, I meant to add Spline physics in the coming releases :)
    This is not something we want to do here as this will rely on the users usecases. You usually don't want to physicalize something invisiable (spline is mostly a math formula which does not have a physical reality), but you would want to physicalize the mesh(es) attached to it and depending your special needs.
    Ropes are special case but can be handles the same and that's bringing a lot of elements we don't want to handle there (weight, elasticity, breakability...)

    Hope you'll understand :D

     
  42. Zymes

    Zymes

    Joined:
    Feb 8, 2017
    Posts:
    118
    I need to instantiate navmesh modifier volumes on runtime across a spline.

    But I only see an optiont o "Bake Instance" in the editor, not spawning them on runtime.

    Is it not possible?

    Because if I spawn them in editor and hit bake, the spline get destroyed and if I want to adjust the spline in the future, the navmesh components do not follow the spline which is super annoying, and I need to redo the entire thing.
     
  43. Nahgnoy

    Nahgnoy

    Joined:
    Oct 28, 2017
    Posts:
    1
    Hello.
    There is a problem.
    In the document below, The following features are not displayed in the Element Inspector overlay.

    https://docs.unity3d.com/Packages/com.unity.splines@2.5/manual/reverse-spline-flow.html
    4.In the Element Inspector overlay, select Reverse Spline Flow.

    https://docs.unity3d.com/Packages/com.unity.splines@2.5/manual/join-knots.html
    4. In the Element Inspector overlay, select Join.

    https://docs.unity3d.com/Packages/com.unity.splines@2.5/manual/link-unlink-knots.html
    • You can link knots in the Element Inspector overlay or with the Draw Splines Tool in the Scene view. Use the Element Inspector overlay to unlink knots.

    I'd appreciate it if you could solve it.

    Unity Editor Version : 2023.2.3f1 (HDRP)
    Splines Version : 2.5.1

    upload_2023-12-27_15-52-0.png


    upload_2023-12-27_15-40-52.png

    upload_2023-12-27_15-48-1.png



    I tested it with the following Unity version and it works fine.
    Unity Editor Version : 2022.3.16f1 (Built-in renderer)
    Splines Version : 2.5.1

    upload_2023-12-27_17-0-3.png
     
    Last edited: Dec 27, 2023
  44. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    836
    upload_2023-12-27_9-28-21.png

    As i'm battling performance issues with runtime splines i cant help but hear Mike Acton say; where there is one, there are many.

    Please add an API to add multiple points, and try not to make this amount of garbage :(
     
    sand_lantern likes this.
  45. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,111
    Bug in the Spline editor: When you add a spline and reset the transform and then start placing the first knot, the spline's transform position changes to the first knot's position.
     
  46. sameng

    sameng

    Joined:
    Oct 1, 2014
    Posts:
    184
    This shortcut doesn't seem to exist in 2021 LTS.
    Can you confirm that there's no way to quickly enter spline edit mode in 2021 LTS?
     
  47. dizzy2003

    dizzy2003

    Joined:
    Nov 25, 2013
    Posts:
    103
    Anyone else find spline nodes get randomly moved to the origin or miles away .
    We have hundreds of splines and its chaos keeping track of them being corrupted.

    ( spline 2.5.1 unity 2023.2.3 but bug has been there as long as we have been using it 6 months or so)
     
    firebird721 likes this.
  48. iDerp69

    iDerp69

    Joined:
    Oct 27, 2018
    Posts:
    49
    I think you erroneously responded to me. This was my question:
    https://forum.unity.com/threads/unity-splines.1345052/page-9#post-9510622

    I am wondering if the method that gets the LUT can be made public so I can use it. Right now I'm trying to access that method with reflection, which I've never really done and I'm not even sure works in builds.
     
  49. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    157
    Firstly this tool is great and I have been actively using it for my project. Are there any plans to allow animation using FixedDelta timings? The player and camera are on Fixeddeltatime which is causing jitter with anything using Spline Animate. Can I override this via script?
     
  50. Pitou22

    Pitou22

    Joined:
    Sep 23, 2015
    Posts:
    49
    [Feedback]

    - I got the error message "SplineAnimate does not have a valid SplineContainer set."
    - I lost time to find which one of my SplineAnimate logged this error.

    Can you do a pass in the whole package and add the context parameter to "this" everywhere it's possible? It will highlight the GameObject when clicking on the error:
    Debug.LogError("Sample message", this);
     
    ThomasLopez likes this.