Topic was automatically imported from the old Question2Answer platform.
Asked By
dracut
I’m trying to export an autoloaded enum within a GDScript as follows:
export(Singleton.ENUM) var options
I receive the following error:
Expected constant expression
I’m not exactly sure what to make of this error message as I was under the impression enums were constant. Besides the following runs without errors:
export(ENUM) var options
The only reason I could see this being the case is because the context which it is being used isn’t static. If this is the case how may I create a local copy of ENUM so
as I can export it to the scene. My attempt results in the same error:
const enum= Singleton.ENUM
export(enum) var options