Jump to content

World::get()->saveNode() Missing Geometric componants


photo

Recommended Posts

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?

Link to comment

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:

Link to comment
×
×
  • Create New...