Jump to content

Search the Community

Showing results for tags 'run-time node'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. Hello, I need to create a node (i.e. ObjectMeshStatic) at run-time and want to add it to list of nodes of already loaded world. So far, I've succeeded in creating the ObjectMeshStatic node. But when adding to nodes' list through Unigine::Editor::addNode method, node is not visible (not rendering). Also, I'm able to get the list of nodes in the current world with the newly created node's entry in the list. Here's the code for adding node dynamically (C++): bool createNodeRunTime() { Unigine::ObjectMeshStaticPtr pOMS = Unigine::ObjectMeshStatic::create("core/meshes/material_ball.mesh", 1 /*unique=1*/); if (!pOMS) return false; pOMS->setMeshName("core/meshes/material_ball.mesh"); //relative path to data dir. pOMS->setMaterial("material_ball", 0); pOMS->release(); Unigine::NodePtr newNode = pOMS->getNode(); if (!newNode) return false; Unigine::Editor::get()->addNode(newNode); m_vecNodes.append(newNode); // Unigine::Vector<Unigine::NodePtr> m_vecNodes; Unigine::Console::get()->run("world_save"); return true; } after executing world_save command, there's entry in world file as follows: <node type="ObjectMeshStatic" id="19595027" prefab_id="190089851" name="new_node"> <mesh_name>core/meshes/material_ball.mesh</mesh_name> <surface name="material_ball_mat" material="material_ball"/> <transform>1 0 0 0.0 0 1 0 0.0 0 0 1 0.0 1 1 1 1.0</transform> </node> When I'm starting the application and loading the same world file through config file, I'm able to see the node (i.e. ObjectMeshStatic) which was added earlier. I want to see the added node immediately in the rendering view. I don't know what and where I'm missing something... Any help greatly appreciated.
×
×
  • Create New...