zhang.jian_bin Posted August 17, 2016 Posted August 17, 2016 i'm developing in the exe mode, not the plugin mode. The version is 2.3, and i had done as follows: 1 create Mesh 2 add the Mesh with 1 a sphere surface 2 a cube surface (set vertices and indices one by one) 3 construct ObjectMeshStatic from the Mesh 4 set setMaterial, setProperty,for the ObjectMeshStatic 5 save the node by using World::get()->saveNode("F:/mydemos/myTest1/data/Yaya.node") it is all right currently, but the node file has no geometric info. if i did so in the editor, the geometric info would appeared in the XML tag <vertex> and <indices> here is my node file: <?xml version="1.0" encoding="utf-8"?> <nodes version="2.3"> <node type="ObjectMeshStatic" id="1584404555" name="someName"> <mesh_name/> <surface name="someSurfaceName" material="mesh_base" property="surface_base"/> <transform>1 0 0 0.0 0 1 0 0.0 0 0 1 0.0 0 0 9.99999974738e-005 1.0</transform> </node> </nodes> How can i export a reference node like the editor do?
zhang.jian_bin Posted August 17, 2016 Author Posted August 17, 2016 I looked into the "node_export.cpp" script used by the editor, it seems export a reference node needs a lot of work, is there a simple way?
silent Posted August 17, 2016 Posted August 17, 2016 Hi Zhang, In case of NodeReference, there is no easier way, I'm afraid. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
zhang.jian_bin Posted August 17, 2016 Author Posted August 17, 2016 Well, i have to transfer the Unigine Script code into C++ code. Or, can i call Unigine Script functions in C++?
silent Posted August 17, 2016 Posted August 17, 2016 For almost each UnigineScript function there are analogue in C++ / C# API. You will have to deal with ownership first (in C++). However, you can also call UnigineScript functions via Callbacks: https://developer.unigine.com/en/docs/2.3/code/cpp/usage/callbacks Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
zhang.jian_bin Posted August 18, 2016 Author Posted August 18, 2016 well, good. i will try the callbacks
Recommended Posts