Problem Description
Cross-references to enums defined in autoload scripts don't work when referenced from other script files within the same addon using Godot's built-in documentation system.
Specific Issue
In helper_functions.gd, attempting to create documentation links to StatMath.SupportedDistributions enum (defined in the StatMath autoload) results in:
- Links that appear clickable but lead to blank pages
- Links that don't navigate anywhere when clicked
Steps Attempted
We tried multiple cross-reference syntaxes as documented in Godot's documentation system:
[enum StatMath.SupportedDistributions] - Creates link that goes to blank page
[enum SupportedDistributions] - Creates link that does nothing when clicked
[member StatMath.SupportedDistributions] - Creates link that goes to blank page
[constant StatMath.SupportedDistributions] - Creates link that goes to blank page
Current Workaround
Reverted to using [code]StatMath.SupportedDistributions[/code] which provides proper formatting without broken links.
Expected Behavior
Cross-references should properly link to the enum definition in the StatMath autoload and navigate correctly when clicked.
Environment
- Godot Version: 4.4
- Project Type: GDScript addon
- Autoload Setup: StatMath registered as autoload pointing to
res://addons/godot-stat-math/stat_math.gd
Additional Context
- The enum is properly documented with
## comments in the StatMath autoload
- The autoload is correctly registered in project.godot
- Cross-references work fine for built-in Godot types (e.g.,
[enum MouseButton])
- Issue appears specific to enums in custom autoload scripts
Code References
Enum definition (stat_math.gd):
## Supported statistical distributions for various calculations
enum SupportedDistributions {
NORMAL, ## Normal (Gaussian) distribution
STUDENT_T, ## Student's t-distribution
CHI_SQUARED ## Chi-squared distribution
}
Failed cross-reference (helper_functions.gd):
## Converts a string distribution name to [code]StatMath.SupportedDistributions[/code] enum.
static func string_to_distribution_enum(distribution: String) -> StatMath.SupportedDistributions:
Problem Description
Cross-references to enums defined in autoload scripts don't work when referenced from other script files within the same addon using Godot's built-in documentation system.
Specific Issue
In
helper_functions.gd, attempting to create documentation links toStatMath.SupportedDistributionsenum (defined in the StatMath autoload) results in:Steps Attempted
We tried multiple cross-reference syntaxes as documented in Godot's documentation system:
[enum StatMath.SupportedDistributions]- Creates link that goes to blank page[enum SupportedDistributions]- Creates link that does nothing when clicked[member StatMath.SupportedDistributions]- Creates link that goes to blank page[constant StatMath.SupportedDistributions]- Creates link that goes to blank pageCurrent Workaround
Reverted to using
[code]StatMath.SupportedDistributions[/code]which provides proper formatting without broken links.Expected Behavior
Cross-references should properly link to the enum definition in the StatMath autoload and navigate correctly when clicked.
Environment
res://addons/godot-stat-math/stat_math.gdAdditional Context
##comments in the StatMath autoload[enum MouseButton])Code References
Enum definition (stat_math.gd):
Failed cross-reference (helper_functions.gd):