Add a type conversion to Variant for anything that supports ___get_from_variant()

pull/270/head
Florian Jung 2019-04-12 13:54:28 +02:00
parent f0fe88bd36
commit c5199a2fbf
1 changed files with 1 additions and 0 deletions

View File

@ -226,6 +226,7 @@ public:
operator NodePath() const;
operator RID() const;
operator godot_object *() const;
template <typename T> operator T*() const { return static_cast<T*>(T::___get_from_variant(*this)); }
operator Dictionary() const;
operator Array() const;