liu.yan Posted November 22, 2016 Share Posted November 22, 2016 Is it possible that IDs will be duplicated if we utilize resources in the demo? Link to comment
silent Posted November 22, 2016 Share Posted November 22, 2016 liu.yan, What do you mean? Could you please explain in more details?Node ID should always have unique values. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
liu.yan Posted November 23, 2016 Author Share Posted November 23, 2016 There are tons of nodes in Unigine demos which we want utilize. We are writing programs to copy node contents from demo's .world file to another .world file(or .node file). Corresponding resources like mesh, material is also copied to make sure the copied nodes can be rendered correctly in the new project. And the problem is, could the node id be duplicated across different Unigine project? For there is an "id" attribute in the node's XML tag. If it will duplicate, would you provide us with your integer-id generating algorithms, so that we can change the id. Link to comment
silent Posted November 23, 2016 Share Posted November 23, 2016 Hi liu.yan, In case of collision you can just assign random not taken Node ID via setID method: https://developer.unigine.com/en/docs/2.3.1/api/library/nodes/class.node?rlang=cpp&words=setid#setID_int_int Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts