08-01-2021, 02:09 PM
(This post was last modified: 08-01-2021, 02:12 PM by josemendez.)
I don't know if it's a typo or not, but in your code I had to replace "rodBlueprint" with "blueprint" in this line:
it would not compile otherwise, since rodBlueprint isn't defined anywhere.
Maybe you have a member variable in your class named "rodBlueprint", but initialized to null? it would cause Unity to attempt to instantiate a null object, raising an exception ("the Object you want to instantiate is null") and stopping execution. That would generate a rope with no blueprint and would not parent it to the solver, which is exactly the behavior you're getting.
Weirdly specific I know, but it's the only explanation that comes to mind.
Quote:rod.rodBlueprint = ScriptableObject.Instantiate(blueprint);
it would not compile otherwise, since rodBlueprint isn't defined anywhere.
Maybe you have a member variable in your class named "rodBlueprint", but initialized to null? it would cause Unity to attempt to instantiate a null object, raising an exception ("the Object you want to instantiate is null") and stopping execution. That would generate a rope with no blueprint and would not parent it to the solver, which is exactly the behavior you're getting.
Weirdly specific I know, but it's the only explanation that comes to mind.