diff options
Diffstat (limited to 'core/object/ref_counted.h')
-rw-r--r-- | core/object/ref_counted.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/object/ref_counted.h b/core/object/ref_counted.h index 228373d662..10be27b879 100644 --- a/core/object/ref_counted.h +++ b/core/object/ref_counted.h @@ -212,8 +212,9 @@ public: reference = nullptr; } - void instantiate() { - ref(memnew(T)); + template <typename... VarArgs> + void instantiate(VarArgs... p_params) { + ref(memnew(T(p_params...))); } Ref() {} |