06-10-2020, 04:41 PM
Connections are stored in objects children to the _CurvyGlobal_ gameObject. That gameObject is automatically created by some Curvy scripts, and stores data shared between various scripts, like pools. So to store connections in a prefab, you need to have in the same prefab both your splines and the _CurvyGlobal_. The issue with that is that, supposing that you want to instantiate the prefab twice, you will end up with two _CurvyGlobal_ objects, and that's bad. Curvy, when detecting that multiple _CurvyGlobal_ objects are on the same scene, will merge them into only one. That process means deleting the other _CurvyGlobal_ objects. The problem with recent Unity versions is that scripts can't delete objets in prefabs without a user input. So you will end up having error messages like "InvalidOperationException: Destroying a GameObject inside a Prefab instance is not allowed". You will then have to manually get rid of all the _CurvyGlobal_objects except one.
What I described here is far from perfect, I agree. I will work at some point on getting connections out of _CurvyGlobal_ to solve this issue. It is on my todo list.
Is my solution ok for you as a workaround?
What I described here is far from perfect, I agree. I will work at some point on getting connections out of _CurvyGlobal_ to solve this issue. It is on my todo list.
Is my solution ok for you as a workaround?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.