MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / BoxVariantType

Method BoxVariantType

Source/Engine/Scripting/ManagedCLR/MUtils.cpp:293–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293MTypeObject* MUtils::BoxVariantType(const VariantType& value)
294{
295 if (value.Type == VariantType::Null)
296 return nullptr;
297 MClass* klass = GetClass(value);
298 if (!klass)
299 {
300 LOG(Error, "Invalid native type to box {0}", value);
301 return nullptr;
302 }
303 MType* mType = klass->GetType();
304 return INTERNAL_TYPE_GET_OBJECT(mType);
305}
306
307Variant MUtils::UnboxVariant(MObject* value)
308{

Callers

nothing calls this directly

Calls 2

GetClassFunction · 0.50
GetTypeMethod · 0.45

Tested by

no test coverage detected