dongju.jeong Posted October 19, 2018 Posted October 19, 2018 Usage Example/ Using Custom Component System Why is there no addnode () function when creating a spinner node in AppWorldLogic ??? Is it automatically added when assigning a component to an object or assigning related properties?
fox Posted October 19, 2018 Posted October 19, 2018 If you mean the addNode() method of the Editor class, it actually is used to pass node ownership to the Editor, which is not necessary here, as created nodes will be automatically owned by the Component System after adding a component, or assigning a property to them (see the comments inside the create_box() method in this example). Thank you!
dongju.jeong Posted October 20, 2018 Author Posted October 20, 2018 thank you! then, if I want to delete the object instead of the editor's removeNode, Is it correct to call the smart pointer's destroy () function?
fox Posted October 20, 2018 Posted October 20, 2018 You're welcome! A node owned by the Component System can be destroyed using the destroyNode() method (receives a node pointer as an argument): ComponentSystem::get()->destroyNode(some_node); Thank you! 1
Recommended Posts