Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting a solver from script
#1
I was using OBI Solver and after I updated to the latest version I cannot set a solver programatically. Even the sample script that was doing this was commented out.

This was the code in the sample script:
Code:
// set up component references (see ObiRopeHelper.cs)
rope.Solver = solver;

Now I get the error:
Code:
error CS1061: 'ObiRope' does not contain a definition for 'Solver' and no accessible extension method 'Solver' accepting a first argument of type 'ObiRope' could be found (are you missing a using directive or an assembly reference?)

I hope you can tell me how to do this now.

Thank you.
Reply
#2
(19-12-2019, 09:18 PM)hazneliel Wrote: I was using OBI Solver and after I updated to the latest version I cannot set a solver programatically. Even the sample script that was doing this was commented out.

This was the code in the sample script:
Code:
// set up component references (see ObiRopeHelper.cs)
rope.Solver = solver;

Now I get the error:
Code:
error CS1061: 'ObiRope' does not contain a definition for 'Solver' and no accessible extension method 'Solver' accepting a first argument of type 'ObiRope' could be found (are you missing a using directive or an assembly reference?)

I hope you can tell me how to do this now.

Thank you.

There's no need to. In Obi 5.0, actors are managed by the first solver up their hierarchy. See:
http://obi.virtualmethodstudio.com/tutor...cture.html
http://obi.virtualmethodstudio.com/tutor...ctors.html
http://obi.virtualmethodstudio.com/tutor...ctors.html
Reply