Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when recreating splines / connections
#1
Hi again,

I dynamically create my splines and connections via API and that works fine. However, when I need to recreate the splines and connections after I have already done it once I get errors with connections.

The precise error is:

CurvyConnection.AddControlPoints called on a control point '{0}' that has already a connection. Only control points with no connection can be added.

Before recreating my splines I delete the splines by destroying the gameobjects. To also delete the connections I am calling Delete on each connection as follows:


Code:
var allConnections = FindObjectOfType<CurvyGlobalManager>().Connections;
foreach (var conn in allConnections) conn.Delete();

I have even tried also destroying the Connection gameobjects, but still get the same error.

Is there some kind of refresh or frame wait I should be doing perhaps before attempting to create my splines and connections again?

Many thanks (yet again)

John
Reply


Messages In This Thread
Error when recreating splines / connections - by jh092 - 07-23-2022, 06:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Information New free asset: Converter For Unity Splines _Aka_ 0 1 04-20-2024, 08:34 PM
Last Post: _Aka_
  snap to the curve created by the curvy splines segment points ShiroeYamamoto 3 11 04-02-2024, 02:24 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_
  Connections Problem Juton 3 16 03-06-2024, 10:41 AM
Last Post: _Aka_

Forum Jump: