Jump to content

Access to UnigineScript variable from C


photo

Recommended Posts

Posted

How i can access to 'nodes' variable from C code?

 

namespace MyNamespace {

...

Node nodes[];

..

}

Posted

'nodes' is an array and you can pass it to c++ function.

Look through samples/Api/Arrays/ sample.

Posted

'nodes' is an array and you can pass it to c++ function.

Look through samples/Api/Arrays/ sample.

 

Can one working only trough Interpreter class instance get

access to some unigine script variable wich is not passed as argument?

 

Need any sample about usage:

 

class Interpreter {
  ..  
  Variable getVariable(const char *name) const;
  Vector<Variable> &getArrayVector(int id) const;
  Map<Variable,Variable> &getArrayMap(int id) const;
  ..
};

Posted

I have added Interpter::getArrayID(const char*) function for internal arrays.

You can use this ID as argument for Interpter::getArrayVector() and Interpter::getArrayMap() functions.

×
×
  • Create New...