I have a really simple problem using the Unity Spline package and cannot determine whether it’s a bug or, as I’m new to Unity, I’m just misunderstanding something. Here’s the scenario:
I have a prefab game object with 4 components:
- Spline Container
- Spline Extrude
- Mesh Renderer
- Spline Extrude (Mesh Filter)
When a user clicks on the scene I instantiate the prefab and add the click location in world to the container’s spline. After X amount of clicks I leave that object, instantiate another instance of the prefab, and repeat the process. My expectation is that this will let me draw any number of arbitrary splines in the scene.
The problem is every object instance is drawing/showing the splines generated on every previous instance. It’s as though Spline Extrude is keeping a shared reference to every spline that was drawn. If I set geometry auto-regen to a small number I can actually see every instance blink between all the previous splines. Similarly, if I clear all the knots in any instance’s spline then all instances’ splines disappear. But none of the container or extruder’s properties give any indication they’re holding data from other instances and all have unique ids.
Is this a bug? Or am I fundamentally misunderstanding something?