From 1f82ffa4d3ee8355215d43bf43edf8cecaca0d1d Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 16 Oct 2024 17:21:04 +0200 Subject: fix user script implementation --- src/crepe/GameObject.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe/GameObject.hpp') diff --git a/src/crepe/GameObject.hpp b/src/crepe/GameObject.hpp index 5966fbf..8cd1abe 100644 --- a/src/crepe/GameObject.hpp +++ b/src/crepe/GameObject.hpp @@ -7,9 +7,9 @@ namespace crepe { template -void GameObject::add_component(Args &&... args) { +T & GameObject::add_component(Args &&... args) { auto & mgr = ComponentManager::get_instance(); - mgr.add_component(id, std::forward(args)...); + return mgr.add_component(id, std::forward(args)...); } } // namespace crepe -- cgit v1.2.3