Use Variant::CanCast() for type check.

This commit is contained in:
Chandler Cox
2025-01-06 15:40:38 -06:00
parent 88703d721b
commit 7eb2088af0

View File

@@ -30,7 +30,7 @@ void MaterialBase::SetParameterValue(const StringView& name, const Variant& valu
const auto param = Params.Get(name);
if (param)
{
if (param->GetValue().Type == value.Type)
if (Variant::CanCast(value, param->GetValue().Type))
{
param->SetValue(value);
param->SetIsOverride(true);