-
-
Notifications
You must be signed in to change notification settings - Fork 713
Open
Labels
enhancementThis is an enhancement on the current functionalityThis is an enhancement on the current functionality
Description
Godot version
4.5.1.stable.mono
godot-cpp version
godot-4.5-stable
System information
Godot v4.5.1.stable.mono unknown - EndeavourOS #1 SMP PREEMPT_DYNAMIC Sun, 11 Jan 2026 17:10:53 +0000 on X11 - X11 display driver, Multi-window, 2 monitors - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (nvidia; 590.48.01) - Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 threads) - 15.49 GiB memory
Issue description
VARIANT_ENUM_CAST doesn't work with enum class, looks like you need to change p_val to static_cast<int64_t>(p_val) in PtrToArg<m_enum>::encode.
VARIANT_ENUM_CAST does work in Godot itself with enum classes.
Also I guess VARIANT_BITFIELD_CAST is the same, and the master still has the same code, so it looks like the issue is still exist
Steps to reproduce
Use VARIANT_ENUM_CAST with enum class
Minimal reproduction project
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementThis is an enhancement on the current functionalityThis is an enhancement on the current functionality