Killer.Penguin Posted January 27, 2014 Share Posted January 27, 2014 I just don't get how Unigine works.., somehow when I create a new object or new node from the script, it doesn't show up in the Editor's window. (Even though I can access it via script.) Am I doing something wrong? Link to comment
sebastianbah Posted January 27, 2014 Share Posted January 27, 2014 Hello,Please, try to use engine.editor.addNode() function.If it does not work, it would be helpful if you can send us your source code or test sample. Link to comment
binstream Posted January 27, 2014 Share Posted January 27, 2014 Here is the detailed explanation: https://docs.unigine.com/code/memory_management#script Link to comment
Killer.Penguin Posted January 28, 2014 Author Share Posted January 28, 2014 I kinda get the idea but just to make sure, can you help explain the different between: node_load(); engine.world.loadNode(); engine.editor.addNode(); ps. Somehow I cannot access Unity's doc on the web (the ones in the link above) with my account. Can someone help me with this? Link to comment
sebastianbah Posted January 28, 2014 Share Posted January 28, 2014 Hi Killer.Penguin, engine.world.loadNode(); - add node to your world, but not to memory manager. So you need to delete it directly when it is no longer needed.node_load(); - add your node to the world, to the memory manager, converts a node to its derived type. When you have no references to this node, it is automatically deleted.engine.editor.addNode(); - the same as node_load(); + add the node to editor, so you can see it in Nodes hierarchy. Here is the detailed explanation: https://docs.unigine.com/code/memory_management#script The correct link is: https://developer.unigine.com/en/docs/1.0/code/memory_management#script Link to comment
Killer.Penguin Posted January 29, 2014 Author Share Posted January 29, 2014 I see.. so I should always use engine.editor.addNode() so that my editor is always updated? (Just in case I need to keep the editor window open for debuging...) Is there any down size to it that I should be aware of? Link to comment
Killer.Penguin Posted January 29, 2014 Author Share Posted January 29, 2014 I'm still Having problem on adding ObjectMeshSkinned into the world via coding. I notice most people use add_editor() to do so, but I couldn't find where it is. Can you give me some pointer? I've used many engines and this is so far the most undocumented one so far... T_T Link to comment
ulf.schroeter Posted January 29, 2014 Share Posted January 29, 2014 You should have a deeper look into the samples. EVERYTHING is there... Link to comment
Killer.Penguin Posted January 29, 2014 Author Share Posted January 29, 2014 Yeah, but once I found something in the samples, I wanted to read about it. Then dang, I just couldn't search for it in the document... so where the heck is this add_editor() function? Link to comment
silent Posted January 29, 2014 Share Posted January 29, 2014 Please, check the <SDK>/data/samples/common/common.h file. This function is on line 7. 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