aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-12 20:54:07 +0200
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-12 20:54:07 +0200
commit5d041cce13da66aa3457d236579a9ac90ebf7618 (patch)
tree2107c4cad158bb3875faa838c12e064d6aba03f2 /src/crepe/api
parent579824011d5e8776e2079d6624a39535517760ff (diff)
fix constructor/destructor member visibility for component manager
Diffstat (limited to 'src/crepe/api')
-rw-r--r--src/crepe/api/BehaviorScript.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/crepe/api/BehaviorScript.h b/src/crepe/api/BehaviorScript.h
index e9542c1..ba60a8c 100644
--- a/src/crepe/api/BehaviorScript.h
+++ b/src/crepe/api/BehaviorScript.h
@@ -6,11 +6,14 @@
namespace crepe::api {
class BehaviorScript : public Script, public Component {
+protected:
// only allow ComponentManager to instantiate scripts
friend class ComponentManager;
-
-protected:
BehaviorScript();
+public:
+ // but allow uniqe_ptr to call the destructor (THIS IS VERY IMPORTANT)
+ virtual ~BehaviorScript() = default;
+
};
}