karim.salama Posted January 28, 2021 Posted January 28, 2021 (edited) I'm currently developing a plugin for Unigine 2.6.1 I want to pass the vector/array of the currently selected nodes to an external function. In UnigineScript, the selected nodes are in ::Nodes::nodes. How can I pass these nodes as an argument to an extern function? Thanks in advance Edited January 28, 2021 by karim.salama
karim.salama Posted January 28, 2021 Author Posted January 28, 2021 The answer was in this page https://developer.unigine.com/en/docs/2.6.1/code/cpp/usage/arrays?rlang=cpp All I had to do is to add the external function with a "[]" as arguments, like this: MakeExternFunction(&my_array_vector_set,"[]") and pass the ::Nodes::nodes directly to the external function. Then, in C++ get the ArrayVector using the Variable which is passed to the function as an argument.
Recommended Posts