From 67d5d3a3fb4333be0e1ffacaff57519b8e3e31af Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Thu, 31 Aug 2023 09:37:54 +0200 Subject: [PATCH] Fix missing `Variant` typename for Object or Asset value to properly pass type checks --- Source/Engine/Core/Types/Variant.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Engine/Core/Types/Variant.cpp b/Source/Engine/Core/Types/Variant.cpp index 846a98992..8da9a0e9b 100644 --- a/Source/Engine/Core/Types/Variant.cpp +++ b/Source/Engine/Core/Types/Variant.cpp @@ -607,7 +607,10 @@ Variant::Variant(ScriptingObject* v) { AsObject = v; if (v) + { + Type.SetTypeName(v->GetType().Fullname); v->Deleted.Bind(this); + } } Variant::Variant(Asset* v) @@ -616,6 +619,7 @@ Variant::Variant(Asset* v) AsAsset = v; if (v) { + Type.SetTypeName(v->GetType().Fullname); v->AddReference(); v->OnUnloaded.Bind(this); }