Godot Version
Version 4.4.1
Question
In the game I’m working on I have it where I need to make a custom button to go along with a custom Cursor. I thought using Enums would be a good way to determine what type of button it is. but I ran into a problem trying to to check which enum the variable that stored it in was…
Here’s the snippet of the code that should be contributing to the error:
enum ButtonTypes {NextCam, PrevousCam, Other}
@export var ButtonType: ButtonTypes = ButtonTypes.Other
func CheckClick():
if has_overlapping_bodies() and Input.is_action_just_pressed("MouseL"):
if ButtonType == ButtonType.NextCam: #This line has the error "Cannot get property from enum value"
pass #What ever that button type does, Haven't gotten there yet.
I am fairly new with coding with Godot so there easily could be some easier way around this.
This is the first time I’ve encountered an error and not able to find the answer online.
Thanks to anyone that knows.