Nameless Engine
Loading...
Searching...
No Matches
EditorNodeCreationHelpers.hpp
1#pragma once
2
3// Custom.
4#include "game/nodes/Node.h"
5
6namespace ne {
9 public:
11
20 template <typename NodeType>
21 requires std::derived_from<NodeType, Node>
22 static inline sgc::GcPtr<NodeType> createEditorNode(const std::string& sNodeName) {
23 // Create node.
24 auto pCreatedNode = sgc::makeGc<NodeType>(sNodeName);
25
26 // Disable serialization so that it won't be serialized as part of the game world.
27 pCreatedNode->setSerialize(false);
28
29 return pCreatedNode;
30 }
31 };
32}
Definition: EditorNodeCreationHelpers.hpp:8
static sgc::GcPtr< NodeType > createEditorNode(const std::string &sNodeName)
Definition: EditorNodeCreationHelpers.hpp:22