09-14-2024, 05:41 PM
What is the correct procedure to remove an instance of a CurvySpline from memory?
For example I've created an object which travels along a spline, have set up the OnPositionReached event to fire something else, but part of that is to then remove the spline from view, along with the relevant modules (Generator, InputSplinePath, DeformMesh, etc).
I'm sure this is of course the wrong way, but if I Destroy the object, I get errors of:
or
Have checked the docs, or rather searched for words like "Remove", "Destroy", "Close" etc but nothing seems to be pointing me to the right direction.
For example I've created an object which travels along a spline, have set up the OnPositionReached event to fire something else, but part of that is to then remove the spline from view, along with the relevant modules (Generator, InputSplinePath, DeformMesh, etc).
I'm sure this is of course the wrong way, but if I Destroy the object, I get errors of:
Code:
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.Code:
NullReferenceException: Object reference not set to an instance of an objectHave checked the docs, or rather searched for words like "Remove", "Destroy", "Close" etc but nothing seems to be pointing me to the right direction.

