10-08-2020, 08:35 AM
(This post was last modified: 10-08-2020, 08:36 AM by josemendez.)
(08-08-2020, 11:06 PM)MLAnimation Wrote: I've been looking here: http://obi.virtualmethodstudio.com/tutor...ctors.html for a guide on how to generate ropes during runtime. But I've run into an issue.
In the second section called "Creating Blueprints" when I use the code on the site, I get an error that I don't know how to fix.
Code:var blueprint = ScriptableObject.CreateInstance<ObiRopeBlueprint>();
It seems that unity doesn't understand what "blueprint" means. I put "using Obi;" at the start of my script as I needed a way to use the code found in "Creating a Solver" and it allowed that to read all the stuff used to generate a solver. But when it comes to creating a blueprint Unity just doesn't know what to do.
Does anyone have a solution too this? It's pretty important for my game to be able to generate ropes during the game, but it's just strange how the sample code listed on the official documentation doesn't seem too work.
Hi,
What's the error you're getting?
We're unable to reproduce this, the code in the samples compiles and runs just fine. ObiRopeBlueprint is defined in/Obi/Scripts/RopeAndRod/Blueprints/ObiRopeBlueprint.cs. It's a basic class, without it nothing would work at all.
Maybe you're using a older Obi version? blueprints were introduced in 5.0, so if you're using 3.x/4.X, you should be referring to the 3.X/4.X manual since it is very different in many aspects:
http://obi.virtualmethodstudio.com/tutor...ctors.html