Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Obi Rod Blueprint in Script
#8
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:
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.
Reply


Messages In This Thread
Obi Rod Blueprint in Script - by MonaGermany - 07-01-2021, 09:18 AM
RE: Obi Rod Blueprint in Script - by josemendez - 07-01-2021, 09:55 AM
RE: Obi Rod Blueprint in Script - by MonaGermany - 08-01-2021, 08:38 AM
RE: Obi Rod Blueprint in Script - by josemendez - 08-01-2021, 10:50 AM
RE: Obi Rod Blueprint in Script - by MonaGermany - 08-01-2021, 11:00 AM
RE: Obi Rod Blueprint in Script - by josemendez - 08-01-2021, 11:30 AM
RE: Obi Rod Blueprint in Script - by MonaGermany - 08-01-2021, 12:59 PM
RE: Obi Rod Blueprint in Script - by josemendez - 08-01-2021, 02:09 PM
RE: Obi Rod Blueprint in Script - by MonaGermany - 08-01-2021, 02:28 PM
RE: Obi Rod Blueprint in Script - by josemendez - 08-01-2021, 02:36 PM
RE: Obi Rod Blueprint in Script - by MonaGermany - 08-01-2021, 02:47 PM