Open Mozz3d opened 1 month ago
Operating system: Windows 10 Game version: 2.12a CET version: 1.32.3 GPU: RTX 3060
CET throws an error when attempting to call a native function that expects a Variant as an argument.
Variant
CET should convert any arguments to a Variant (for functions that expect it as an argument) so that the native function may handle it.
C++
void VariantTest(const Red::Variant& aVariant) { auto type = aVariant.GetType(); } RTTI_FUNCTION(VariantTest);
Lua
registerForEvent('onInit', function() VariantTest(1.0) end)
[2024-08-10 21:49:27 UTC-04:00] [30852] init.lua:2: Function 'VariantTest' parameter 1 must be Variant. stack traceback: [C]: in function 'VariantTest' init.lua:2: in function <init.lua:1>```
Operating system: Windows 10 Game version: 2.12a CET version: 1.32.3 GPU: RTX 3060
Description
CET throws an error when attempting to call a native function that expects a
Variant
as an argument.Expected behaviour
CET should convert any arguments to a
Variant
(for functions that expect it as an argument) so that the native function may handle it.Reproduction
C++
Lua