07-23-2022, 06:44 PM
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:
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
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